refund
POST/v1/orders/:id/refund
refund
Request
Path Parameters
id stringrequired
Example: 0191f5a7-44d3-7430-8739-2d80821416bf
- application/json
Body
amount integerrequired
Possible values: >= 1
transaction_id string
Responses
- 200
- 400
- 401
- 403
- 422
returns success
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
id string
merchantobject
id string
acquirer_id string
name string
arabic_name string
merchant_id string
rule_precedence string
currency string
amount integer
captured_amount integer
refunded_amount integer
voided_amount integer
description string
created_at string
updated_at string
sourceobject
type string
issuer nullable
card_type nullable
category nullable
country_alpha2 nullable
scheme string
first_digits string
last_digits string
month integer
year integer
reauthorized_order_id nullable
airlineobject
reference string
sub_merchantobject
id string
registered_name string
trading_name string
email string
agreement nullable
transactionsobject[]
id string
status string
type string
source_type string
reverse_reason nullable
justification nullable
reversed_transaction_id nullable
message string
response_code string
retrieval_reference string
stan string
auth_code string
created_at string
amount integer
refunded_amount integer
{
"id": "string",
"merchant": {
"id": "string",
"acquirer_id": "string",
"name": "string",
"arabic_name": "string",
"merchant_id": "string",
"rule_precedence": "string"
},
"currency": "string",
"amount": 0,
"captured_amount": 0,
"refunded_amount": 0,
"voided_amount": 0,
"description": "string",
"created_at": "string",
"updated_at": "string",
"source": {
"type": "string",
"scheme": "string",
"first_digits": "string",
"last_digits": "string",
"month": 0,
"year": 0
},
"airline": {
"reference": "string"
},
"sub_merchant": {
"id": "string",
"registered_name": "string",
"trading_name": "string",
"email": "string"
},
"transactions": [
{
"id": "string",
"status": "string",
"type": "string",
"source_type": "string",
"message": "string",
"response_code": "string",
"retrieval_reference": "string",
"stan": "string",
"auth_code": "string",
"created_at": "string",
"amount": 0,
"refunded_amount": 0
}
]
}
{
"id": "0191f5a7-44a9-76c2-9fec-39709fdbf723",
"merchant": {
"id": "0191f5a7-44a5-7700-8c11-ffc3703a7990",
"acquirer_id": "0191f5a7-44a2-73d5-9a9c-745f40f8db31",
"name": "Merchant 52",
"arabic_name": "الإسم العربي",
"merchant_id": "60052",
"rule_precedence": "mixed"
},
"currency": "SAR",
"amount": 262346,
"captured_amount": 262346,
"refunded_amount": 262346,
"voided_amount": 0,
"description": "Voluptatum at consequatur ullam.",
"created_at": "2024-09-15T12:27:45Z",
"updated_at": "2024-09-15T12:27:45Z",
"source": {
"type": "card",
"issuer": null,
"card_type": null,
"category": null,
"country_alpha2": null,
"scheme": "mastercard",
"first_digits": "55555555",
"last_digits": "4444",
"month": 12,
"year": 2026
},
"reauthorized_order_id": null,
"airline": {
"reference": "576449881"
},
"sub_merchant": {
"id": "ecb0e32fd3d95b41cbf2ca9a9513a3",
"registered_name": "Rolfson-Legros",
"trading_name": "Hane-Jerde",
"email": "herschel@kilback-hamill.test"
},
"agreement": null,
"transactions": [
{
"id": "0191f5a7-44ab-7fbb-ab3c-1e1a98a5166e",
"status": "approved",
"type": "capture",
"source_type": "merchant",
"reverse_reason": null,
"justification": null,
"reversed_transaction_id": null,
"message": "APPROVED",
"response_code": "00",
"retrieval_reference": "886117264145",
"stan": "912425",
"auth_code": "663390",
"amount": 262346,
"refunded_amount": 0,
"created_at": "2024-09-15T12:27:45Z"
},
{
"id": "f351a2a3-97c4-4f12-add3-80c1044091f5",
"status": "approved",
"type": "refund",
"source_type": "merchant",
"reverse_reason": null,
"justification": null,
"reversed_transaction_id": null,
"message": "APPROVED",
"response_code": "00",
"retrieval_reference": "242590000001",
"stan": "000001",
"auth_code": null,
"amount": 262346,
"refunded_amount": 0,
"created_at": "2024-09-15T12:27:45Z"
}
]
}
fails when retries are exhausted
- application/json
- Schema
- Example (from schema)
- Example
Schema
message string
{
"message": "string"
}
{
"message": "Initial request is still processing."
}
returns unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
message string
{
"message": "string"
}
{
"message": "Missing authentication information"
}
returns forbidden
- application/json
- Schema
- Example (from schema)
- Example
Schema
message string
{
"message": "string"
}
{
"message": "Unauthorized"
}
returns unprocessable_entity
- application/json
- Schema
- Example (from schema)
- Example
Schema
message string
errorsobject
amount string[]
{
"message": "string",
"errors": {
"amount": [
"string"
]
}
}
{
"message": "Data validation failed",
"errors": {
"amount": [
"The value must be greater than or equal to 1."
]
}
}
Loading...