> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retry Strategy and Grace Period Handling for Failed Transactions

## Overview

For the External Billing payment method, MarketONE provides the capability to retain a customer by not canceling their subscription upon initially failed renewals transactions. MarketONE allows Merchants to configure the retry strategy to keep the subscription active on the platform for the opportunity to recover the payment before the grace period ends.

For successful transactions, Resellers (Service Providers) do not need to send any response, and the transaction status is captured. A retry strategy is triggered when a Reseller sends an error response on a transaction to MarketONE.

## Retry Strategy

| Definition | Configuration Setting | Example | |
| - | - | - | - |
| Retry Duration | The time span between subsequent retry attempts. First retry attempt: X days after the initial failure. Subsequent attempts: X days after previous retry. | MERCHANT\_OPTIONS :CASHBOX\_FIRST\_RETRY\_DAYS | 1 Day |
| | | MERCHANT\_OPTIONS :CASHBOX\_OTHER\_RETRY\_DAYS | 2 Days |
| Retry Attempts | Number of attempts upon receiving a soft error on a transaction. MarketONE will retry until the attempts run out. MarketONE will not make subsequent attempts if no response is received. | MERCHANT\_OPTIONS : CASHBOX\_MAX\_RETRIES | 3 Days |
| | The retry number will be included in the transaction object under metadata. | | `"metadata": [ "value": "2", "name": "vin:RetryNumber" &#125; ]` |

## Grace Period

| Definition | Configuration Setting | Example |
| - | - | - |
| Grace Period is the total amount of time an entitlement will remain active in MarketONE before the subscription is canceled for non-payment. The grace period kicks in after initial billing attempt.The grace period is independent from the retrial mechanism: stopping the retries does not automatically cancel the subscription. If the grace period is set to 0, no retry will happen. If the grace period is less than the retry, the subscription will cancel. It will not attempt all retries. The grace period can be set in two ways: Merchant configuration, and overriding the Merchant configuration by defining the grace period on the billing plan. | MERCHANT\_OPTIONS : CASHBOX\_EXPIRATION\_OFFSET<img src="https://mintcdn.com/amdocs-spbu/v6XW4z-1DbX5IGa9/marketONE/aggregatorAPIGuide/images/BillingPlans.png?fit=max&auto=format&n=v6XW4z-1DbX5IGa9&q=85&s=99a617bcaef616376c59300eb48e4c82" alt="Billing Plans" width="2390" height="1176" data-path="marketONE/aggregatorAPIGuide/images/BillingPlans.png" /> | 7 Days |

## Error Codes

| Definition | Configuration Setting | Example |
| - | - | - |
| Return codes received from the external payment processor can be categorized either as "Soft-Error" or "Hard-Error".**Soft-Error** represents payments that may be recoverable by MarketONE. Soft-Fail error codes are subject to the retry processing. A soft error indicates a possible fix, the system keeps trying. The subscription will be canceled and disentitled after grace period ends. **Hard-Error** represents payments that cannot be recovered. A Hard Error can’t be fixed by a simple retry. The system stops trying. The subscription will be canceled and disentitled after the grace period ends. | The soft error and hard error code should be defined in the MarketONE Pre-Onboarding Questionnaire from a Reseller (Service Provider). The value is used to while configuring the Merchant in MarketONE. | "Error\_Code": "Soft""Error\_Code": "Hard" |

## Uses Cases

**Soft Error - Cancellation After Grace Period**

<img src="https://mintcdn.com/amdocs-spbu/v6XW4z-1DbX5IGa9/marketONE/aggregatorAPIGuide/images/SoftError.png?fit=max&auto=format&n=v6XW4z-1DbX5IGa9&q=85&s=e052e5bc43bfc2f819e3a6cc8275a197" alt="Soft Error - Cancellation After Grace Period" width="1750" height="989" data-path="marketONE/aggregatorAPIGuide/images/SoftError.png" />

**Hard Error - Cancellation After Period**

<img src="https://mintcdn.com/amdocs-spbu/v6XW4z-1DbX5IGa9/marketONE/aggregatorAPIGuide/images/HardError.png?fit=max&auto=format&n=v6XW4z-1DbX5IGa9&q=85&s=9f7990d1daaeada173de099cf00191b7" alt="Hard Error - Cancellation After Period" width="1750" height="980" data-path="marketONE/aggregatorAPIGuide/images/HardError.png" />

## Sample

| Error Type | Error Details | Reason / Intermediate Status | Final State |
| - | - | - | - |
| File Transfer Error | `[ &#123; "id":"999", "vid":"999", "TRX_index":"999", "error_Code":"999", "file_Name":"VNDC_CHARGES_20210428013221.JSON" &#125; ]` | This type of error should be returned to MarketONE if the consumer system couldn't read the charge injection file due to a corrupted charge injection file, an incomplete transfer of the charge injection file, or a parsing error with the charge injection file. **Expected values**: - Billing\_state: Good Standing - Autobill\_state: Active | MarketONE will send the transactions again in a new charge injection file. |
| Soft Error | `&#123; "id":"AMD100001632", "Vid":"3d4848f8a30f3877d6fff0f6738b7748845c23ad", "TRX_index":"1", "Error_Code":"Soft" &#125;` | The external payment processor manages the payment method of the end customer. The reason for the soft error can be temporary suspension because a change in payment details is needed. Returning a soft error means that the Reseller (Service Provider) still has a chance to collect payment from the customer. **Expected values**: - Billing State: In Retry / Grace Period/Unknown/Unusable PaymentMethod - Subscription State: Active | MarketONE will retry again. MarketONE will cancel the subscription when the grace period ends (that is, the subscription end date has passed).**State when subscription is canceled**: - Billing State: Failed to collect - Subscription State: Canceled |
| Hard Error | `&#123; "id":"AMD1000013234", "Vid":"3d4848f8a30f3877d6fff0f6738b7748845c23ad", "TRX_index":"1", "Error_Code":"Hard" &#125;` | The reason for a Hard error can be account termination due to a failed payment method. Returning a hard error means that the Reseller (Service Provider) has no chance to collect payment from the customer. **Expected values:** - Billing State: Grace Period/Unusable PaymentMethod - Subscription State: Active | No Retry Attempts. MarketONE will cancel the subscription when the grace period ends (that is, the subscription end date has passed).**State when subscription is canceled:** - Billing State: Failed to collect - Subscription State: Canceled |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.