Tenant Admin
8 API calls in this section.
Tenant Payment Methods
/payment/tenant/payment-methodsReturns effective tenant payment methods for the authenticated tenant.
1curl --request GET "$ONDI_BASE_URL/payment/tenant/payment-methods" \2 --header "Authorization: Bearer {{access_token}}"Headers
AuthorizationOptionalBearer {{access_token}}
Responses
No response example is available for this endpoint yet.
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_id and tenant_gateway_config are provided, the config with that id is updated with provided fields.
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}'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<payment_method_type_uuid>
Request body fields
enabledExampleExample field from the request body.
modeExampleExample field from the request body.
tenant_gateway_config_idExampleExample field from the request body.
tenant_gateway_configExampleExample field from the request body.
tenant_gateway_config.api_keysExampleExample field from the request body.
tenant_gateway_config.api_keys.usernameExampleExample field from the request body.
tenant_gateway_config.api_keys.passwordExampleExample field from the request body.
tenant_gateway_config.base_urlExampleExample field from the request body.
tenant_gateway_config.webhook_secretExampleExample field from the request body.
tenant_gateway_config.settingsExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
Update Tenant Payment Method (partial api_keys: username)
/payment/tenant/payment-methods/:pm_idPartially updates tenant gateway api_keys: only username is updated.
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}'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<payment_method_type_uuid>
Request body fields
enabledExampleExample field from the request body.
modeExampleExample field from the request body.
tenant_gateway_configExampleExample field from the request body.
tenant_gateway_config.api_keysExampleExample field from the request body.
tenant_gateway_config.api_keys.usernameExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
Update Tenant Payment Method (partial api_keys: password)
/payment/tenant/payment-methods/:pm_idPartially updates tenant gateway api_keys: only password is updated.
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}'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<payment_method_type_uuid>
Request body fields
enabledExampleExample field from the request body.
modeExampleExample field from the request body.
tenant_gateway_configExampleExample field from the request body.
tenant_gateway_config.api_keysExampleExample field from the request body.
tenant_gateway_config.api_keys.passwordExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
Create Tenant Gateway Config
/payment/tenant/tenant-gateway-configsCreates a tenant gateway configuration for the given PM type.
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}'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_idExampleExample field from the request body.
api_keysExampleExample field from the request body.
api_keys.usernameExampleExample field from the request body.
api_keys.passwordExampleExample field from the request body.
base_urlExampleExample field from the request body.
webhook_secretExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
List Payment Methods for Market
/payment/tenant/methods?market_id={{market_id}}Retrieves payment methods configured for a specific market with their enabled status and settings.
1curl --request GET "$ONDI_BASE_URL/payment/tenant/methods?market_id={{market_id}}" \2 --header "Authorization: Bearer {{access_token}}"Query parameters
market_idOptional{{market_id}}
Market ID to get payment methods for (required)
Headers
AuthorizationOptionalBearer {{access_token}}
JWT token for tenant admin users (required)
Responses
No response example is available for this endpoint yet.
Update Payment Method Settings
/payment/tenant/methods/:methodIdUpdates payment method settings for a specific market including enabling/disabling and configuration.
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}'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
methodIdRequiredcod-method-uuid
UUID of the payment method to update
Request body fields
market_idExampleExample field from the request body.
is_enabledExampleExample field from the request body.
settingsExampleExample field from the request body.
settings.maxAmountExampleExample field from the request body.
settings.deliveryChargeExampleExample field from the request body.
settings.instructionsExampleExample field from the request body.
settings.instructions.enExampleExample field from the request body.
settings.instructions.arExampleExample field from the request body.
settings.instructions.kuExampleExample field from the request body.
display_orderExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
JWT token for tenant admin users (required)
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
List Payment Transactions
/payment/tenant/transactions?page=1&limit=20&status=SUCCESS&market_id={{market_id}}Retrieves payment transactions for the tenant with filtering and pagination support.
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
pageOptional1
Page number for pagination
limitOptional20
Items per page (max: 100)
statusOptionalSUCCESS
Filter by payment status
market_idOptional{{market_id}}
Filter by specific market
Headers
AuthorizationOptionalBearer {{access_token}}
JWT token for tenant admin users (required)
Responses
No response example is available for this endpoint yet.