Skip to main content

Tenant Admin

8 API calls in this section.

Tenant Payment Methods

Billing & Subscriptions / Tenant Admin
GET/payment/tenant/payment-methods

Returns effective tenant payment methods for the authenticated tenant.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/payment/tenant/payment-methods" \2  --header "Authorization: Bearer {{access_token}}"

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Update Tenant Payment Method (supports inline config)

Billing & Subscriptions / Tenant Admin
PUT/payment/tenant/payment-methods/:pm_id

Updates tenant payment method settings. Rules: - If mode='tenant' and enabled=true → a tenant gateway config must exist (in DB) or be provided inline via tenant_gateway_config. - If disabling or mode='system' → config is optional. - If both tenant_gateway_config_id and tenant_gateway_config are provided, the config with that id is updated with provided fields.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/payment/tenant/payment-methods/:pm_id" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "enabled": true,7  "mode": "tenant",8  "tenant_gateway_config_id": "<optional-existing-config-id>",9  "tenant_gateway_config": {10    "api_keys": {11      "username": "...",12      "password": "..."13    },14    "base_url": "https://uat-gateway.nass.iq:9746",15    "webhook_secret": "wh_secret",16    "settings": {}17  }18}'
Request body
json
1{2  "enabled": true,3  "mode": "tenant",4  "tenant_gateway_config_id": "<optional-existing-config-id>",5  "tenant_gateway_config": {6    "api_keys": {7      "username": "...",8      "password": "..."9    },10    "base_url": "https://uat-gateway.nass.iq:9746",11    "webhook_secret": "wh_secret",12    "settings": {}13  }14}

Path parameters

pm_idRequired
path string

<payment_method_type_uuid>

Request body fields

enabledExample
boolean

Example field from the request body.

modeExample
string

Example field from the request body.

tenant_gateway_config_idExample
string

Example field from the request body.

tenant_gateway_configExample
object

Example field from the request body.

tenant_gateway_config.api_keysExample
object

Example field from the request body.

tenant_gateway_config.api_keys.usernameExample
string

Example field from the request body.

tenant_gateway_config.api_keys.passwordExample
string

Example field from the request body.

tenant_gateway_config.base_urlExample
string

Example field from the request body.

tenant_gateway_config.webhook_secretExample
string

Example field from the request body.

tenant_gateway_config.settingsExample
object

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.

Update Tenant Payment Method (partial api_keys: username)

Billing & Subscriptions / Tenant Admin
PUT/payment/tenant/payment-methods/:pm_id

Partially updates tenant gateway api_keys: only username is updated.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/payment/tenant/payment-methods/:pm_id" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "enabled": true,7  "mode": "tenant",8  "tenant_gateway_config": {9    "api_keys": {10      "username": "new_username"11    }12  }13}'
Request body
json
1{2  "enabled": true,3  "mode": "tenant",4  "tenant_gateway_config": {5    "api_keys": {6      "username": "new_username"7    }8  }9}

Path parameters

pm_idRequired
path string

<payment_method_type_uuid>

Request body fields

enabledExample
boolean

Example field from the request body.

modeExample
string

Example field from the request body.

tenant_gateway_configExample
object

Example field from the request body.

tenant_gateway_config.api_keysExample
object

Example field from the request body.

tenant_gateway_config.api_keys.usernameExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.

Update Tenant Payment Method (partial api_keys: password)

Billing & Subscriptions / Tenant Admin
PUT/payment/tenant/payment-methods/:pm_id

Partially updates tenant gateway api_keys: only password is updated.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/payment/tenant/payment-methods/:pm_id" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "enabled": true,7  "mode": "tenant",8  "tenant_gateway_config": {9    "api_keys": {10      "password": "new_password"11    }12  }13}'
Request body
json
1{2  "enabled": true,3  "mode": "tenant",4  "tenant_gateway_config": {5    "api_keys": {6      "password": "new_password"7    }8  }9}

Path parameters

pm_idRequired
path string

<payment_method_type_uuid>

Request body fields

enabledExample
boolean

Example field from the request body.

modeExample
string

Example field from the request body.

tenant_gateway_configExample
object

Example field from the request body.

tenant_gateway_config.api_keysExample
object

Example field from the request body.

tenant_gateway_config.api_keys.passwordExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.

Create Tenant Gateway Config

Billing & Subscriptions / Tenant Admin
POST/payment/tenant/tenant-gateway-configs

Creates a tenant gateway configuration for the given PM type.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/payment/tenant/tenant-gateway-configs" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "payment_method_type_id": "<pm_type_uuid>",7  "api_keys": {8    "username": "merchant_username",9    "password": "merchant_password"10  },11  "base_url": "https://uat-gateway.nass.iq:9746",12  "webhook_secret": "wh_secret"13}'
Request body
json
1{2  "payment_method_type_id": "<pm_type_uuid>",3  "api_keys": {4    "username": "merchant_username",5    "password": "merchant_password"6  },7  "base_url": "https://uat-gateway.nass.iq:9746",8  "webhook_secret": "wh_secret"9}

Request body fields

payment_method_type_idExample
string

Example field from the request body.

api_keysExample
object

Example field from the request body.

api_keys.usernameExample
string

Example field from the request body.

api_keys.passwordExample
string

Example field from the request body.

base_urlExample
string

Example field from the request body.

webhook_secretExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.

List Payment Methods for Market

Billing & Subscriptions / Tenant Admin
GET/payment/tenant/methods?market_id={{market_id}}

Retrieves payment methods configured for a specific market with their enabled status and settings.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/payment/tenant/methods?market_id={{market_id}}" \2  --header "Authorization: Bearer {{access_token}}"

Query parameters

market_idOptional
query string

{{market_id}}

Market ID to get payment methods for (required)

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

JWT token for tenant admin users (required)

Responses

No response example is available for this endpoint yet.

Update Payment Method Settings

Billing & Subscriptions / Tenant Admin
PUT/payment/tenant/methods/:methodId

Updates payment method settings for a specific market including enabling/disabling and configuration.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/payment/tenant/methods/:methodId" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "market_id": "{{market_id}}",7  "is_enabled": true,8  "settings": {9    "maxAmount": 10000,10    "deliveryCharge": 100,11    "instructions": {12      "en": "Please have exact cash ready when the order is delivered",13      "ar": "يرجى إعداد المبلغ النقدي الدقيق عند تسليم الطلب",14      "ku": "تکایە پارەی ورد ئامادە بکە کاتێک داواکارییەکە دەگات"15    }16  },17  "display_order": 118}'
Request body
json
1{2  "market_id": "{{market_id}}",3  "is_enabled": true,4  "settings": {5    "maxAmount": 10000,6    "deliveryCharge": 100,7    "instructions": {8      "en": "Please have exact cash ready when the order is delivered",9      "ar": "يرجى إعداد المبلغ النقدي الدقيق عند تسليم الطلب",10      "ku": "تکایە پارەی ورد ئامادە بکە کاتێک داواکارییەکە دەگات"11    }12  },13  "display_order": 114}

Path parameters

methodIdRequired
path string

cod-method-uuid

UUID of the payment method to update

Request body fields

market_idExample
string

Example field from the request body.

is_enabledExample
boolean

Example field from the request body.

settingsExample
object

Example field from the request body.

settings.maxAmountExample
number

Example field from the request body.

settings.deliveryChargeExample
number

Example field from the request body.

settings.instructionsExample
object

Example field from the request body.

settings.instructions.enExample
string

Example field from the request body.

settings.instructions.arExample
string

Example field from the request body.

settings.instructions.kuExample
string

Example field from the request body.

display_orderExample
number

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

JWT token for tenant admin users (required)

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.

List Payment Transactions

Billing & Subscriptions / Tenant Admin
GET/payment/tenant/transactions?page=1&limit=20&status=SUCCESS&market_id={{market_id}}

Retrieves payment transactions for the tenant with filtering and pagination support.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/payment/tenant/transactions?page=1&limit=20&status=SUCCESS&market_id={{market_id}}" \2  --header "Authorization: Bearer {{access_token}}"

Query parameters

pageOptional
query string

1

Page number for pagination

limitOptional
query string

20

Items per page (max: 100)

statusOptional
query string

SUCCESS

Filter by payment status

market_idOptional
query string

{{market_id}}

Filter by specific market

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

JWT token for tenant admin users (required)

Responses

No response example is available for this endpoint yet.