Retrying Declined Transactions

If a transaction is declined the subscription status will become past due. We will automatically retry the declined transaction up to 2 additional times, but you can also request a retry. If the transaction is authorized, the subscription balance will be reduced to $0 and status will return to active unless the subscription is past its end date. If it is past its end date it will become expired.

Submitting For Settlement

When manually retrying a declined transaction, it will not automatically be submitted for settlement. A follow up api call should be made to submit the transaction for settlement.

Transaction authorizedTransaction = gateway.subscription().retryCharge(
    subscription.getId()
).getTarget();
Result<Transaction> result = gateway.transaction().submitForSettlement(
    authorizedTransaction.getId()
);
result.isSuccess();
// true

Amount for Transaction

By default, we will use the subscription balance when retrying the transaction. Given a $12 subscription that is one billing cycle past due, the transaction amount will be $12. If the subscription is 3 billing cycles past due, the transaction amount will be $36. If you would like to use a different amount you can specify the amount for the transaction.

Transaction authorizedTransaction = gateway.subscription().retryCharge(
    subscription.getId(),
    new BigDecimal("24.00")
).getTarget();
Result<Transaction> result = gateway.transaction().submitForSettlement(
    authorizedTransaction.getId()
);
result.isSuccess();
// true

Regardless of the amount, if the transaction is authorized, the subscription status will return to active unless the subscription is past its end date. If it is past its end date it will become expired.

Add-ons and Discounts

If the subscription has add-ons and discounts with a specified number of billing cycles, the number of billing cycles are reflected in the subscription’s balance.

Example:

The subscription was charged successfully when it was created. It is now past due 2 billing cycles. The balance will be $34.00.

Since the add-on amount was only to be billed 2 billing periods and we have already billed it once successfully it will only be reflected in the balance one more time. This same logic applies to discounts as well.