Nomod
Hosted Checkout/Create Refund

Create Refund

posthttps://api.nomod.com/v1/checkout/{id}/refund

Create 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

idstringrequired

Request body

amountstring <decimal>required

Total refund amount in the major currency unit (e.g., USD, AED)

reasonstring

Reason for refund (to be displayed in records)

reference_idstring

A unique string to reference the Refund transaction. Merchants can use it to reconcile with their internal systems

idempotency_keystringrequired

A unique Idempotency key to make sure that requests with the same key result in only one outbound request

metadataobject

A 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>required

Unique refund ID

charge_idstring <uuid>required

Unique charge ID (payment ID) associated with the checkout session

statusobjectrequired

Refund status: pending, completed, failed * `pending` - pending * `completed` - completed * `failed` - failed

amountintegerrequired

Total refund amount in the major currency unit (e.g., USD, AED)

Min: 1

currencystringrequired

Currency code (ISO 4217 format, e.g., USD, INR, AED)

Max length: 3

refund_timestring <date-time>required

ISO timestamp of refund

reasonstring

Reason for refund (if provided)

reference_idstring

Reference ID passed in the request

metadataobject

A 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": {}
}