Testing on Sandbox

We have created an automated process to enable you to test both CONFIRMED and FAILED scenarios using our Sandbox environment by simply varying the amount of the refund.

Refund test cases
To test status Set this amount
REFUND_FAILED "amount": 1177
REFUND_CONFIRMED any other

Testing the signing of your refund request can only be completed in the production environment.   We suggest creating a small payment then creating a refund for this amount to test that your signature works. 

Test a failed refund

You can test a failed refund using Fuzebox or the Connect API once you’ve created a payment and received a payment_received notification for it.  It’s important that when you’re creating your refund, you use a value of exactly 1177.  This will automatically trigger the refund to fail when you request it.


Using Fuzebox

  • In Fuzebox, create a refund with an amount of 1177 minor units. 
Check the status
  • The refund should transition to the REFUND_FAILED status
Check the notification
  • You should receive the corresponding refund notification with the X-Volt-Type of refund_failed in your payment notifications endpoint

Using the API

  • Using the Volt API, create a payment with an amount of 1177 minor units.
  • Send this payment using the Volt Mock Bank
  • Wait until you receive the payment_received notification
  • Send a full refund request for that payment ID – simply POST a body containing empty JSON to /payments/paymentId/request-refund
POST https://api.sandbox.volt.io/payments/{paymentId}/request-refund
{}
Testing with the full amount
  • You could alternatively send the full amount of 1177 as the amount.  The result will be the same, a REFUND_FAILED status.
POST https://api.sandbox.volt.io/payments/{paymentId}/request-refund
{
  "amount": 1177
}
Check the status
  • The refund should transition to the REFUND_FAILED status
Check the notification
  • You should receive the corresponding refund notification with the X-Volt-Type of REFUND_FAILED in your payment notifications endpoint