On This Page

{#jumplink-list}  
[Markdown](/docs/cybs/en-us/echeck/user/all/rest/echeck-user-guide/echeck-api-intro/echeck-api-recurring-intro.md)  
Filter  
FILTER BY TAG

Processing a Recurring eCheck Debit Transaction Using the REST API {#echeck-api-recurring-intro}
================================================================================================

This section shows how to process a recurring eCheck debit transaction using the REST API.

Processing a Recurring eCheck Debit Transaction
-----------------------------------------------

Follow these steps to process a recurring eCheck debit transaction:

1. Create the message with the required API fields.
2. Send the message to one of these endpoints:
   * Production: `POST ``https://api.cybersource.com``/pts/v2/payments`
   * Test: `POST ``https://apitest.cybersource.com``/pts/v2/payments`
3. Verify the response messages to make sure that the request was successful. A 200-level HTTP response code indicates success. See [Transaction Response Codes](https://developer.cybersource.com/api/reference/response-codes.md "").

Required Fields for a Recurring eCheck Debit Transaction {#echeck-api-recurring-req-fields}
===========================================================================================

[clientReferenceInformation.code](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/client-ref-info-aa/client-ref-info-code.md "")
:

[orderInformation.amountDetails.currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-currency.md "")
:
Value must be set to `USD`.

[orderInformation.amountDetails.totalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-total-amount.md "")
:
This field is required if you do not submit orderInformation.lineItems\[\].unitPrice and orderInformation.lineItems\[\].quantity.

[orderInformation.billTo.address1](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-address1.md "")
:

[orderInformation.billTo.administrativeArea](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-admin-area.md "")
:
Set the value to a valid USPS two-letter state or possession abbreviation.

[orderInformation.billTo.country](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-country.md "")
:
Set the value to `US`.

[orderInformation.billTo.email](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-email.md "")
:

[orderInformation.billTo.firstName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-first-name.md "")
:

[orderInformation.billTo.lastName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-last-name.md "")
:

[orderInformation.billTo.locality](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-locality.md "")
:

[orderInformation.billTo.phoneNumber](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-phone-num.md "")
:

[orderInformation.billTo.postalCode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-postal-code.md "")
:

[paymentInformation.bank.account.number](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-bank-account-num.md "")
:

[paymentInformation.bank.account.type](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-bank-account-type.md "")
:

[paymentInformation.bank.routingNumber](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-bank-routing-number.md "")
:

[paymentInformation.paymentType.name](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-payment-type-name.md "")
:
Set the value to `check`.

[processingInformation.commerceIndicator](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/processing-info-aa/processing-info-commerce-ind.md "")
:
Set the value to `recurring`.

[processingInformation.recurringOptions.firstRecurringPayment](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/processing-info-aa/processing-info-recurring-ops-first-recurring-payment.md "")
:
If this is the first payment in the recurring series of payments, set the value to `true`. For each subsequent payment in the series, set the value to `false`.

REST Example: Recurring eCheck Debit Transaction {#echeck-api-recurring-example}
================================================================================

Request

```
{
    "processingInformation": {
        "commerceIndicator": "recurring",
        "recurringOptions": {
            "firstRecurringPayment": true
        },
    "orderInformation": {
        "billTo": {
            "country": "US",
            "firstName": "Jane",
            "lastName": "Doe",
            "phoneNumber": "2053040804",
            "address1": "112 12 Ave",
            "postalCode": "98004",
            "locality": "Bellevue",
            "administrativeArea": "WA",
            "email": "test@example.com"
        },
       "amountDetails": {
            "currency": "USD",
            "totalAmount": 1200
        }
    },
    "clientReferenceInformation": {
        "code": "TC123"
    },
    "paymentInformation": {
        "bank": {
            "routingNumber": "071923284",
            "account": {
                "number": "12345678901234567",
                "type": "C"
            }
        },
        "paymentType": {
            "name": "check"
        }
    }
}
```

Response to a Successful Request

```
{
    "id": "16681201582270123456789",
    "reconciliationId": "9PK9Y6A8A75018I",
    "submitTimeUtc": "2022-11-10T22:42:38Z",
    "status": "PENDING",
    "clientReferenceInformation": {
        "code": "TC123"
    },
    "orderInformation": {
        "amountDetails": {
            "currency": "USD",
            "totalAmount": "1200"
        }
    }
}
```

RELATED TO THIS PAGE

