Loading...
Refunds

Refunds via the API

How to check for refund eligibility and request a refund via the Volt API.


Checking eligibility

Before you request a Refund you should check whether a refund can be given for the payment. Examples of where a payment may not be eligible could be if you've already processed a full or partial Refund, or its status is neither RECEIVED or SETTLED. This means that the funds for a transaction did not arrive yet. You can find more information on payment statuses .

Request location

GET https://api.sandbox.volt.io/payments/{paymentId}/refund-details

Response

The response will contain the following information if the refund is available:

{
  "refundAvailable": true,
  "remainingDays": 365,
  "availableAmount": 500,
  "refundedAmount": 0,
  "numberOfRefunds": 0,
  "message": null,
  "code": null
}

Or a message and code if it’s not:

{
  "refundAvailable": false,
  "remainingDays": 365,
  "availableAmount": 0,
  "refundedAmount": 500,
  "numberOfRefunds": 1,
  "message": "Payment with id: 0da43922-e01d-4c7f-8a63-0d8da56459be has been fully refunded.",
  "code": "PaymentRefundBalanceIsNotAvailable"
}
Response fields
FieldDescription
refundAvailablea flag that tells you whether a refund can be created for this payment
remainingDaysthe number of days before a refund can no longer be processed
availableAmountthe amount that can still be refunded
refundedAmountthe corresponding amount that has been refunded already
numberOfRefundsthe number of refunds applied to the original payment
messagea message to help you understand why the refund is not available
codea machine-readable code for the reason the refund is not available

Requesting a Refund

To request a Refund via the API you need to use the endpoint below.

Request location

POST https://api.sandbox.volt.io/payments/{paymentId}/request-refund

Request header

If you're using a Volt Account, you'll need to sign your request using an additional header. If you're using one of our Connected Accounts, you don't need to include this header. You can only test this on production, as this header is ignored on Sandbox.

Request body

For a full Refund of the payment amount

If you want to refund the full payment amount, the request body should be an empty JSON (no additional data is required).

{}
For a partial Refund

If you only want to Refund part of the payment you'll need to specify the amount and assign your unique external reference to the partial Refund.

{
  "amount": 1,
  "externalReference": "my-external-reference"
}
Request form parameters
  • amount is the amount you want to refund (in minor units)
  • externalReference should be a maximum of 40 characters and should contain letters and numbers only. It is the reference you want to use for this Refund

Creating a partial Refund for the full payment amount is equivalent to creating a full Refund.

How is this guide?

Last updated on

On this page