SEPA Direct Debit
REST API
SEPA Direct Debit is a type of Offline Bank Transfer.
Countries and Currencies
Countries |
The 28 EU Member States as well as Iceland, Liechtenstein, Monaco, Norway, and Switzerland. |
---|---|
Currencies |
EUR |
Communication Formats
This table illustrates how SEPA Direct Debit notifications are encoded and which formats and methods can be used for requests and responses.
Requests/Responses |
Format |
XML |
---|---|---|
Methods |
POST, GET |
|
IPN Encodement |
targeting the endpoint |
non-encoded |
targeting the endpoint |
Base64 |
Transaction Types
For transaction type details which are not given here look at Transaction Types.
Transaction Type | Description | Link to the Samples |
---|---|---|
authorization |
Verifies payment details for structural validity and/or generates a reference ID for the merchant (not mandatory). |
See samples. |
pending-debit |
Transaction is processed in the Wirecard Payment Gateway. |
|
void-pending-debit |
Voids a pending-debit. |
See samples. |
debit |
Transaction is processed by Wirecard Bank. |
|
debit-return |
The payment is returned by the consumer bank. See Return Codes. |
Recurring Transaction
The Wirecard Payment Gateway allows a merchant to submit recurring transactions for SEPA Direct Debit transactions.
To submit a recurring transaction, the merchant must submit a request with the transaction type debit or pending-debit including a PERIODIC TYPE and a SEQUENCE TYPE element.
Read which general restrictions have to be met to use a recurring transaction.
Additionally to the general restrictions, SEPA Direct Debit recurring transactions must meet the following restrictions:
-
The Account Holder IBAN, Account Holder BIC, Account Holder Name, Creditor ID, Mandate ID, and Mandate Signature Date must be the same for recurring and final transactions as was provided in the first transaction.
The following figure describes a possible flow of sequence types:
Referencing to a "FIRST" Recurring Transaction
A merchant must reference a pending-debit with sequence type recurring or final to an already existing pending-debit with sequence type first.
This is done by entering the transaction ID of the first transaction into the parent-transaction-id field within the recurring or final pending-debit request.
This results in the following:
-
Transactions will be referenced to each other and considered as part of the same group of transactions.
-
Fields provided in the first pending-debit will be copied into the recurring or final pending-debit.
If the merchant does not want any information to be copied, the information must be completely re-submitted as required for a regular pending-debit request.
The merchant may specify a new value for a field in a recurring or final pending-debit. However, the rest of the fields will still be copied from the first pending-debit.
There are exceptions to this point above. If the merchant specifies a new value within any of the following sections for a recurring or final pending-debit, the information previously submitted for any of the fields within this section in the first pending-debit will NOT be copied:
|
All Fields Copied
If Account Holder First Name, Account Holder Last Name, and Account Holder Gender are provided in the "first" transaction and a new Account Holder First Name is sent in the "recurring" or "final" transaction without an Account Holder Last Name and Gender, these fields will be copied from the "first" transaction.
The due date calculation of a recurring transaction is the same as for one-off transactions. Please refer to Due Date, which defines how to calculate a due date for each sequence type.
authorization
The Wirecard Payment Gateway allows a merchant to submit authorization transactions for SEPA Direct Debit payments.
To submit an authorization transaction, the merchant must submit a request with the transaction type authorization and the payment-method name SEPA Direct Debit.
The authorization transaction type is not mandatory to use for SEPA Direct Debit transactions. A transaction with type authorization is not sent on for further processing to the provider. It remains in the Wirecard Payment Gateway for future reference.
If the merchant sends a transaction request with transaction type authorization, the merchant will receive a Transaction ID in response which can be used to reference future pending-debit transactions.
A few reasons, among others, a merchant may decide to use the authorization transaction are the following:
-
to split a payment into two or more debits referencing one original authorization; or
-
to validate an end-customer’s banking details before sending in a pending-debit at a different time
A merchant is able to reference a pending-debit to an authorization by entering the authorization's transaction ID into the parent-transaction-id in the pending-debit request.
This results in the following:
-
Transactions will be referenced to each other and considered as part of the same payment.
-
Fields provided in the authorization will be copied into the pending-debit.
If the merchant does not want any information to be copied, the information must be completely re-submitted as required for a regular pending-debit request.
The merchant may specify a new value for a field in a pending-debit. However, the rest of the fields will still be copied from the authorization.
There are exceptions to this point above. If the merchant specifies a new value within any of the following sections for a recurring or final pending-debit, the information previously submitted for any of the fields within this section in the authorization will NOT be copied:
|
It is also possible to reference a refund to an authorization if the merchant’s business flow requires this.
An authorization is used for the merchant’s purpose only. It is not forwarded to a provider. It aids a merchant’s business flow or in deciding how to proceed further. When a merchant’s business flow requires a transaction to be referenced to a failed authorization transaction, then it is possible to do so.
Test Credentials
URLs (Endpoints) |
|
---|---|
Merchant Account ID (MAID) |
933ad170-88f0-4c3d-a862-cff315ecfbc0 |
Username |
16390-testing |
Password |
3!3013=D3fD8X7 |
Secret Key |
5caf2ed9-5f79-4e65-98cb-0b70d6f569aa |
Workflow
-
The transaction type within the request must be debit or pending-debit.
-
If the request is successful, a response will be returned with status Success. This response means that the transaction has entered the Wirecard Payment Gateway successfully. The transaction itself is in a pending status, waiting to be sent to the merchant’s bank.
-
If the request is not successful, a response will be returned with status Failed. The response always contains a status code and a description. Please read this description carefully as it will help to understand why the transaction request has failed and what needs to be fixed in order to send a successful transaction request.
-
Once the transaction has been successfully sent to and processed by the bank, a new transaction with type debit will be created in status Success. This process usually takes up to 2 business days. The transaction will then be forwarded the Central Bank for processing.
-
If the transaction has been rejected by the merchant’s bank, a debit transaction on status Failed will be created and the transaction will not be sent to the Central Bank.
-
The merchant will receive a notification of the debit transaction.
Although a transaction has been successfully processed by the merchant’s bank, the transaction may still be reversed by the consumer’s bank for reasons such as insufficient funds, account owner deceased, bank account closed, etc. In this case, a debit-return transaction will be created and matched to the original debit transaction to ensure the merchant has a complete overview for his debtor management. For a full list of debit-return reasons, please refer to the list of SEPA Return Codes. |
The merchant can request the status of the transaction at any time by sending a "Retrieve Transaction by Transaction ID" or "Retrieve Transaction by Request ID".
Fields
Direct Debit
The fields used for SEPA Direct Debit requests, responses and notifications are the same as the REST API Fields. Please refer to the REST API fields or the request example for the fields required in a Direct Debit transaction.
Only the fields listed below have different properties.
The following elements are mandatory (M), optional (O) or conditional (C) for a request/response/notification. If the respective cell is empty, the field is disregarded or not sent.
Field | Request | Response | Notification | Datatype | Size | Description |
---|---|---|---|---|---|---|
|
O |
O |
O |
String |
100 |
Description on the settlement of the account holder’s account about a transaction. For SEPA Direct Debit transactions, it will be combined with the Provider Transaction Reference ID and the merchant’s static descriptor and will appear on the consumer’s bank account statement. |
|
M |
M |
M |
String |
15 |
This is the name of the payment method sepadirectdebit. |
|
M |
String |
25 |
The API id is always returned in the notification. For SEPA it is "---" |
||
|
O |
O |
O |
Boolean |
Can be used with the transaction types debit and pending-debit. This field is set to false by default. When set to true, the transaction automatically will be processed as b2b. For transaction type authorization SEPA Direct Debit does not allow the b2b flag to be set to true. Setting the b2b flag for the transaction type authorization to true results in an error. |
|
|
O |
O |
O |
String |
8 or 11 |
This is the Bank Identifier Code of the end-consumer’s bank. In SEPA Area where IBAN Only is enabled, BIC is an optional field. |
|
C |
C |
C |
String |
34 |
This is the end-consumer’s International Bank Account Number. Allowed characters: [a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16} If no parent-transaction-id is provided, it remains mandatory. |
M |
M |
M |
String |
35 |
The ID of the signed mandate between the merchant and the consumer. The mandate ID may NOT be generated by the Wirecard Payment Gateway.
It is solely the responsibility of the merchant. Allowed characters: [A-Za-z0-9][ + ? - : ( ) . , ']){1,35} |
|
M |
M |
M |
Date |
n/a |
This is the date on which the above-mentioned mandate was signed by the
consumer. The date cannot be in the future, the validity is checked against the
server time. Merchant may choose to specify the UTC timezone as +/-
number of hours, e.g. <signed-date>2013-09-24+03.00</signed-date>. The
timezone is considered during the validation process, sign date is
stored with transaction using server’s timezone afterwards. The Mandate Signature Date is only required for SEPA Direct Debit and not for SEPA Credit Transfer transactions. |
|
M |
M |
M |
String |
1,35 |
Identifies and allows a merchant to process SEPA Direct Debit transactions. Allowed characters: [a-zA-Z]\{2,2}[0-9]\{2,2}[a-zA-Z0-9]\{3,3}[a-zA-Z0-9]\{1,28} |
|
M |
String |
10 |
This ID provides a reference for the complete end-to-end lifecycle of a SEPA Direct Debit transaction. It is used as a reference within the banking system to ensure all transactions referencing each other (eg: a direct debit and a debit-return) are matched and that the complete lifecycle of a payment is identifiable. Wirecard generates this ID for the merchant. |
Recurring Transaction
The following fields are required additionally for a Recurring transaction.
The following elements are mandatory (M), optional (O) or conditional (C) for a request/response/notification.
Field | Cardinality (Request) | Response | Notification | Datatype | Size | Description |
---|---|---|---|---|---|---|
|
M |
M |
M |
Alphanumeric |
36 |
Transaction ID of the first transaction of a payment. It is mandatory for "recurring" and "final". |
|
M |
M |
M |
Alpha |
11 |
Indicates how and why a payment occurs more than once. Only two possible values: "recurring" or "installment". |
|
M |
M |
M |
Alpha |
11 |
Indicates the sequence of the recurring transaction. Possible values: "first", "recurring" or "final". |
authorization
The fields used for authorization requests, responses and notifications are the same as the REST API Fields. Please refer to the REST API fields or the request example for the fields required in an authorization transaction.
Some of the elements that are mandatory for a SEPA Direct Debit
transaction are not mandatory for a SEPA authorization transaction. For example, IBAN and BIC are optional. If a merchant requires an IBAN and BIC to be validated, they must be sent in the request. If they are sent within the request the system validates their formal correctness. |
SEPA Direct Debit Specific Fields
The following elements should be kept in mind when sending in a SEPA Direct Debit payment request:
-
Creditor ID or Creditor Identifier
-
Mandate ID
-
Mandate Signature Date
-
Provider Transaction Reference ID
-
Due Date
The Creditor ID is a mandatory Identifier for each Merchant who wants to perform SEPA Direct Debits. Depending on the originating country, the merchant may need to apply for the Creditor ID at a tax office, local authority, or another organization. The format for the ID is not unique.
In order to be able to offer SEPA Direct Debit as a payment method, a merchant must apply for a Creditor Identifier. The Creditor ID identifies a merchant and allows consumers to be able to manage their mandates with merchants more easily.
This strongly depends on the local rules and regulations.
The current validation of the Creditor ID follows the rule of the 'European Payment Council' based on Document 'EPC260-08 Creditor Identifier Overview v4.0'.
The countries currently validated by the Wirecard Payment Gateway are the following: DE, AT, NL, CH, LI, GB.
The remaining countries mentioned in the documentation are currently not validated.
For more Details please see the official page of the 'European Payment Council'.
The following characters are allowed: [a-zA-Z]\{2,2}[0-9]\{2,2}[a-zA-Z0-9]\{3,3}[a-zA-Z0-9]\{1,28}
Error Messages in case of an incorrectly submitted Creditor ID
For detailed information concerning the error code please see:
A two-party mandate between the merchant and the debtor is required for SEPA Direct Debit payments. The mandate is an agreement giving the merchant permission to debit the consumer’s account for the sum upon which the two parties agreed. Every mandate has an ID provided by the merchant that, when combined with the Creditor ID, creates a unique mandate ID. This mandate reference must be sent to the Wirecard Payment Gateway within the request.
The mandate ID may not be generated by the Wirecard Payment Gateway. It is solely the responsibility of the merchant. |
This is the date on which the above-mentioned mandate was signed by the consumer.
This ID provides a reference for the complete end-to-end lifecycle of a SEPA Direct Debit transaction. It is used as a reference within the banking system to ensure all transactions referencing each other (e.g. a direct debit and a debit return) are matched and that the complete lifecycle of a payment is identifiable. Wirecard generates this ID for the merchant.
The due date is the day when the funds will be cleared on the debtors bank account. Wirecard can calculate the best (earliest) due date for the Merchant. When the Due Date field in the request is left empty, Wirecard will calculate the due date for the merchant automatically.
The merchant may, however, send in a due date inside the request if a specific date is requested. This date may only be used if it passes validation. If validation is not passed, Wirecard will return a failed transaction and the transaction must be re-submitted.
Wirecard cannot replace an incorrect due date sent in by the merchant with a correct due date calculated by the system as this would change the content of the transaction sent in by the merchant. |
Calculating the Due Date
In order to keep processing times transparent for all transactions within SEPA, a transaction’s due date has been clearly defined. If the merchant chooses to specify a due date, it is important to ensure all payments are submitted on time and are processed correctly. Wirecard requires merchants to submit
-
all transactions, regardless of sequence type, at least one (1) banking day before the due date
This is not a requirement. It is an option. If a merchant chooses to send in a transaction later than the earliest possible due date, this is possible. Wirecard will always validate a due date if one is sent in with the transaction request. The transaction request must be received by the Wirecard Payment Gateway no earlier than 14 calendar days before the due date. It is also necessary for the merchant to take into consideration the European Central Bank’s Target 2 Calendar which specifies all non-banking days. These include:
|
For more information about recurring SEPA Direct Debit payments, please read chapter SEPA Direct Debit Recurring Transaction.
Wirecard offers the possibility to delay the processing of a SEPA Direct Debit transaction by providing the element:
payment/capture-date
inside the SEPA Direct Debit request.
According to the date which is provided in the request the corresponding SEPA transaction will be sent to the Wirecard bank for the processing. This feature enables the merchant to cancel the transaction before the cut-off time of the capture date. The capture date range is from 1-14 calendar days. Dates outside of this range lead to a transaction rejection with the status code 400.1321. If the capture date is a non-working bank day, the processing will start on the next bank working day. For example, if the capture date is pointing to a Saturday, the transaction processing will start on next Monday.
The capture date influences the validation rule and the calculation logic of the due date. The due date is validated and calculated according to the same rules as described in the chapter 'Due Date' but starting from the capture date. For example, if the capture date is the Tuesday 25.11.2015, the next possible due date for the one-off transaction is 25.11.2015 + 1 bank working day = Friday 26.11.2015.
The due date may only be used if it passes validation. If validation is not passed, Wirecard will return a failed transaction (400.1175) and the transaction must be re-submitted.
The provided capture date does not guarantee the money flow on this date. The real money flow will occur according to the provided or calculated due date. |
B2B (B2B SDD) is an optional field. It is a business-to-business scheme, intended solely for use of debtors that are professionals or companies.
Private individuals (consumers) or micro enterprises use B2C (Core SDD) instead.
Differences between SEPA Direct Debit Core (Core SDD) and SEPA Direct Debit B2B (B2B SDD) Schemes
Core SDD | B2B SDD | |
---|---|---|
Transaction Process |
|
|
Usage |
|
|
Bank Participation |
|
|
Debit Return |
|
|
Refund |
|
|
Mandate Check by Debtor Bank |
|
|
Submission Deadlines |
|
Same as Core DD |
For more information regarding the differences between CORE SDD and B2B SDD, please refer to Annex V in the European Payments Council SEPA Direct Debit Business to Business Rulebook. |
Samples
Go to Notification Examples if you want to see corresponding notification samples.
debit
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<request-id>${unique for each request}</request-id>
<transaction-type>pending-debit</transaction-type>
<requested-amount currency="EUR">10.01</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2013-09-24</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<transaction-id>35fb9a68-b31b-4451-a73a-c1c86d549ced</transaction-id>
<request-id>cdb35487-fb20-4dc4-b57d-e2c0c172e46f</request-id>
<transaction-type>pending-debit</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2018-03-08T11:22:13.000Z</completion-time-stamp>
<statuses>
<status code="201.0000" description="The resource was successfully created." severity="information" />
</statuses>
<requested-amount currency="EUR">10.01</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2013-09-24</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<due-date>2018-03-13</due-date>
<provider-transaction-reference-id>A4DC3876AC</provider-transaction-reference-id>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<request-id>${unique for each request}</request-id>
<transaction-type>pending-debit</transaction-type>
<requested-amount currency="EUR">10.01</requested-amount>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2013-09-24</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<transaction-id>bdf80eca-5d7d-48cd-b030-7a988a9f79d5</transaction-id>
<request-id>22763feb-07f8-4908-b492-db4ed6ffcf7f</request-id>
<transaction-type>pending-debit</transaction-type>
<transaction-state>failed</transaction-state>
<completion-time-stamp>2018-03-08T11:22:34.000Z</completion-time-stamp>
<statuses>
<status code="400.1007" description="The account holder information has not been provided. Please check your input and try again." severity="error" />
</statuses>
<requested-amount currency="EUR">10.01</requested-amount>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2013-09-24</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
</payment>
pending-debit with IBAN Only feature
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<request-id>${unique for each request}</request-id>
<transaction-type>pending-debit</transaction-type>
<requested-amount currency="EUR">10.01</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
<!-- optional
<email>john.doe@wirecard.com</email>
<address>
<street1>Test Street 123</street1>
<city>Test City</city>
<country>DE</country>
</address> -->
</account-holder>
<!-- optional
<order-number>4509334</order-number> -->
<descriptor>reseller test transaction</descriptor>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<!--bic>WIREITMMXXX</bic-->
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2015-08-24</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<!-- optional
<cancel-redirect-url>http://sandbox-engine.thesolution.com/shop_urlViaRequest/cancel.html</cancel-redirect-url>-->
<!--<due-date>2015-08-27</due-date>-->
<consumer>
<first-name>Jack</first-name>
<last-name>Smith</last-name>
</consumer>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<transaction-id>eeaf7205-659e-4252-b1f6-c6a5a80de137</transaction-id>
<request-id>b9cf5517-7d30-46e3-80ec-2fa6cf739bb1</request-id>
<transaction-type>pending-debit</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2018-03-08T11:23:25.000Z</completion-time-stamp>
<statuses>
<status code="201.0000" description="The resource was successfully created." severity="information" />
</statuses>
<requested-amount currency="EUR">10.01</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<descriptor>reseller test transaction</descriptor>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2015-08-24</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<due-date>2018-03-13</due-date>
<consumer>
<first-name>Jack</first-name>
<last-name>Smith</last-name>
</consumer>
<provider-transaction-reference-id>3F7DD467BA</provider-transaction-reference-id>
</payment>
<b2b> set to true
POST http://127.0.0.1:8080/engine/rest/paymentmethods/?request-id=1c7ba19e-1ae8-42b5-9b29-fa5a24608685&iban=DE42512308000000060004&bic=WIREDEMMXXX&mandate-id=12345678&signed-date=2017-10-20&consumer-first-name=Jack&consumer-last-name=Smith&creditor-id=DE98ZZZ09999999999&payment-method-name=sepadirectdebit HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: application/xml;charset=UTF-8 Content-Length: 1349 Host: 127.0.0.1:8080 Connection: Keep-Alive User-Agent: Apache-HttpClient/4.3.1 (java 1.5) Authorization: Basic dGVhbWNpdHk6dGVhbWNpdHk=
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>a0a371cc-44d4-4c23-a592-f04b7e8b18e8</merchant-account-id>
<request-id>1c7ba19e-1ae8-42b5-9b29-fa5a24608685</request-id>
<transaction-type>debit</transaction-type>
<requested-amount currency="EUR">1.01</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit"/>
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2017-10-20</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<consumer>
<first-name>Jack</first-name>
<last-name>Smith</last-name>
</consumer>
<b2b>true</b2b>
</payment>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
<merchant-account-id>a0a371cc-44d4-4c23-a592-f04b7e8b18e8</merchant-account-id>
<transaction-id>c02b954f-af80-4afe-8285-23345ab46b16</transaction-id>
<request-id>1c7ba19e-1ae8-42b5-9b29-fa5a24608685</request-id>
<transaction-type>debit</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2017-11-20T09:22:41.000+01:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="EUR">1.01</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit"/>
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2017-10-20</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<due-date>2017-11-23</due-date>
<consumer>
<first-name>Jack</first-name>
<last-name>Smith</last-name>
</consumer>
<provider-transaction-reference-id>FDF5803E2A</provider-transaction-reference-id>
<instrument-country>DE</instrument-country>
<b2b>true</b2b>
</payment>
POST http://127.0.0.1:8080/engine/rest/paymentmethods/?request-id=316fab47-5508-456e-a962-ff4b927c0792&iban=DE42512308000000060004&bic=WIREDEMMXXX&mandate-id=12345678&signed-date=2017-10-20&consumer-first-name=Jack&consumer-last-name=Smith&creditor-id=DE98ZZZ09999999999&payment-method-name=sepadirectdebit HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: application/xml;charset=UTF-8 Content-Length: 1357 Host: 127.0.0.1:8080 Connection: Keep-Alive User-Agent: Apache-HttpClient/4.3.1 (java 1.5) Authorization: Basic dGVhbWNpdHk6dGVhbWNpdHk=
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>a0a371cc-44d4-4c23-a592-f04b7e8b18e8</merchant-account-id>
<request-id>316fab47-5508-456e-a962-ff4b927c0792</request-id>
<transaction-type>pending-debit</transaction-type>
<requested-amount currency="EUR">1.01</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit"/>
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2017-10-20</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<consumer>
<first-name>Jack</first-name>
<last-name>Smith</last-name>
</consumer>
<b2b>true</b2b>
</payment>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
<merchant-account-id>a0a371cc-44d4-4c23-a592-f04b7e8b18e8</merchant-account-id>
<transaction-id>b3335f51-bf5d-4af4-8fff-1e0ad8a1c73b</transaction-id>
<request-id>316fab47-5508-456e-a962-ff4b927c0792</request-id>
<transaction-type>pending-debit</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2017-11-20T09:35:11.000+01:00</completion-time-stamp>
<statuses>
<status code="201.0000" description="The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="EUR">1.01</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit"/>
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2017-10-20</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<due-date>2017-11-23</due-date>
<consumer>
<first-name>Jack</first-name>
<last-name>Smith</last-name>
</consumer>
<provider-transaction-reference-id>82A7DFAC09</provider-transaction-reference-id>
<instrument-country>DE</instrument-country>
<b2b>true</b2b>
</payment>
Recurring Transactions
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<request-id>${unique for each request}</request-id>
<transaction-type>debit</transaction-type>
<requested-amount currency="EUR">20.02</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2013-12-19</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>first</sequence-type>
</periodic>
</payment>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>4c901196-eff7-411e-82a3-5ef6b6860d64</merchant-account-id>
<transaction-id>e6604f91-663c-11e3-a07b-18037336c0b3</transaction-id>
<request-id>${response}</request-id>
<transaction-type>debit</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2013-12-19T10:29:02.000Z</completion-time-stamp>
<statuses>
<status code="201.0000" description="The resource was successfully created." severity="information"/>
</statuses>
<requested-amount currency="EUR">20.02</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit"/>
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2013-12-19</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<due-date>2014-01-02</due-date>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>first</sequence-type>
</periodic>
<provider-transaction-reference-id>5A00C85484</provider-transaction-reference-id>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<request-id>${unique for each request}</request-id>
<transaction-type>debit</transaction-type>
<requested-amount currency="EUR">20.02</requested-amount>
<parent-transaction-id>6f3b6ec5-60aa-49e7-85f7-5b386d49efeb</parent-transaction-id>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2013-12-19</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>recurring</sequence-type>
</periodic>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<transaction-id>96549f47-4972-4df2-b5d5-61955d586246</transaction-id>
<request-id>f761537c-2a4d-432b-b69f-93f318026f82</request-id>
<transaction-type>debit</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2018-03-08T11:24:46.000Z</completion-time-stamp>
<statuses>
<status code="201.0000" description="The resource was successfully created." severity="information" />
</statuses>
<requested-amount currency="EUR">20.02</requested-amount>
<parent-transaction-id>6f3b6ec5-60aa-49e7-85f7-5b386d49efeb</parent-transaction-id>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2013-12-19</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<api-id>---</api-id>
<due-date>2018-03-13</due-date>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>recurring</sequence-type>
</periodic>
<provider-transaction-reference-id>CBD27ADB5F</provider-transaction-reference-id>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<request-id>${unique for each request}</request-id>
<transaction-type>debit</transaction-type>
<requested-amount currency="EUR">20.02</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2013-12-19</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>recurring</sequence-type>
</periodic>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<transaction-id>78521961-2c4a-4dc3-8036-c039cba9c001</transaction-id>
<request-id>c00a49b0-ea95-416f-b95c-6f15da562ce6</request-id>
<transaction-type>debit</transaction-type>
<transaction-state>failed</transaction-state>
<completion-time-stamp>2018-03-08T11:26:07.000Z</completion-time-stamp>
<statuses>
<status code="400.1021" description="The Parent Transaction Id is required, and not provided. Please check your input and try again." severity="error" />
</statuses>
<requested-amount currency="EUR">20.02</requested-amount>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2013-12-19</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<periodic>
<periodic-type>recurring</periodic-type>
<sequence-type>recurring</sequence-type>
</periodic>
</payment>
authorization
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<request-id>${unique for each request}</request-id>
<transaction-type>authorization</transaction-type>
<requested-amount currency="EUR">15.55</requested-amount>
<account-holder>
<first-name>john</first-name>
<last-name>Constatine</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<transaction-id>aaf7b07d-4302-4197-8886-ffc2642467c8</transaction-id>
<request-id>aec8c5d2-a6b2-4afe-a023-904304a8e7ed</request-id>
<transaction-type>authorization</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2018-03-08T11:26:26.000Z</completion-time-stamp>
<statuses>
<status code="201.0000" description="The resource was successfully created." severity="information" />
</statuses>
<requested-amount currency="EUR">15.55</requested-amount>
<account-holder>
<first-name>john</first-name>
<last-name>Constatine</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<provider-transaction-reference-id>9F7FCE48BE</provider-transaction-reference-id>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<request-id>${unique for each request}</request-id>
<transaction-type>authorization</transaction-type>
<requested-amount currency="EUR">15.55</requested-amount>
<account-holder>
<first-name>john</first-name>
<last-name>Constatine</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<bic>WIREDEMMXXX</bic>
</bank-account>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<transaction-id>921f36ba-aae5-4736-ab4e-c4bfdc568e9e</transaction-id>
<request-id>0ffd92fe-433c-4be4-923d-eb75351dd13d</request-id>
<transaction-type>authorization</transaction-type>
<transaction-state>failed</transaction-state>
<completion-time-stamp>2018-03-08T11:27:19.000Z</completion-time-stamp>
<statuses>
<status code="400.1196" description="IBAN is invalid." severity="error" />
</statuses>
<requested-amount currency="EUR">15.55</requested-amount>
<account-holder>
<first-name>john</first-name>
<last-name>Constatine</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<bic>WIREDEMMXXX</bic>
</bank-account>
</payment>
void-pending-debit
void-pending-debit transactions can also be used with SEPA Credit Transfer.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<request-id>{unique for each request}</request-id>
<transaction-type>void-pending-debit</transaction-type>
<requested-amount currency="EUR">10.01</requested-amount>
<parent-transaction-id>${derived from former authorization transaction}</parent-transaction-id>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<transaction-id>681222f6-b521-4c94-9f8e-3ba9351665ca</transaction-id>
<request-id>0fa66fea-8b07-4300-b935-0c4e342e0316</request-id>
<transaction-type>void-pending-debit</transaction-type>
<transaction-state>success</transaction-state>
<completion-time-stamp>2018-03-08T11:28:25.000Z</completion-time-stamp>
<statuses>
<status code="200.0000" description="The request completed successfully." severity="information" />
</statuses>
<requested-amount currency="EUR">10.01</requested-amount>
<parent-transaction-id>35fb9a68-b31b-4451-a73a-c1c86d549ced</parent-transaction-id>
<account-holder>
<first-name>John</first-name>
<last-name>Doe</last-name>
</account-holder>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
<bank-account>
<iban>DE42512308000000060004</iban>
<bic>WIREDEMMXXX</bic>
</bank-account>
<mandate>
<mandate-id>12345678</mandate-id>
<signed-date>2013-09-24</signed-date>
</mandate>
<creditor-id>DE98ZZZ09999999999</creditor-id>
<api-id>---</api-id>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
<merchant-account-id>933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<request-id>${unique for each request}</request-id>
<transaction-type>void-pending-debit</transaction-type>
<requested-amount currency="EUR">15.55</requested-amount>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
<merchant-account-id ref="unknown">933ad170-88f0-4c3d-a862-cff315ecfbc0</merchant-account-id>
<request-id>74d7e07b-519d-49cf-9d2f-b6fa28cd2913</request-id>
<transaction-type>void-pending-debit</transaction-type>
<transaction-state>failed</transaction-state>
<completion-time-stamp>2018-03-08T11:29:22.907Z</completion-time-stamp>
<statuses>
<status code="400.1019" description="This Merchant Account Identifier does not exist, or is not assigned to this Processing User. Please contact technical support." severity="error" />
<status code="400.1127" description="The Transaction Amount does not qualify to the parent transaction amount. Please try another amount." severity="error" />
<status code="400.1021" description="The Parent Transaction Id is required, and not provided. Please check your input and try again." severity="error" />
<status code="400.1109" description="Invalid Payment Method Please check your input and try again." severity="error" />
</statuses>
<requested-amount currency="EUR">15.55</requested-amount>
<payment-methods>
<payment-method name="sepadirectdebit" />
</payment-methods>
</payment>
Wirecard Payment Page v2
Wirecard Payment Page v1 is no longer supported. We recommend using Wirecard Payment Page v2 integration instead. If you have questions about your existing Wirecard Payment Page v1 integration, consult our REST API integration guide.
General Information
This is a reference page for SEPA Direct Debit. Here you will find all the information necessary for integrating this payment method into your Hosted and Embedded Payment Page.
Are you unfamiliar with Wirecard Payment Page v2 (WPP v2)?
Visit one of the integration guides (Hosted, Embedded) for a quick explanation and a step-by-step guide before continuing.
|
All WPP v2 integrations share a common process flow for creating payments.
Below, you find example requests for the available transaction type debit, including field lists with short descriptions.
These requests are designed for the testing environment and do not use real information.
For production, you need to use production credentials. For details contact merchant support. |
All given requests return successful responses.
For more details on the redirect-url
, see the Configuring Redirects and IPNs for WPP v2 section.
For response verification examples, see the WPP v2 Security section.
About SEPA Direct Debit
The Single Euro Payments Area (SEPA) is an initiative of the European banking industry that makes electronic payments across the euro area as easy as domestic payments within one country. The payments are processed under the same basic conditions, rights, and obligations regardless of their location.
SEPA Direct Debit is a payment method which authorizes a transaction before it transfers money from the consumer account to you.
Test Credentials
The Wirecard test environment is not connected to SEPA. We cannot validate SEPA specific data such as IBAN, BIC, Creditor ID, etc. It is only possible to check whether the structure of a request is valid. In the test environment you can only simulate a 'success' or 'cancel' scenario. You cannot simulate a 'fail' scenario. |
Test credentials for the transaction type debit.
URI (Endpoint) |
|
---|---|
Merchant Account ID (MAID) |
4c901196-eff7-411e-82a3-5ef6b6860d64 |
Username |
70000-APITEST-AP |
Password |
qD2wzQ_hrc!8 |
Secret Key (used for response verification) |
ecdf5990-0372-47cd-a55d-037dccfe9d25 |
Creditor ID |
DE98ZZZ09999999999 |
---|---|
IBAN |
DE42512308000000060004 |
DE83203205004989123456 |
Transaction Type debit
A debit transaction charges the specified amount from the account holder’s bank account and marks it for immediate transfer.
For a successful debit transaction:
-
Create a payment session (initial request).
-
Redirect the consumer to the payment page (initial response URL).
-
Highly recommended: Parse and process the payment response.
We provide ready-made JSON examples for each step of this process. You find them below.
Endpoint for SEPA Direct Debit transactions.
The initial request creates the payment session. If it is successful, you receive a URL as a response which redirects to the payment form.
Authorization |
Basic NzAwMDAtQVBJVEVTVC1BUDpxRDJ3elFfaHJjITg= |
---|---|
Content-Type |
application/json |
For a full list of optional fields you can use, see the REST API SEPA Direct Debit specification.
For a full structure of a request (optional fields included), see the JSON/NVP Field Reference section at the bottom.
{
"payment":{
"merchant-account-id":{
"value":"4c901196-eff7-411e-82a3-5ef6b6860d64"
},
"request-id":"{{$guid}}",
"transaction-type":"pending-debit",
"requested-amount":{
"value":10.1,
"currency":"EUR"
},
"payment-methods":{
"payment-method":[
{
"name":"sepadirectdebit"
}
]
},
"mandate": {
"mandate-id":"12345678"
},
"creditor-id":"DE98ZZZ09999999999",
"success-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/success",
"fail-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/error",
"cancel-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/cancel"
}
}
Field (JSON) | Data Type | Mandatory/Optional | Size | Description | |
---|---|---|---|---|---|
merchant-account-id |
value |
String |
Mandatory |
36 |
A unique identifier assigned to every Merchant Account (by Wirecard). |
request-id |
String |
Mandatory |
150 |
A unique identifier assigned to every request which you sent out. Used when
searching for or referencing it later. Allowed characters: [a-z0-9-_] |
|
transaction-type |
String |
Mandatory |
36 |
The requested transaction type. |
|
requested-amount |
value |
Numeric |
Mandatory |
11 |
The full amount that is requested/contested in a transaction. 2 decimal places allowed. Use . (decimal point) as the separator. |
currency |
String |
Mandatory |
3 |
The currency of the requested/contested transaction amount. For SEPA Direct Debit
payments, the currency must be set to Format: 3-character abbreviation according to ISO 4217. |
|
payment-method |
name |
String |
Optional |
15 |
The name of the payment method used for the transaction. Set this value to |
mandate-id |
String |
Mandatory |
35 |
The ID of the Direct Debit mandate. You must generate this value yourself. |
|
success-redirect-url |
String |
Mandatory |
2000 |
The URL to which the consumer is redirected after a successful payment, e.g. |
|
fail-redirect-url |
String |
Mandatory |
2000 |
The URL to which the consumer is redirected after a failed payment, e.g. |
|
cancel-redirect-url |
String |
Mandatory |
2000 |
The URL to which the consumer is redirected after having canceled a payment, e.g. |
|
creditor-id |
String |
Mandatory |
35 |
The Creditor ID of the merchant. |
{
"payment-redirect-url": "https://wpp-test.wirecard.com/?wPaymentToken=6EMoKqz4HLGBclcGdjAvSni5PzL7IR1QhKAA7FCvyVE"
}
Field (JSON) | Data Type | Description |
---|---|---|
payment-redirect-url |
String |
The URL which redirects to the payment form. Sent as a response to the initial request. |
At this point, you need to redirect your consumer to
payment-redirect-url
(or render it in an iframe depending on your
integration method).
Consumers are redirected to the payment form. There they enter their
data and submit the form to confirm the payment.
Possible transaction results:
-
Successful (
transaction-state: success
) -
Failed (
transaction-state: failed
) -
Canceled (
transaction-state: failed
)
The transaction result is the value of transaction-state
in the
payment response. More details (including the status code) can also be
found in the statuses
object of the payment response. Canceled
payments are returned as failed
, but the
status description
indicates it was canceled.
In any case (unless the consumer cancels the transaction on a 3rd party provider page), a base64-encoded response containing payment information is sent to the configured redirection URL. See Configuring Redirects and IPNs for WPP v2 for more details on redirection targets after payment and transaction status notifications.
You can find a decoded payment response example below.
{
"payment" : {
"merchant-account-id" : {
"value" : "4c901196-eff7-411e-82a3-5ef6b6860d64"
},
"success-redirect-url" : "https://demoshop-test.wirecard.com/demoshop/#/success",
"bank-account" : {
"iban" : "DE83203205004989123456"
},
"transaction-id" : "94654e06-ea97-4715-aad7-d87e82af6db1",
"request-id" : "45bc7d2d-5653-4196-8ed5-ab14bf34be1f-pending-debit",
"transaction-state" : "success",
"completion-time-stamp" : "2020-05-22T12:42:28",
"requested-amount" : {
"currency" : "EUR",
"value" : 10.1
},
"provider-transaction-reference-id" : "DFA46C4A6D",
"statuses" : {
"status" : [ {
"description" : "The resource was successfully created.",
"severity" : "information",
"code" : "201.0000"
} ]
},
"fail-redirect-url" : "https://demoshop-test.wirecard.com/demoshop/#/error",
"cancel-redirect-url" : "https://demoshop-test.wirecard.com/demoshop/#/cancel",
"transaction-type" : "pending-debit",
"account-holder" : {
"first-name" : "John",
"last-name" : "Doe"
},
"payment-methods" : {
"payment-method" : [ {
"name" : "sepadirectdebit"
} ]
},
"mandate" : {
"mandate-id" : "12345678",
"signed-date" : "2020-05-22"
},
"creditor-id" : "DE98ZZZ09999999999",
"api-id" : "wpp",
"due-date" : "2020-05-27"
}
}
Field (JSON) | Data Type | Description | ||
---|---|---|---|---|
merchant-account-id |
value |
String |
A unique identifier assigned to every Merchant Account (by Wirecard). |
|
success-redirect-url |
String |
The URL to which the consumer is redirected after a successful payment, e.g. |
||
bank-account |
iban |
String |
The International Bank Account Number (IBAN). |
|
transaction-id |
String |
A unique identifier assigned to every transaction (by Wirecard). Used when searching for or referencing to it later. |
||
request-id |
String |
A unique identifier assigned to every request which you sent out. Used when searching for or referencing it later. |
||
transaction-state |
String |
The current transaction state. Possible values:
Typically, a transaction starts with state in-progress and finishes with state either success or failed. This information is returned in the response only. |
||
completion-time-stamp |
YYYY-MM-DD-Thh:mm:ss |
The UTC/ISO time-stamp documents the time and date when the transaction was executed. |
||
requested-amount |
currency |
String |
The currency of the requested/contested transaction amount. For SEPA Direct Debit payments, the currency must be set to |
|
value |
Numeric |
The full amount that is requested/contested in a transaction. 2 decimals allowed. |
||
provider-transaction-reference-id |
String |
An identifier used to match and reference all transactions belonging to a single Direct Debit payment lifecycle. |
||
statuses |
status |
description |
String |
The description of the transaction status message. |
severity |
String |
The definition of the status message. Possible values:
|
||
code |
String |
Status code of the status message. |
||
fail-redirect-url |
String |
The URL to which the consumer is redirected after a failed payment, e.g. |
||
cancel-redirect-url |
String |
The URL to which the consumer is redirected after having canceled a payment, e.g. |
||
transaction-type |
String |
The requested transaction type. |
||
account-holder |
first-name |
String |
The first name of the account holder. |
|
last-name |
String |
The last name of the account holder. |
||
payment-methods |
payment-method |
name |
String |
The name of the payment method used for the transaction. |
mandate |
mandate-id |
String |
The ID of the Direct Debit mandate. You must generate this value yourself. |
|
signed-date |
YYYY-MM-DD |
The date the Direct Debit mandate was signed. |
||
creditor-id |
String |
This is your Creditor ID. |
||
api-id |
String |
Identifier of the currently used API. |
||
due-date |
YYYY-MM-DD |
The date on which the mandated transaction is due. |
Recurring Transactions
Use WPP v2 to create the first transaction in a series of recurring transactions. Then use our REST API for all the following transactions (these need to reference the first one).
To register an initial (first) recurring transaction, use a normal debit request (like the one in the example above) and add these two fields:
-
periodic-type
, set to valuerecurring
orinstallment
. -
sequence-type
, set to valuefirst
.
The periodic and sequence information indicates that this is the first transaction in a series. There are no other requirements for the request.
The provider-transaction-reference-id
returned in the
response contains the ID used to reference all transactions belonging to
a specific recurring group.
For a successful transaction:
-
Create a payment session (initial request).
-
Redirect the consumer to the payment page (initial response URL).
-
Highly recommended: Parse and process the payment response.
We provide ready-made JSON examples for each step of this process. You find them below.
Endpoint for SEPA Direct Debit transactions.
The initial request creates the payment session. If it is successful, you receive a URL as a response which redirects to the payment form.
Authorization |
Basic NzAwMDAtQVBJVEVTVC1BUDpxRDJ3elFfaHJjITg= |
---|---|
Content-Type |
application/json |
For a full list of optional fields you can use, see the REST API SEPA Direct Debit specification.
For a full structure of a request (optional fields included), see the JSON/NVP Field Reference section at the bottom.
{
"payment":{
"merchant-account-id":{
"value":"4c901196-eff7-411e-82a3-5ef6b6860d64"
},
"request-id":"{{$guid}}",
"transaction-type":"debit",
"requested-amount":{
"value":10.1,
"currency":"EUR"
},
"payment-methods":{
"payment-method":[
{
"name":"sepadirectdebit"
}
]
},
"mandate": {
"mandate-id":"12345678"
},
"creditor-id":"DE98ZZZ09999999999",
"success-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/success",
"fail-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/error",
"cancel-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/cancel",
"periodic":{
"periodic-type":"recurring",
"sequence-type":"first"
}
}
}
Field (JSON) | Data Type | Mandatory/Optional | Size | Description | |
---|---|---|---|---|---|
merchant-account-id |
value |
String |
Mandatory |
36 |
A unique identifier assigned to every Merchant Account (by Wirecard). |
request-id |
String |
Mandatory |
150 |
A unique identifier assigned to every request which you sent out. Used when
searching for or referencing it later. Allowed characters: [a-z0-9-_] |
|
transaction-type |
String |
Mandatory |
36 |
The requested transaction type. |
|
requested-amount |
value |
Numeric |
Mandatory |
11 |
The full amount that is requested/contested in a transaction. 2 decimal places allowed. Use . (decimal point) as the separator. |
currency |
String |
Mandatory |
3 |
The currency of the requested/contested transaction amount. For SEPA Direct Debit
payments, the currency must be set to Format: 3-character abbreviation according to ISO 4217. |
|
payment-method |
name |
String |
Optional |
15 |
The name of the payment method used. Set this value to |
mandate-id |
String |
Mandatory |
35 |
The ID of the Direct Debit mandate. You must generate this value yourself. |
|
creditor-id |
String |
Mandatory |
35 |
The Creditor ID of the merchant. |
|
success-redirect-url |
String |
Mandatory |
2000 |
The URL to which the consumer is redirected after a successful payment, e.g. |
|
fail-redirect-url |
String |
Mandatory |
2000 |
The URL to which the consumer is redirected after a failed payment, e.g. |
|
cancel-redirect-url |
String |
Mandatory |
2000 |
The URL to which the consumer is redirected after having canceled a payment, e.g. |
|
periodic-type |
String |
Conditional |
9 |
Required for recurring transactions. Indicates if (and how) payment occurs more than once. |
|
sequence-type |
String |
Conditional |
9 |
Required for recurring transactions. Indicates the phase of a recurring transaction. |
{
"payment-redirect-url": "https://wpp-test.wirecard.com/?wPaymentToken=uDJ3j255MbkEUVIVJUREoeARTiE5jqUb7X0oVhg2Amg"
}
Field (JSON) | Data Type | Description |
---|---|---|
payment-redirect-url |
String |
The URL which redirects to the payment form. Sent as a response to the initial request. |
At this point, you need to redirect your consumer to
payment-redirect-url
(or render it in an iframe depending on your
integration method).
Consumers are redirected to the payment form. There they enter their
data and submit the form to confirm the payment.
Possible transaction results:
-
Successful (
transaction-state: success
) -
Failed (
transaction-state: failed
) -
Canceled (
transaction-state: failed
)
The transaction result is the value of transaction-state
in the
payment response. More details (including the status code) can also be
found in the statuses
object of the payment response. Canceled
payments are returned as failed
, but the
status description
indicates it was canceled.
In any case (unless the consumer cancels the transaction on a 3rd party provider page), a base64-encoded response containing payment information is sent to the configured redirection URL. See Configuring Redirects and IPNs for WPP v2 for more details on redirection targets after payment and transaction status notifications.
You can find a decoded payment response example below.
{
"payment" : {
"bank-account" : {
"iban" : "DE42512308000000060004"
},
"success-redirect-url" : "https://demoshop-test.wirecard.com/demoshop/#/success",
"transaction-id" : "c205e979-ec70-4890-8967-b1b96e2f44fa",
"request-id" : "9f7d96c9-b861-4219-a532-a6d22d4c0126-pending-debit",
"transaction-state" : "success",
"completion-time-stamp" : "2020-05-26T09:26:36",
"requested-amount" : {
"currency" : "EUR",
"value" : 10.1
},
"provider-transaction-reference-id" : "C95BE8D981",
"periodic" : {
"sequence-type" : "first",
"periodic-type" : "recurring"
},
"transaction-type" : "pending-debit",
"payment-methods" : {
"payment-method" : [ {
"name" : "sepadirectdebit"
} ]
},
"account-holder" : {
"first-name" : "Paul",
"last-name" : "Peterson"
},
"merchant-account-id" : {
"value" : "4c901196-eff7-411e-82a3-5ef6b6860d64"
},
"statuses" : {
"status" : [ {
"description" : "The resource was successfully created.",
"code" : "201.0000",
"severity" : "information"
} ]
},
"cancel-redirect-url" : "https://demoshop-test.wirecard.com/demoshop/#/cancel",
"fail-redirect-url" : "https://demoshop-test.wirecard.com/demoshop/#/error",
"mandate" : {
"mandate-id" : "12345678",
"signed-date" : "2020-05-26"
},
"creditor-id" : "DE98ZZZ09999999999",
"api-id" : "wpp",
"due-date" : "2020-05-29"
}
}
Field (JSON) | Data Type | Description | ||
---|---|---|---|---|
bank-account |
iban |
String |
The International Bank Account Number (IBAN). |
|
success-redirect-url |
String |
The URL to which the consumer is redirected after a successful payment, e.g. |
||
transaction-id |
String |
A unique identifier assigned to every transaction (by Wirecard). Used when searching for or referencing to it later. |
||
request-id |
String |
A unique identifier assigned to every request which you sent out. Used when searching for or referencing it later. |
||
transaction-state |
String |
The current transaction state. Possible values:
Typically, a transaction starts with state in-progress and finishes with state either success or failed. This information is returned in the response only. |
||
completion-time-stamp |
YYYY-MM-DD-Thh:mm:ss |
The UTC/ISO time-stamp documents the time and date when the transaction was executed. |
||
requested-amount |
currency |
String |
The currency of the requested/contested transaction amount. For SEPA Direct Debit payments, the currency must be set to |
|
value |
Numeric |
The full amount that is requested/contested in a transaction. 2 decimals allowed. |
||
provider-transaction-reference-id |
String |
An identifier used to match and reference all transactions belonging to a single Direct Debit payment lifecycle. |
||
periodic |
periodic-type |
String |
Indicates if (and how) payment occurs more than once. |
|
sequence-type |
String |
Indicates the phase of a recurring transaction. |
||
transaction-type |
String |
The requested transaction type. |
||
payment-methods |
payment-method |
name |
String |
The name of the payment method used for the transaction. |
account-holder |
first-name |
String |
The first name of the account holder. |
|
last-name |
String |
The last name of the account holder. |
||
merchant-account-id |
value |
String |
A unique identifier assigned to every Merchant Account (by Wirecard). |
|
statuses |
status |
description |
String |
The description of the transaction status message. |
severity |
String |
The definition of the status message. Possible values:
|
||
code |
String |
Status code of the status message. |
||
cancel-redirect-url |
String |
The URL to which the consumer is redirected after having canceled a payment, e.g. |
||
fail-redirect-url |
String |
The URL to which the consumer is redirected after a failed payment, e.g. |
||
mandate |
mandate-id |
String |
The ID of the Direct Debit mandate. You must generate this value yourself. |
|
signed-date |
YYYY-MM-DD |
The date the Direct Debit mandate was signed. |
||
creditor-id |
String |
This is your Creditor ID. |
||
api-id |
String |
Identifier of the currently used API. |
||
due-date |
YYYY-MM-DD |
The date on which the mandated transaction is due. |
B2B Scheme
To use the SEPA B2B scheme for Direct Debit, add the b2-b
field to the
request and set its value to true
.
The default value is false
so unless you send this field in the
request as true
, the payment proceeds with the default scheme.
For more information on SEPA schemes, click here. |
{
"payment":{
"merchant-account-id":{
"value":"4c901196-eff7-411e-82a3-5ef6b6860d64"
},
"request-id":"{{$guid}}",
"transaction-type":"pending-debit",
"requested-amount":{
"value":10.1,
"currency":"EUR"
},
"payment-methods":{
"payment-method":[
{
"name":"sepadirectdebit"
}
]
},
"mandate": {
"mandate-id":"12345678"
},
"creditor-id":"DE98ZZZ09999999999",
"b2-b":true
}
}
Field (JSON) | Data Type | Mandatory/Optional | Size | Description | |
---|---|---|---|---|---|
merchant-account-id |
value |
String |
Mandatory |
36 |
A unique identifier assigned to every Merchant Account (by Wirecard). |
request-id |
String |
Mandatory |
150 |
A unique identifier assigned to every request which you sent out. Used when
searching for or referencing it later. Allowed characters: [a-z0-9-_] |
|
transaction-type |
String |
Mandatory |
36 |
The requested transaction type. |
|
requested-amount |
value |
Numeric |
Mandatory |
11 |
The full amount that is requested/contested in a transaction. 2 decimal places allowed. Use . (decimal point) as the separator. |
currency |
String |
Mandatory |
3 |
The currency of the requested/contested transaction amount. For SEPA Direct Debit
payments, the currency must be set to Format: 3-character abbreviation according to ISO 4217. |
|
payment-method |
name |
String |
Optional |
15 |
The name of the payment method used. Set this value to |
mandate-id |
String |
Mandatory |
35 |
The ID of the Direct Debit mandate. You must generate this value yourself. |
|
creditor-id |
String |
Mandatory |
35 |
This is your Creditor ID. |
|
b2-b |
Boolean |
Conditional |
N/A |
Required for B2B payments. Indicates whether the B2B scheme is used for the payment. |
Post-Processing Operations
WPP v2 is best used to deal with one-off payments (e.g. regular, independent debit transactions) or the initial transaction in a chain of them (e.g. a first authorization in a chain of recurring transactions). However, when it comes to referencing a transaction for any kind of post-processing operation - such as a refund of one of your debit transactions - use our REST API directly.
A direct refund through WPP v2 is not possible for SEPA Direct Debit so you have to
obtain your consumer’s banking information and send the refund using
SEPA Credit Transfer. Check the REST API SEPA Credit Transfer specification for details on SEPA Direct Debit specific post-processing operations. |
JSON/NVP Field Reference
Here you can:
-
find the NVP equivalents for JSON fields (for migrating merchants),
-
see the structure of a full request (optional fields included).
{
"payment":{
"merchant-account-id":{
"value":"string"
},
"request-id":"string",
"transaction-type":"string",
"requested-amount":{
"value":0,
"currency":"string"
},
"parent-transaction-id":"string",
"account-holder":{
"first-name":"string",
"last-name":"string"
},
"payment-methods":{
"payment-method":[
{
"name":"string"
}
]
},
"bank-account": {
"iban":"string"
},
"mandate": {
"mandate-id":"string",
"signed-date":"string"
},
"creditor-id":"string",
"periodic":{
"periodic-type":"string",
"sequence-type":"string"
},
"success-redirect-url": "string",
"fail-redirect-url": "string",
"cancel-redirect-url": "string",
"b2-b":true
}
}
Field (NVP) | Field (JSON) | JSON Parent |
---|---|---|
merchant_account_id |
value |
merchant-account-id ({ }) |
request_id |
request-id |
payment ({ }) |
transaction_type |
transaction-type |
payment ({ }) |
requested_amount |
value |
requested-amount (\{ }) |
requested_amount_currency |
currency |
requested-amount ({ }) |
first_name |
first-name |
account-holder ({ }) |
last_name |
last-name |
account-holder ({ }) |
payment_method |
payment-method ([ ])/name |
payment-methods ({ }) |
bank_account_iban |
iban |
bank-account ({ }) |
mandate_mandate_id |
mandate-id |
mandate ({ }) |
mandate_signed_date |
signed-date |
mandate ({ }) |
creditor_id |
creditor-id |
payment ({ }) |
periodic_type |
periodic-type |
periodic ({ }) |
sequence_type |
sequence-type |
periodic ({ }) |
success_redirect_url |
success-redirect-url |
payment ({ }) |
fail_redirect_url |
fail-redirect-url |
payment ({ }) |
cancel_redirect_url |
cancel-redirect-url |
payment ({ }) |
b2b |
b2-b |
payment ({ }) |
{
"payment": {
"provider-transaction-reference-id": "string",
"transaction-state": "string",
"transaction-id": "string",
"completion-time-stamp": "2017-11-21T09:38:57.645Z",
"statuses": {
"status": [
{
"code": "string",
"description": "string",
"severity": "string"
}
]
},
"api-id": "string"
}
}
Field (NVP) | Field (JSON) | JSON Parent |
---|---|---|
provider_transaction_reference_id |
provider-transaction-reference-id |
payment ({ }) |
transaction_state |
transaction-state |
payment ({ }) |
transaction_id |
transaction-id |
payment ({ }) |
completion_time_stamp |
completion-time-stamp |
payment ({ }) |
status_code_n |
status ([ {} ])/ code |
statuses ({ }) |
status_description_n |
status ([ {} ])/ description |
statuses ({ }) |
status_severity_n |
status ([ {} ])/ severity |
statuses ({ }) |
api_id |
api-id |
payment ({ }) |