User
7 API calls in this section.
User Payment Methods (enabled only)
/payment/user/payment-methods?method_type=Lists only enabled payment methods for the authenticated user's tenant. Optionally filter by method_type (e.g., GATEWAY, WALLET, COD).
1curl --request GET "$ONDI_BASE_URL/payment/user/payment-methods?method_type=" \2 --header "Authorization: Bearer {{access_token}}"Query parameters
method_typeOptionalOptional filter by payment method type (e.g., GATEWAY, WALLET, COD).
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
No response example is available for this endpoint yet.
Create Payment (NASS redirect)
/payment/paymentsCreates a payment and returns redirect URL for NASS when gateway is active.
1curl --request POST "$ONDI_BASE_URL/payment/payments" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "order_id": "order-123",7 "tenant_id": "{{tenant_id}}",8 "user_id": "{{user_id}}",9 "payment_method_type_id": "<pm_type_uuid_NASS>",10 "amount": 100,11 "currency": "IQD",12 "back_ref": "https://app.example.com/payment/return",13 "metadata": {14 "note": "checkout"15 }16}'1{2 "order_id": "order-123",3 "tenant_id": "{{tenant_id}}",4 "user_id": "{{user_id}}",5 "payment_method_type_id": "<pm_type_uuid_NASS>",6 "amount": 100,7 "currency": "IQD",8 "back_ref": "https://app.example.com/payment/return",9 "metadata": {10 "note": "checkout"11 }12}Request body fields
order_idExampleExample field from the request body.
tenant_idExampleExample field from the request body.
user_idExampleExample field from the request body.
payment_method_type_idExampleExample field from the request body.
amountExampleExample field from the request body.
currencyExampleExample field from the request body.
back_refExampleExample field from the request body.
metadataExampleExample field from the request body.
metadata.noteExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
Confirm Payment
/payment/payments/:id/confirmConfirms a payment and triggers wallet crediting when applicable.
1curl --request POST "$ONDI_BASE_URL/payment/payments/:id/confirm" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "gateway_transaction_id": "<rrn_or_order>",7 "gateway_response": {},8 "status": "COMPLETED"9}'1{2 "gateway_transaction_id": "<rrn_or_order>",3 "gateway_response": {},4 "status": "COMPLETED"5}Path parameters
idRequired<payment_uuid>
Request body fields
gateway_transaction_idExampleExample field from the request body.
gateway_responseExampleExample field from the request body.
statusExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
Confirm Payment by Gateway Txn
/payment/payments/confirmConfirms a payment by gateway transaction id (e.g., NASS ORDER/RRN).
1curl --request POST "$ONDI_BASE_URL/payment/payments/confirm" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "gateway_transaction_id": "<rrn_or_order>"7}'1{2 "gateway_transaction_id": "<rrn_or_order>"3}Request body fields
gateway_transaction_idExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
Get Available Payment Methods
/payment/user/methods?market_id={{market_id}}Retrieves available payment methods for the authenticated user with real-time availability checking.
1curl --request GET "$ONDI_BASE_URL/payment/user/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 authenticated users (required)
Responses
No response example is available for this endpoint yet.
Initiate Payment
/payment/user/initiate-paymentInitiates a payment for the authenticated user through the selected payment method.
1curl --request POST "$ONDI_BASE_URL/payment/user/initiate-payment" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "orderId": "order-12345",7 "tenantId": "{{tenant_id}}",8 "marketId": "{{market_id}}",9 "paymentMethodTypeId": "razorpay-method-uuid",10 "amount": 299.99,11 "currency": "USD",12 "customerEmail": "user@example.com",13 "metadata": {14 "productId": "product-uuid-123",15 "campaignId": "campaign-summer2024"16 }17}'1{2 "orderId": "order-12345",3 "tenantId": "{{tenant_id}}",4 "marketId": "{{market_id}}",5 "paymentMethodTypeId": "razorpay-method-uuid",6 "amount": 299.99,7 "currency": "USD",8 "customerEmail": "user@example.com",9 "metadata": {10 "productId": "product-uuid-123",11 "campaignId": "campaign-summer2024"12 }13}Request body fields
orderIdExampleExample field from the request body.
tenantIdExampleExample field from the request body.
marketIdExampleExample field from the request body.
paymentMethodTypeIdExampleExample field from the request body.
amountExampleExample field from the request body.
currencyExampleExample field from the request body.
customerEmailExampleExample field from the request body.
metadataExampleExample field from the request body.
metadata.productIdExampleExample field from the request body.
metadata.campaignIdExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
JWT token for authenticated users (required)
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
Get Payment Status
/payment/user/status/:paymentIdRetrieves the current status of a payment for the authenticated user.
1curl --request GET "$ONDI_BASE_URL/payment/user/status/:paymentId" \2 --header "Authorization: Bearer {{access_token}}"Path parameters
paymentIdRequiredpayment-uuid-123
UUID of the payment to check status
Headers
AuthorizationOptionalBearer {{access_token}}
JWT token for authenticated users (required)
Responses
No response example is available for this endpoint yet.