Create a Refund
To process a refund you will need to make a request to the /refunds
endpoint. This request is made using the checkout Id returned by Twisto in your /checkouts
API call.
Refund is only available after charge has been captured. To cancel the checkouts in other states, please use CheckoutCancel request Refer to the status flow for more details.
This API call will contain:
- Reference (optional) - is required only in case of manual refund settlement to be used in bank transfer
- Checkout_id
- Reason
- Amount
The Twisto API response will contain:
- Id - a unique reference for your refund
- Checkout_Id - The original charge id of the refunded order
- Reason
- Amount refunded
- Created date time
This /refunds
API call should be made from your server and not directly from the client front end. Generally, this is triggered from your order management system.
Checkout Id
Twisto requires the original order checkout ID to process a refund. This will have been obtained from the initial checkout API call to Twisto
Here is an example of how this information can be passed:
{
"checkout_id": "string"
}
Bulk vs 1:1 payments
There are 2 types of refund processing: bulk (for batch settlement) and manual (for 1:1 settlement).
In case you are using bulk payments, the refund will automatically get reduced from your daily batch payment.
In case of manual refunds, you will have to send the money to us manually. Please set the bank transfer id to exact value of reference
in the refund API call.
Partial and full refunds
Full or partial refunds can be processed against the original order.
We call the refund full
when the refund amount equals to the order amount.
We also support partial
refunds, in which the refund amount is lower than order refund, e.g. when returning one out of many items in the order. If the customer is to return a single item from a purchase that included multiple items, only the value of the item to be refunded should be passed to Twisto in refund request.
If one checkout already contains a refund (e.g. checkout amount was 100CZK and 20CZK are already refunded) and the customer wants to return the rest of the checkout items, the refund request value should equal the remaining order amount (80CZK), otherwise the API will respond with the error.
Refund Reason
The refund reason is passed for your reference purposes if recalling the refund data from Twisto at a later time.
Here is an example of how this information can be passed:
{
"reason": "Unwanted item",
"amount": 5
}
The full request
An example payload can be found below:
{
"reference": "string",
"reason": "Unwanted item",
"amount": 5,
"checkout_id": "string"
}