Optimized Debit Routing
Test and go live
- 5208233085365191 (Mastercard)
- 4070021557035923 (Visa)
Auto-retry
If a transaction routed to the debit network is not successful, Braintree can retry the transaction over Visa or Mastercard networks. Reach out to your technical account manager to get enabled for auto-retries.
The debit network is empty during a successful retry, because the retry will be routed on Visa, Mastercard networks.
If the retry attempt proves unsuccessful as well, the initial transaction is recorded as a failed retry along with both the original and all subsequent retried transaction IDs.
getRetriedTransactionId()
: The transaction ID of the transaction that was retriedgetRetryIds()
: An array of transaction IDs for all retry attempts for this transactionisRetried()
: Returns true if the transaction is retried; otherwise false
- Javasample
if (authResult.isSuccess()) {
Transaction transaction = authResult.getTarget();
transaction.getId();
transaction.isRetried();
transaction.getStatus();
transaction.getRetryIds();
transaction.getRetriedTransactionId();
// Corrected line
// ... transaction.getDebitNetwork();
}
- Successfulretry
"transaction": {
"id": "5p4z558e", // other fields...
"retriedTransactionId": "79cv9vpc", // this shows the parent transaction that failed initially
"retried": true,
"debitNetwork": null
}
- Failedretry
"transaction": {
"id": "79cv9vpc", // other fields...
"retryIds": [
"02scmpqn",
"5p4z558e"
],
"retried": true,
"debitNetwork": "STAR"
}
Testing auto-retry
To test a retry of a PINless debit transaction in a sandbox environment, set the transaction amount to 2046. Please note that this is a negative test-case, the transaction will be unsuccessfully routed to a debit network, and the retry will be over Visa, or Mastercard network, and this will also result in failure.