Create a refund
POST/refunds
When you create a new refund, you must specify a Charge on which to create it.
Creating a new refund will refund a charge that has previously been created but not yet refunded.
Funds will be refunded to the credit or debit card that was originally charged.
Once entirely refunded, a charge can’t be refunded again. This method will return an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge.
Request
- application/json
Body
required
Possible values: <= 36 characters, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
UUID v4
Possible values: <= 36 characters, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
UUID v4
Possible values: <= 36 characters, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
UUID v4
amount
object
Money representation
Possible values: <= 9999999999
Amount expressed in cents. 1 USD should be submitted as 100 cents
ISO 4217 representation of the currency
Possible values: [duplicate, fraudulent, requested_by_customer]
String indicating the reason for the refund. If set, possible values are duplicate, fraudulent, and requested_by_customer. If you believe the charge to be fraudulent, specifying fraudulent as the reason will help us improve our fraud detection algorithms.
Possible values: <= 255 characters
Description for this refund
Responses
- 200
- 202
- 401
- 403
- 409
- 422
- 500
Refund created successfully
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [success]
Possible values: [200]
Possible values: [Successful request]
{
"status": "success",
"code": 200,
"message": "Successful request"
}
Refund was initiated but is not yet confirmed by the bank.
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [pending]
Possible values: [202]
Possible values: [Pending request]
{
"status": "pending",
"code": 202,
"message": "Pending request"
}
Access token is missing or invalid
Access denied
Refund creation failed due to a conflict in the provided entity
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [fail]
Possible values: [409]
Failure reason
{
"status": "fail",
"code": 409,
"message": "Entity with Id already exists"
}
Refund creation failed due to validation failure
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [error]
Possible values: [422]
{
"status": "error",
"data": {
"dob": {
"day": "Value expected to be 'integer', 'string' given."
}
},
"code": 422,
"message": "cannot process the provided entity"
}
Server error