Skip to main content

System/Admin

7 API calls in this section.

System • List Payment Method Types​

Billing & Subscriptions / System/Admin
GET/payment/system/method-types

Lists 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

ParameterTypeDescription
Authorizationstring

JWT token (system admin)

Example: Bearer {{access_token}}

Staging
Request
curl
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​

Billing & Subscriptions / System/Admin
GET/payment/system/gateway-configs

Retrieves all system gateway configurations (e.g., NASS).

Headers

ParameterTypeDescription
Authorizationstring

JWT token (system admin)

Example: Bearer {{access_token}}

Staging
Request
curl
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)​

Billing & Subscriptions / System/Admin
GET/payment/system/gateway-configs

Lists system gateway configs with secrets redacted.

Headers

ParameterTypeDescription
Authorizationstring

JWT token (system admin)

Example: Bearer {{access_token}}

Staging
Request
curl
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)​

Billing & Subscriptions / System/Admin
POST/payment/system/gateway-configs

Create or update the system NASS configuration (system scope).

Headers

ParameterTypeDescription
Authorizationstring

JWT token (system admin)

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
provider_codestring—
display_namestring—
api_keysobject—
api_keys.usernamestring—
api_keys.passwordstring—
base_urlstring—
webhook_secretstring—
is_activeboolean—
Staging
Request
curl
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​

Billing & Subscriptions / System/Admin
GET/payment/admin/payment-methods

Returns 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

ParameterTypeDescription
Authorizationstring

JWT token (system admin)

Example: Bearer {{access_token}}

Staging
Request
curl
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​

Billing & Subscriptions / System/Admin
PUT/payment/admin/payment-methods/:pm_id

Updates 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_active update only if present.

Path parameters

ParameterTypeDescription
pm_idRequiredstring

Example: <payment_method_type_uuid>

Headers

ParameterTypeDescription
Authorizationstring

JWT token (system admin)

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
commission_percentnumber—
is_activeboolean—
icon_urlstring—
system_gateway_configobject—
system_gateway_config.api_keysobject—
system_gateway_config.api_keys.usernamestring—
system_gateway_config.api_keys.passwordstring—
system_gateway_config.base_urlstring—
system_gateway_config.webhook_secretstring—
system_gateway_config.display_nameobject—
system_gateway_config.display_name.enstring—
system_gateway_config.display_name.arstring—
Show 1 more body fields

Additional body parameters

ParameterTypeDescription
system_gateway_config.is_activeboolean—
Staging
Request
curl
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​

Billing & Subscriptions / System/Admin
POST/payment/admin/system-gateway-configs

Creates a system-level gateway configuration (separate from system scope upsert).

Headers

ParameterTypeDescription
Authorizationstring

JWT token (system admin)

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
provider_codestring—
display_namestring—
api_keysobject—
api_keys.usernamestring—
api_keys.passwordstring—
base_urlstring—
webhook_secretstring—
is_activeboolean—
Staging
Request
curl
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.