Create a payment without MPI (3DS required)
When the 3DS parameters are not provided, the gateway triggers its own 3DS flow. The response will have status: "pending" and a client_action that the merchant must handle.
POST/rest/payment
/rest/paymentProduction URL
https://api.betterpayment.de/rest/paymentTest URL
https://testapi.betterpayment.de/rest/paymentpayment_typeStringrequiredcardecomorder_idStringrequiredAny alphanumeric string to identify the Merchant's order
amountFloatrequiredAmount of the transaction including all taxes and shipping fees
currencyStringrequired3 letter currency code
postback_urlStringrequiredThe URL for updates about transaction status are posted
success_urlStringrequiredWhere to redirect the user after a successful transaction
error_urlStringrequiredWhere to redirect the user after a failed transaction
card_numberStringrequiredFull card number (PAN) of the cardholder
card_holderStringrequiredName of the cardholder as printed on the card
card_cvvStringrequiredCard verification value (3 digits on back of card)
card_expiry_monthStringrequiredExpiry month of the card (2 digits, e.g. 01–12)
card_expiry_yearStringrequiredExpiry year of the card (4 digits, e.g. 2026)
This example includes only the minimum required parameters. See the Payment API Reference for the full list. The optional processing parameters from Cardholder Data Parameters such as
card_entry, charge_order, clearing_mode, clear_after, and sca_exemption_request are also accepted in this flow.Example RequestHTTP
POST /rest/payment
Authorization: Basic <base64(api_key:api_password)>
Content-Type: application/json
{
"payment_type": "cardecom",
"order_id": "12345678",
"amount": "15.90",
"currency": "EUR",
"postback_url": "https://your-postback.url.com",
"success_url": "https://your-success.url.com",
"error_url": "https://your-error.url.com",
"card_number": "4761070000000509",
"card_holder": "John Doe",
"card_cvv": "196",
"card_expiry_month": "12",
"card_expiry_year": "2026"
}
Payment API Response
transaction_idStringID of the created transaction
payment_typeStringPayment type of the transaction
status_codeIntegerStatus code of the transaction
statusStringStatus of the transaction
order_idStringOrder ID of the transaction
messageStringOptional additional information about the transaction result
additional_transaction_dataStringAdditional 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.amountFloatAmount of the transaction
included_feesStringIncluded fees for the transaction
error_codeIntegerError code for the response
client_actionStringIndicates the required client-side action. Possible values: postForm (build and submit a POST form using the data in
action_data) or redirect (redirect to the url in action_data).action_dataObjectContains:
url (target URL of the action) and, in case of a postForm, fields (key/value pairs of the data to be posted).The merchant must build a form on their frontend and POST the
fields to the provided url in action_data. This will redirect the customer to the 3DS authentication page. Once 3DS is completed, the customer is returned to the merchant's success_url or error_url.Example ResponseJSON
{
"transaction_id": "d1bf9fdf-7268-406f-9e08-8d5a9540ab97",
"payment_type": "cardecom",
"status_code": 2,
"status": "pending",
"order_id": "12345678",
"message": null,
"additional_transaction_data": null,
"amount": 15.90,
"included_fees": "0.00",
"error_code": 0,
"client_action": "postForm",
"action_data": {
"url": "https://3ds-acs-url.example.com/v1/acs/challenge-initiate",
"fields": {
"creq": "eyJ0aHJlZURTU2VydmVyVHJ..."
}
}
}
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
Visa
| Parameter | Test Value |
|---|---|
card_number | 4761070000000509 |
card_holder | any name |
card_cvv | any 3 digit number |
card_expiry_month | any month (e.g. 12) |
card_expiry_year | any year in the future (e.g. 2026) |
mastercard
| Parameter | Test Value |
|---|---|
card_number | 5286940020000908 |
card_holder | any name |
card_cvv | any 3 digit number |
card_expiry_month | any month (e.g. 12) |
card_expiry_year | any year in the future (e.g. 2026) |
Complete the client_action returned in the response (postForm or redirect) to continue with the gateway 3DS flow.