Tenant Admin
8 API calls in this section.
Payment APIs for tenant administrators to manage payment methods and view transactions.
Tenant Payment Methods
/payment/tenant/payment-methodsReturns effective tenant payment methods for the authenticated tenant.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
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)
/payment/tenant/payment-methods/:pm_idUpdates 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_idandtenant_gateway_configare provided, the config with that id is updated with provided fields.
Path parameters
| Parameter | Type | Description |
|---|---|---|
pm_idRequired | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | — |
mode | string | — |
tenant_gateway_config_id | string | — |
tenant_gateway_config | object | — |
tenant_gateway_config.api_keys | object | — |
tenant_gateway_config.api_keys.username | string | — |
tenant_gateway_config.api_keys.password | string | — |
tenant_gateway_config.base_url | string | — |
tenant_gateway_config.webhook_secret | string | — |
tenant_gateway_config.settings | object | — |
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)
/payment/tenant/payment-methods/:pm_idPartially updates tenant gateway api_keys
only username is updated.
Path parameters
| Parameter | Type | Description |
|---|---|---|
pm_idRequired | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | — |
mode | string | — |
tenant_gateway_config | object | — |
tenant_gateway_config.api_keys | object | — |
tenant_gateway_config.api_keys.username | string | — |
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)
/payment/tenant/payment-methods/:pm_idPartially updates tenant gateway api_keys
only password is updated.
Path parameters
| Parameter | Type | Description |
|---|---|---|
pm_idRequired | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | — |
mode | string | — |
tenant_gateway_config | object | — |
tenant_gateway_config.api_keys | object | — |
tenant_gateway_config.api_keys.password | string | — |
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
/payment/tenant/tenant-gateway-configsCreates a tenant gateway configuration for the given PM type.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
payment_method_type_id | string | — |
api_keys | object | — |
api_keys.username | string | — |
api_keys.password | string | — |
base_url | string | — |
webhook_secret | string | — |
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
/payment/tenant/methodsRetrieves payment methods configured for a specific market with their enabled status and settings.
Query parameters
| Parameter | Type | Description |
|---|---|---|
market_idRequired | string | Market ID to get payment methods for (required) Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
AuthorizationRequired | string | JWT token for tenant admin users (required) Example: |
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
/payment/tenant/methods/:methodIdUpdates payment method settings for a specific market including enabling/disabling and configuration.
Path parameters
| Parameter | Type | Description |
|---|---|---|
methodIdRequired | string | UUID of the payment method to update Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
AuthorizationRequired | string | JWT token for tenant admin users (required) Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
market_id | string | — |
is_enabled | boolean | — |
settings | object | — |
settings.maxAmount | number | — |
settings.deliveryCharge | number | — |
settings.instructions | object | — |
settings.instructions.en | string | — |
settings.instructions.ar | string | — |
settings.instructions.ku | string | — |
display_order | number | — |
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
/payment/tenant/transactionsRetrieves payment transactions for the tenant with filtering and pagination support.
Query parameters
| Parameter | Type | Description |
|---|---|---|
page | string | Page number for pagination Example: |
limit | string | Items per page (max: 100) Example: |
status | string | Filter by payment status Example: |
market_id | string | Filter by specific market Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
AuthorizationRequired | string | JWT token for tenant admin users (required) Example: |
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.