Skip to main content
POST
/
v1
/
checkout
/
{id}
/
refund
cURL
curl --request POST \
  --url https://api.nomod.com/v1/checkout/{id}/refund \
  --header 'Content-Type: */*' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "amount": "<string>",
  "reason": "<string>",
  "reference_id": "<string>",
  "idempotency_key": "<string>",
  "metadata": {}
}'
{
  "refund_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "charge_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "pending",
  "amount": 2,
  "currency": "<string>",
  "refund_time": "2023-11-07T05:31:56Z",
  "reason": "<string>",
  "reference_id": "<string>",
  "metadata": {}
}

Authorizations

X-API-KEY
string
header
required

Your API key. This is required by all endpoints to access our API programatically. You can view your API Key by navigating to the app settings

Path Parameters

id
string
required

Body

*/*
amount
string<decimal>
required

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

idempotency_key
string
required

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

reason
string

Reason for refund (to be displayed in records)

reference_id
string

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

metadata
object

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.

Response

refund_id
string<uuid>
required

Unique refund ID

charge_id
string<uuid>
required

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

status
enum<string>
required

Refund status: pending, succeeded, failed

  • pending - pending
  • completed - completed
  • failed - failed
Available options:
pending,
completed,
failed
amount
integer
required

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

Required range: x >= 1
currency
string
required

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

Maximum length: 3
refund_time
string<date-time>
required

ISO timestamp of refund

reason
string

Reason for refund (if provided)

reference_id
string

Reference ID passed in the request

metadata
object

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.

I