Skip to main content
POST
/
payment-orders
/
{id}
/
refund
Refund a payment order
curl --request POST \
  --url http://localhost:3156/payment-orders/{id}/refund \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-merchant-id: <api-key>' \
  --data '{
  "amount": 50
}'
{
  "id": "856b4a29-a7e5-4726-87d4-77e55d5ecfbf",
  "status": "PENDING_CAPTURE",
  "paymentMethodType": "SPEI",
  "amount": "200.99",
  "refundedAmount": "0.00",
  "paymentMethodId": "<string>",
  "createdAt": "2025-05-19T18:14:32.424Z",
  "updatedAt": "2025-05-19T18:14:32.523Z"
}

Authorizations

x-api-key
string
header
required

API key for authentication (required)

x-merchant-id
string
header
required

Merchant ID for identifying the merchant (required)

Path Parameters

id
string
required

Payment order external ID

Body

application/json
amount
number
required

Refund amount

Required range: x > 0
Example:

50

Response

Payment refunded successfully

id
string<uuid>
required

Unique identifier for the payment

Example:

"856b4a29-a7e5-4726-87d4-77e55d5ecfbf"

status
enum<string>
required

Status of the payment

Available options:
CREATED,
PENDING_AUTHORIZATION,
AUTHORIZED,
PARTIALLY_AUTHORIZED,
REQUIRES_ACTION,
PENDING_CAPTURE,
CAPTURING,
CAPTURED,
PARTIALLY_CAPTURED,
PENDING_SETTLEMENT,
SETTLED,
PENDING_CANCELLATION,
FAILED,
CANCELLED,
PENDING_REFUND,
PARTIALLY_REFUNDED,
REFUNDED,
DISPUTED,
EXPIRED
Example:

"PENDING_CAPTURE"

paymentMethodType
enum<string>
required

Type of payment method used

Available options:
CARD,
SPEI
Example:

"SPEI"

amount
string

Payment amount in string format

Example:

"200.99"

refundedAmount
string

Refunded amount in string format

Example:

"0.00"

paymentMethodId
string

CLABE or Card number

createdAt
string<date-time>

Timestamp when the payment was created

Example:

"2025-05-19T18:14:32.424Z"

updatedAt
string<date-time>

Timestamp when the payment was last updated

Example:

"2025-05-19T18:14:32.523Z"