/refund

This API allows you to initiate full or partial refunds on orders that were charged through FlexCharge.

Request

curl --request POST \
     --url https://api-sandbox.flex-charge.com/v1/orders/{id}/refund    //insert orderSessionKey returmed by the response to /evaluate
         --header 'Authorization: abc123def456' \   //replace with bearer returned by /oauth2
     --header 'accept: application/json' \
     --header 'content-type: application/*+json' \
     --data '
{
  
  "amountToRefund": 1200,
 
}

❗️

Prerequisites to invoke this API:

Parameters

{id}StringRequiredPath parameter.
FlexCharge's unique transaction identifier.
Same value as orderSessionKey returned by /evaluate and/or /outcome and/or webhook and/or batch response file.
amountToRefundIntegerRequiredIn cents
$19.99 -> '1999'
refundMessageStringOptionalAdditional message you want to send with the request.
E.g.: "Customer request"

Try it right now:


Response

{
   "status": "SUCCESS | FAILED",
   "success": true,
   "result": null,
   "statusCode": null,
   "errors": [],
   "customProperties": {}
}
statusstringsuccess / fail
successbooleanIndicates if the API request was successful
resultstringThe result of the API request
Optional
statusCodestringThe status code of the API request
Optional
errorsarray of stringAny errors encountered during the API request
Optional
customPropertiesobjectAdditional custom properties for the API request
Optional