Testing Voids

Voids cannot be performed on pre authorisations that have been collected (partial or full).

 

Card Void Scenarios (Positive Flow)

Important to Consider

  • Ensure the Preauth Transactions permission is enabled on your API credentials.

  • Ensure you have the correct receiptId for the original pre authorisation.

    • This is required for you to process the void.

  • Voids cannot be performed on pre authorisations that have expired, or been collected (partial or full).

 

To simulate voiding a pre authorised transaction:

Suggested Test Scenario

Expected Outcome Tip
Process a void on the full preAuth amount.

200

Successful

Ensure you have the correct receiptId for the original pre authorisation.

 

Request Parameters

Sandbox endpoint: https://api-sandbox.judopay.com/transactions/voids

HTTP Method: POST

 

Body Parameters:

 

 

Request Example:

 

Response

Response Example:

 

Card Void Scenarios (Negative Flow)

Declines can occur for various reasons, it can be impossible to simulate all the negative flows in a sandbox environment.

Important to Consider:

  • How your app handles negative flows

  • Your customer's experience should a negative flow occur:

    • Logic to communicate error messages

    • Customise how your app responds

  • How to maintain application consistency

 

Follow our suggested guidelines to simulate negative scenarios, to test your app’s error handling:

Suggested Negative Test Scenario

Expected Error Code

Error Description

Attempt to void a preAuth that has already been voided.

51

Sorry, but it looks like the transaction you are trying to void has already been voided.

Attempt to void a preAuth that has already been collected.

52

Sorry, but it looks like the transaction you are trying to void has already been collected.

Attempt to void an amount that is different to the preAuth amount.

53

Sorry, but it looks like the void you are trying to process is for a different amount than the original preauth.

Attempt to void an expired preAuth .

42

Sorry, it looks like the PreAuth you are referencing has expired.

Attempt to void using the receiptId for a payment instead of a preAuth.

68

Sorry, but your void request is not valid. Please check your details and try again.

Where the codes remain fixed, the descriptions may change. You should not build any error handling logic based on these descriptions.

For a list of possible error codes, types and descriptions, see Error Codes and Descriptions

 

Related Topics