Refund an order
POST
/orders/{id}/refundAuthorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredRequest body
requiredapplication/jsonamountintegerRefund amount in cents
descriptionstringreasonstringAllowed:
duplicatefraudulentcustomer_requestotherauthorization_codestringReference code for manual refunds
manualbooleanSkip the payment gateway and record the refund directly
default: false
Responses
200Refund processed
idintegerorder_idintegeramountintegerAmount in cents (negative for refunds)
absolute_amountintegerAbsolute value of `amount` in cents
successfulbooleancard_token_idintegerpayment_method_typestringtransaction_idstringGateway transaction ID
authorization_codestringdescriptionstringcreated_atstring<date-time>422Order is not refundable, or amount exceeds max_refundable_amount
Request
curl -X POST "https://api.onbolder.com/v2/orders/string/refund" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 2500,
"reason": "customer_request"
}'const response = await fetch("https://api.onbolder.com/v2/orders/string/refund", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"amount": 2500,
"reason": "customer_request"
})
});import requests
response = requests.post(
"https://api.onbolder.com/v2/orders/string/refund",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"amount": 2500,
"reason": "customer_request"
},
)Response
{
"id": 0,
"order_id": 0,
"amount": 0,
"absolute_amount": 0,
"successful": true,
"card_token_id": 0,
"payment_method_type": "string",
"transaction_id": "string",
"authorization_code": "string",
"description": "string",
"created_at": "2019-08-24T14:15:22Z"
}Order is not refundable, or amount exceeds max_refundable_amount