System/Admin
7 API calls in this section.
System • List Payment Method Types
/payment/system/method-typesLists active payment method types. The COD record keeps canonical name Cash on Delivery, type COD, and gateway_code cod; its localized display_name is Cash.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | JWT token (system admin) Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/payment/system/method-types" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
System • List System Gateway Configs
/payment/system/gateway-configsRetrieves all system gateway configurations (e.g., NASS).
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | JWT token (system admin) Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/payment/system/gateway-configs" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
System • List System Gateway Configs (safe)
/payment/system/gateway-configsLists system gateway configs with secrets redacted.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | JWT token (system admin) Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/payment/system/gateway-configs" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
System • Upsert System Gateway Config (NASS)
/payment/system/gateway-configsCreate or update the system NASS configuration (system scope).
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | JWT token (system admin) Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
provider_code | string | — |
display_name | string | — |
api_keys | object | — |
api_keys.username | string | — |
api_keys.password | string | — |
base_url | string | — |
webhook_secret | string | — |
is_active | boolean | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/payment/system/gateway-configs" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "provider_code": "nass",6 "display_name": "Nass (System)",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 "is_active": true14}'Response examples
No saved response example. Use Try it to inspect a staging response.
Admin • List Payment Methods
/payment/admin/payment-methodsReturns payment method types with commission and activation flags. The COD record keeps canonical name Cash on Delivery, type COD, and gateway_code cod; its localized display_name is Cash.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | JWT token (system admin) Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/payment/admin/payment-methods" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
Admin • Update Payment Method
/payment/admin/payment-methods/:pm_idUpdates payment method type fields (commission_percent, is_active). If provided, also merges partial provider system configuration for the related gateway (by payment method's gateway_code):
system_gateway_config.api_keys.username/password are individually optional and merged into existing credentials (others unchanged).base_url,webhook_secret,display_name,is_activeupdate only if present.
Path parameters
| Parameter | Type | Description |
|---|---|---|
pm_idRequired | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | JWT token (system admin) Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
commission_percent | number | — |
is_active | boolean | — |
icon_url | string | — |
system_gateway_config | object | — |
system_gateway_config.api_keys | object | — |
system_gateway_config.api_keys.username | string | — |
system_gateway_config.api_keys.password | string | — |
system_gateway_config.base_url | string | — |
system_gateway_config.webhook_secret | string | — |
system_gateway_config.display_name | object | — |
system_gateway_config.display_name.en | string | — |
system_gateway_config.display_name.ar | string | — |
Show 1 more body fields
Additional body parameters
| Parameter | Type | Description |
|---|---|---|
system_gateway_config.is_active | boolean | — |
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/payment/admin/payment-methods/${PM_ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "commission_percent": 2.5,6 "is_active": true,7 "icon_url": "https://cdn.example.com/icons/nass.png",8 "system_gateway_config": {9 "api_keys": {10 "username": "new_username_optional",11 "password": "new_password_optional"12 },13 "base_url": "https://gateway.example.com",14 "webhook_secret": "wh_secret_optional",15 "display_name": {16 "en": "NASS Gateway",17 "ar": "بوابة ناس"18 },19 "is_active": true20 }21}'Response examples
No saved response example. Use Try it to inspect a staging response.
Admin • Create System Gateway Config
/payment/admin/system-gateway-configsCreates a system-level gateway configuration (separate from system scope upsert).
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | JWT token (system admin) Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
provider_code | string | — |
display_name | string | — |
api_keys | object | — |
api_keys.username | string | — |
api_keys.password | string | — |
base_url | string | — |
webhook_secret | string | — |
is_active | boolean | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/payment/admin/system-gateway-configs" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "provider_code": "nass",6 "display_name": "Nass (Ondi)",7 "api_keys": {8 "username": "u",9 "password": "p"10 },11 "base_url": "https://uat-gateway.nass.iq:9746",12 "webhook_secret": "wh_secret",13 "is_active": true14}'Response examples
No saved response example. Use Try it to inspect a staging response.