Skip to main content

Tenant Admin

8 API calls in this section.

Payment APIs for tenant administrators to manage payment methods and view transactions.

Tenant Payment Methods​

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

Returns effective tenant payment methods for the authenticated tenant.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/payment/tenant/payment-methods" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

No saved response example. Use Try it to inspect a staging response.

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.

Path parameters

ParameterTypeDescription
pm_idRequiredstring

Example: <payment_method_type_uuid>

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
enabledboolean—
modestring—
tenant_gateway_config_idstring—
tenant_gateway_configobject—
tenant_gateway_config.api_keysobject—
tenant_gateway_config.api_keys.usernamestring—
tenant_gateway_config.api_keys.passwordstring—
tenant_gateway_config.base_urlstring—
tenant_gateway_config.webhook_secretstring—
tenant_gateway_config.settingsobject—
Staging
Request
curl
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/payment/tenant/payment-methods/${PM_ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "enabled": true,6  "mode": "tenant",7  "tenant_gateway_config_id": "<optional-existing-config-id>",8  "tenant_gateway_config": {9    "api_keys": {10      "username": "...",11      "password": "..."12    },13    "base_url": "https://uat-gateway.nass.iq:9746",14    "webhook_secret": "wh_secret",15    "settings": {}16  }17}'

Response examples

No saved response example. Use Try it to inspect a staging response.

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.

Path parameters

ParameterTypeDescription
pm_idRequiredstring

Example: <payment_method_type_uuid>

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
enabledboolean—
modestring—
tenant_gateway_configobject—
tenant_gateway_config.api_keysobject—
tenant_gateway_config.api_keys.usernamestring—
Staging
Request
curl
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/payment/tenant/payment-methods/${PM_ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "enabled": true,6  "mode": "tenant",7  "tenant_gateway_config": {8    "api_keys": {9      "username": "new_username"10    }11  }12}'

Response examples

No saved response example. Use Try it to inspect a staging response.

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.

Path parameters

ParameterTypeDescription
pm_idRequiredstring

Example: <payment_method_type_uuid>

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
enabledboolean—
modestring—
tenant_gateway_configobject—
tenant_gateway_config.api_keysobject—
tenant_gateway_config.api_keys.passwordstring—
Staging
Request
curl
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/payment/tenant/payment-methods/${PM_ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "enabled": true,6  "mode": "tenant",7  "tenant_gateway_config": {8    "api_keys": {9      "password": "new_password"10    }11  }12}'

Response examples

No saved response example. Use Try it to inspect a staging response.

Create Tenant Gateway Config​

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

Creates a tenant gateway configuration for the given PM type.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
payment_method_type_idstring—
api_keysobject—
api_keys.usernamestring—
api_keys.passwordstring—
base_urlstring—
webhook_secretstring—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/payment/tenant/tenant-gateway-configs" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "payment_method_type_id": "<pm_type_uuid>",6  "api_keys": {7    "username": "merchant_username",8    "password": "merchant_password"9  },10  "base_url": "https://uat-gateway.nass.iq:9746",11  "webhook_secret": "wh_secret"12}'

Response examples

No saved response example. Use Try it to inspect a staging response.

List Payment Methods for Market​

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

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

Query parameters

ParameterTypeDescription
market_idRequiredstring

Market ID to get payment methods for (required)

Example: {{market_id}}

Headers

ParameterTypeDescription
AuthorizationRequiredstring

JWT token for tenant admin users (required)

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/payment/tenant/methods?market_id=${MARKET_ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

No saved response example. Use Try it to inspect a staging response.

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.

Path parameters

ParameterTypeDescription
methodIdRequiredstring

UUID of the payment method to update

Example: cod-method-uuid

Headers

ParameterTypeDescription
AuthorizationRequiredstring

JWT token for tenant admin users (required)

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
market_idstring—
is_enabledboolean—
settingsobject—
settings.maxAmountnumber—
settings.deliveryChargenumber—
settings.instructionsobject—
settings.instructions.enstring—
settings.instructions.arstring—
settings.instructions.kustring—
display_ordernumber—
Staging
Request
curl
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/payment/tenant/methods/${METHODID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "market_id": "{{market_id}}",6  "is_enabled": true,7  "settings": {8    "maxAmount": 10000,9    "deliveryCharge": 100,10    "instructions": {11      "en": "Please have exact cash ready when the order is delivered",12      "ar": "يرجى إعداد المبلغ النقدي الدقيق عند تسليم الطلب",13      "ku": "تکایە پارەی ورد ئامادە بکە کاتێک داواکارییەکە دەگات"14    }15  },16  "display_order": 117}'

Replace {{placeholders}} with your own values before sending.

Response examples

No saved response example. Use Try it to inspect a staging response.

List Payment Transactions​

Billing & Subscriptions / Tenant Admin
GET/payment/tenant/transactions

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

Query parameters

ParameterTypeDescription
pagestring

Page number for pagination

Example: 1

limitstring

Items per page (max: 100)

Example: 20

statusstring

Filter by payment status

Example: SUCCESS

market_idstring

Filter by specific market

Example: {{market_id}}

Headers

ParameterTypeDescription
AuthorizationRequiredstring

JWT token for tenant admin users (required)

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/payment/tenant/transactions?page=1&limit=20&status=SUCCESS&market_id=${MARKET_ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

No saved response example. Use Try it to inspect a staging response.