Processing a Recurring eCheck Debit Transaction Using the REST API
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:
- Create the message with the required API fields.
- Send the message to one of these endpoints:
- Production:POSThttps://api.cybersource.com/pts/v2/payments
- Test:POSThttps://apitest.cybersource.com/pts/v2/payments
- Verify the response messages to make sure that the request was successful. A 200-level HTTP response code indicates success.
Required Fields for a Recurring eCheck Debit Transaction
- clientReferenceInformation.code
- orderInformation.amountDetails.currency
- Value must be set toUSD.
- orderInformation.amountDetails. totalAmount
- This field is required if you do not submitorderInformation.lineItems[].unitPriceandorderInformation.lineItems[].quantity.
- orderInformation.billTo. address1
- orderInformation.billTo.administrativeArea
- Set the value to a valid USPS two-letter state or possession abbreviation.
- orderInformation.billTo. country
- Set the value toUS.
- orderInformation.billTo.email
- orderInformation.billTo.firstName
- orderInformation.billTo.lastName
- orderInformation.billTo.locality
- orderInformation.billTo.phoneNumber
- orderInformation.billTo.postalCode
- paymentInformation.bank.account.number
- paymentInformation.bank.account.type
- paymentInformation.bank.routingNumber
- paymentInformation.paymentType.name
- Set the value tocheck.
- processingInformation.commerceIndicator
- Set the value torecurring.
- processingInformation.recurringOptions. firstRecurringPayment
- If this is the first payment in the recurring series of payments, set the value totrue. For each subsequent payment in the series, set the value tofalse.
REST Example: Recurring eCheck Debit Transaction
Request
12345678910111213141516171819202122232425262728293031323334353637{"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
12345678910111213{"id": "16681201582270123456789", "reconciliationId": "9PK9Y6A8A75018I", "submitTimeUtc": "2022-11-10T22:42:38Z", "status": "PENDING", "clientReferenceInformation": { "code": "TC123" }, "orderInformation": { "amountDetails": { "currency": "USD", "totalAmount": "1200" } }}