Manage Global Payment Methods
2 API calls in this section.
Endpoints for system admins to manage the globally available payment methods.
Get Global Payment Methods
System Configuration / Storefront Administration / Manage Global Payment Methods
GET
/system/payment-methodsRetrieves all globally configured payment methods.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/system/payment-methods" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
200Success
Response body
json
1{2 "success": true,3 "data": {4 "payment_methods": [5 {6 "id": "pm-global-cod",7 "name": "Cash on Delivery",8 "is_enabled": true,9 "config": {}10 },11 {12 "id": "pm-global-wallet",13 "name": "Wallet",14 "is_enabled": true,15 "config": {}16 }17 ]18 }19}Create Global Payment Method
System Configuration / Storefront Administration / Manage Global Payment Methods
POST
/system/payment-methodsAdds a new globally available payment method.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
name | string | — |
is_enabled | boolean | — |
config | object | — |
config.provider | string | — |
config.api_key | string | — |
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/system/payment-methods" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "name": "Credit Card",6 "is_enabled": true,7 "config": {8 "provider": "stripe",9 "api_key": "pk_test_..."10 }11}'Response examples
201Success
Response body
text
1{2 "success": true,3 "data": {4 "payment_method": { ... new payment method object ... }5 },6 "message": "Payment method created successfully"7}