Skip to main content

Pay by Bank

Description

Deutsche Bank's Pay by Bank is a service for businesses that allows them to send digital payment requests to customers via their online banking or a dedicated app. Customers can then authorize the payment, which is processed as a SEPA Instant Credit Transfer or a regular SEPA Credit Transfer, making it an irrevocable, fast, and cost-effective option compared to credit cards. It functions as a message format that initiates a bank transfer, pre-filled with payment details to simplify reconciliation for the business.

Availability

Available to anyone with a bank account in Europe.

Transaction Types

Payment Flow

Example Pay by Bank redirect experience

API Implementation

Required value for payment_type parameter: pbb

Payment Page Redirect

Redirect the customer to the Pay by Bank experience hosted by Deutsche Bank after creating a payment.

Implementation flow:

  1. Make a Payment API request.
  2. Receive the API response with client_action = redirect.
  3. Redirect your customer to the url provided in action_data.
  4. The customer selects their bank, authenticates with their bank, and authorises the payment.
  5. Customer is redirected back to your success_url or error_url. You will also receive asynchronous postbacks.

Payment API

Payment API Request

payment_typeStringrequired
pbb
order_idStringrequired
Any alphanumeric string to identify the Merchant's order
amountFloatrequired
Amount of the transaction including all taxes and shipping fees
currencyStringrequired
3 letter currency code
postback_urlStringrequired
The URL for updates about transaction status are posted
success_urlStringrequired
Where to redirect the user after a successful transaction
error_urlStringrequired
Where to redirect the user after a failed transaction
This example includes only the minimum required parameters to create a Pay by Bank payment. See the Create Payment API reference for the full list of supported parameters.
Example Request
POST /rest/payment
Authorization: Basic <base64(api_key:api_password)>
Content-Type: application/json
{
"payment_type": "pbb",
"order_id": "PAYBYBANK-12345",
"amount": "29.90",
"currency": "EUR",
"postback_url": "https://your-postback.url.com",
"success_url": "https://your-success.url.com",
"error_url": "https://your-error.url.com"
}

Payment API Response

transaction_idString
ID of the created transaction
payment_typeString
Payment type of the transaction
status_codeInteger
Status code of the transaction
statusString
Status of the transaction
order_idString
Order ID of the transaction
messageString
Optional additional information about the transaction result. When declined, this field contains the decline code (e.g. AC01)
additional_transaction_dataString
Additional transaction data provided by you. This will be shown in the dashboard as well as when you query for transaction data. It will also be sent back to your postback_url as part of the postback data.
amountFloat
Amount of the transaction
included_feesString
Included fees for the transaction
error_codeInteger
Error code for the response
client_actionString
Indicates the required client-side action after a payment request. Possible values: redirect (redirect to the url in action_data) or postform (build and submit a POST form using the data in action_data). When not returned, no client-side action is required.
action_dataObject
Present when client_action is specified. Contains: url (target URL of the action) and, in case of a postform, fields (key/value pairs of the data to be posted).
Example Response
{
"transaction_id": "4d79a749-0f9e-4f77-8ac4-5acb2ac55b43",
"payment_type": "pbb",
"status_code": 1,
"status": "started",
"order_id": "PAYBYBANK-12345",
"message": null,
"additional_transaction_data": null,
"amount": 29.9,
"included_fees": "0.00",
"error_code": 0,
"client_action": "redirect",
"action_data": {
"url": "https://testapi.betterpayment.de/pay-by-bank/4d79a749-0f9e-4f77-8ac4-5acb2ac55b43"
}
}

Refund API

Refund API Request

transaction_idStringrequired
ID of the transaction to be refunded
amountFloat
Refunded amount. When omitted, full amount will be refunded
commentString
Any other reference that you would like to save in this refund request. Displayed in dashboard.
This example includes only the minimum required parameters to create a Pay by Bank refund. See the Create a Refund API reference for the full list of supported parameters.
Example Request
POST /rest/refund
Authorization: Basic <base64(api_key:api_password)>
Content-Type: application/json
{
"transaction_id": "4d79a749-0f9e-4f77-8ac4-5acb2ac55b43",
"amount": "29.90",
"comment": "Goods returned"
}

Refund API Response

note

The response is attributed to the Refund object — not the transaction. Thus, the status_code and status will differ from transaction values.

transaction_idString
ID of the refunded transaction
refund_idString
ID of the created refund object
statusString
Status of the refund (STARTED, SUCCESS, ERROR)
status_codeInteger
Status code of the refund (0 for STARTED, 1 for SUCCESS, 2 for ERROR)
error_codeInteger
Error code for the response
Example Response
{
"transaction_id": "4d79a749-0f9e-4f77-8ac4-5acb2ac55b43",
"refund_id": "d64f85aa-3c43-4f18-9a43-4d2b46ddbb2c",
"status_code": 1,
"status": "successful",
"error_code": 0
}

Postbacks

For the full list of payment postback fields, see the Payment API. For refund postbacks, see the Refund API. For retry policy and signature verification, see Postbacks.

Test Data

SEPA Capability Embedded Flow Test Bank

Step 1 (AIS)

  • username: max.mustermann
  • password: 12345
  • otp: 987654

Step 2 (PIS)

  • username: max.mustermann
  • password: 12345
  • otp: 111111