Process a Direct Debit Sale

Processing a direct debit requires sending a sale request to the inter-bank system. You must include the mandate ID in the sale request. A successful sale response includes a request ID that is required for any follow-on services.
Only merchants who have a
Cybersource
settlement services account can process a direct debit and any of the follow-on services. For more information about merchant account types, see Merchant Account Types.
A direct debit settles through a batching process. For more information, see Direct Debit Batching Schedule.

Shipping Policy

Cybersource
recommends shipping the purchased goods after the direct debit status is settled.

Endpoints

Set the
apSaleService_run
field to
true
, and send the request to one of these endpoints:
Production:
https://ics2ws.ic3.com/commerce/1.x/transactionProcessor
Test:
https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor

Response Statuses

This table describes the possible statuses that you can receive in a sale response message. The status is found in the
apSaleReply_paymentStatus
field.
Response Statuses for Processing a Direct Debit Sale
Cybersource
Status
Description
Response Time
Chargeback
The customer claimed that the goods were not sent. The merchant can proceed with one of these actions:
  • Present the customer's mandate to their bank, prove the charge is valid, and verify that the goods were sent.
  • Charge back to the customer's account.
D +13 months
Failed
The sale request failed. The sale request was not accepted. For example, the currency provided was incorrect. Direct debits in the
SEPA
scheme must be in British pounds sterling (
EUR
). A direct debit sent with any other currency is rejected.
Immediate in the API response.
Pending
The processor accepted the sale request, but the sale is not settled. Send a check status request for status updates. See Check a Direct Debit Status.
Immediate in API response.
Settled
The direct debit was completed, and the customer is not expected to return the goods. You can begin shipping the purchased goods.
D + 5
Settle_accepted
The
SEPA
scheme executed the direct debit.
The customer's bank sent the funds to the merchant account.
Funds can be pulled back by the customer's bank for no reason for up to five days after the debit is executed (until D+3 days). If the funds are pulled back, the status changes to Returned.
D
Settle_initiated
The processor sent the direct debit request to the
SEPA
scheme 1 day before the execution date (D-1 day).
Set the execution date in the sale request. If the merchant did not set the execution date, the processor sent the direct debit to the
SEPA
scheme in the next scheduled batch. When the processor sends the direct debit, the execution date is set to the day after the batch operation.
D - 2
Settle_rejected
The
SEPA
scheme rejected the direct debit request.
A direct debit can be rejected for several reasons, such as when the IBAN is closed or the customer has non-sufficient funds.
D - 2 to D
Returned
The direct debit is returned by the customer's bank.
D to D + 5
Reversed
The direct debit was canceled during the
settle_accepted
status.
D to D + 5
D is the date on which the direct debit is executed.
D + is the count of business days after the execution date.
D - is the count of business days before the execution date.
The sale service also responds with a reason code in the
apSaleReply_reasonCode
field. For more information about reason codes, see the Reason Codes for SEPA Direct Debits for the Simple Order API.

Successful Sale Batching Schedule

Direct debit sales are settled on a batching schedule and progress through a series of statuses before the transaction is complete. These are the statuses a successful sale progresses through in the order in which they occur:
  1. Pending
  2. Settle_initiate
  3. Settle_accepted
  4. Settled
For more information about the direct debit batching schedule and statuses, see Direct Debit Batching Schedule.

Required Fields for Processing a Direct Debit

Cybersource
recommends including specific customer data fields for export compliance verifications as part of the sale service request. If a customer’s first name and last name or company name appears on any of the lists that are maintained by government agencies to support export controls, you receive information indicating that the transaction is declined. To include additional customer data, see Optional Fields for Processing a Direct Debit.
Set to
STS
.
Set to
true
.
mandateID
Set to
sepa
.
Set to
EUR
.
The value cannot exceed 11 digits and the maximum total amount cannot exceed 20 Million
EUR
.

Test Triggers for Processing Direct Debits

To test the status of a direct debit sale request, see Test Triggers for Checking Statuses.

Simple Order Example: Processing a Direct Debit

Light Dark
Request
123456789101112
<="urn:schemas-cybersource-com:transaction-data-1.214"> <merchantID>test-merchant</merchantID> <merchantReferenceCode>refnum-4321</merchantReferenceCode> <paymentScheme>sepa</paymentScheme> <mandateID>12345678912345</mandateID> <purchaseTotals> <currency>EUR</currency> <grandTotalAmount>20.00</grandTotalAmount> </purchaseTotals> <apPaymentType>STS</apPaymentType> <apSaleService run="true"/> </requestMessage>
Response to a Successful Request
123456789101112131415161718192021222324252627
<replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.214"> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <requestID>7098276691046386503008</requestID> <decision>ACCEPT</decision> <reasonCode>100</reasonCode> <requestToken>AxjnrwSTgMxgsjmXDg1g//8ZYjWmdmpHhRpraKnvv3nGgmdC/oH8cMmkmXoxX9xYJOAzGCyOZcODWAAXXXXX</requestToken> <purchaseTotals> <currency>EUR</currency> </purchaseTotals> <exportReply> <reasonCode>100</reasonCode> <ipCountryConfidence>-1</ipCountryConfidence> </exportReply> <apReply> <transactionExpirationDate>20240313</transactionExpirationDate> </apReply> <apSaleReply> <reasonCode>100</reasonCode> <paymentStatus>pending</paymentStatus> <responseCode>00001</responseCode> <processorTransactionID>TN2ELT6W8Z3KVPG8P&</processorTransactionID> <reconciliationID>XFZ3YTGBFM6E</reconciliationID> <amount>20.00</amount> <processorResponse>00001</processorResponse> <dateTime>2024-03-07T16:07:50Z</dateTime> </apSaleReply> </replyMessage>