Create Refund
https://api.nomod.com/v1/checkout/{id}/refundCreate refund.
curl -X POST 'https://api.nomod.com/v1/checkout/:id/refund' \
-H 'X-API-KEY: $NOMOD_HOSTED_CHECKOUT_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"amount": "0.00",
"reason": "string",
"reference_id": "string",
"idempotency_key": "string",
"metadata": {}
}'Path parameters
idstringrequiredRequest body
amountstring <decimal>requiredTotal refund amount in the major currency unit (e.g., USD, AED)
reasonstringReason for refund (to be displayed in records)
reference_idstringA unique string to reference the Refund transaction. Merchants can use it to reconcile with their internal systems
idempotency_keystringrequiredA unique Idempotency key to make sure that requests with the same key result in only one outbound request
metadataobjectA set of key-value pairs that merchants can attach to an object. This can be useful for storing additional information about the object in a structured format.Maximum of 40 pairs allowed. Keys must be alphanumeric and cannot contain square brackets ([ and ]). Keys must not exceed 24 characters, and values must not exceed 512 characters.
Responses
refund_idstring <uuid>requiredUnique refund ID
charge_idstring <uuid>requiredUnique charge ID (payment ID) associated with the checkout session
statusobjectrequiredRefund status: pending, completed, failed * `pending` - pending * `completed` - completed * `failed` - failed
amountintegerrequiredTotal refund amount in the major currency unit (e.g., USD, AED)
Min: 1
currencystringrequiredCurrency code (ISO 4217 format, e.g., USD, INR, AED)
Max length: 3
refund_timestring <date-time>requiredISO timestamp of refund
reasonstringReason for refund (if provided)
reference_idstringReference ID passed in the request
metadataobjectA set of key-value pairs that merchants can attach to an object. This can be useful for storing additional information about the object in a structured format.Maximum of 40 pairs allowed. Keys must be alphanumeric and cannot contain square brackets ([ and ]). Keys must not exceed 24 characters, and values must not exceed 512 characters.
Example response
{
"refund_id": "00000000-0000-0000-0000-000000000000",
"charge_id": "00000000-0000-0000-0000-000000000000",
"status": "pending",
"amount": 1,
"currency": "string",
"refund_time": "2026-01-01T00:00:00Z",
"reason": "string",
"reference_id": "string",
"metadata": {}
}