Barion API: Initialize a new payment
/payment/start API endpoint is used to create a new payment in the Barion system.
Prerequisites before use:
v2 This API endpoint is available in API v2 only.
This API endpoint is designed to be used in the following scenarios:
|Properties marked with this must be provided to comply with 3D Secure authentication. The more attributes you provide the more chance you have to avoid the challenge flow.|
Important: if the merchant does not provide 3DS-related properties, it doesn't mean that the payment will fail. It means that the payer will have a higher chance of getting a challenge during payment.
|Property name||Property type||Limitations and constraints||Description|
||The secret API key of the shop, generated by Barion. This lets the shop to authenticate through the Barion API, but does not provide access to the account owning the shop itself.|
||The type of payment, which can be either immediate or a money reservation. Reservation means that the shop has a time window to finish the payment (even though the money transaction still takes place immediately). Reservation amounts can be modified during this time window unless the new amount is lower than the original.|
||Only makes sense at reservation payments. This is the time window that allows the shop to finish (finalize) the payment. If this does not happen within the time window, the system refunds the payment amount to the payer.|
||This is the time window that allows the shop to complete (finalize) the payment. If this does not happen within the time window, the system releases the payment amount.|
||Time window for the payment to be completed. The payer must execute the payment before this elapses, or else the payment will expire and can no longer be completed.|
||Flag indicating whether the payment can be completed without a registered Barion wallet. Guest checkout can only be done with bank cards, and the payer must supply a valid e-mail address - this is necessary for fraud control.|
||This flag indicates that the shop would like to initialize a token payment. This means that the shop is authorized to charge the funding source of the payer in the future without redirecting her/him to the Barion Smart Gateway. It can be used for one-click and subscription payment scenarios.
Click here to learn more about token payments: Token_payment
||A string used to identify a given token payment. Its purpose is determined by the value of the InitiateRecurrence property.
||An array of strings containing the allowed funding sources that can be used to complete the payment.|
||The unique identifier for the payment generated by the shop. This is so the shop can track its own payment identifiers. It is also useful for bookkeeping purposes since this shows up in the monthly account statement and the transaction history export, making identification of payments easier for the shop.|
||The shop can supply an e-mail address as a hint on who should complete the payment. This can be used if the shop is certain about that the payer has an active Barion wallet or the shop would like to help the guest payer with filling in the email field for her/him. If provided, the Barion Smart Gateway automatically fills out the e-mail address field in the Barion wallet login form and the guest payer form, speeding up the payment process.|
||The shop can provide a hint for the customer's name on the card to speed up the payment flow. If a value is provided, the cardholder name input will be pre-filled with it and the customer can use the pre-filled value instead of typing it out on its own, which speeds up the payment process.|
||Describes the nature of the token payment.|
||Identifies the nature of the token payment.|
||The URL where the payer should be redirected after the payment is completed or canceled. The payment identifier is added to the query string part of this URL in the |
||The URL where the Barion system sends a request whenever there is a change in the state of the payment. The payment identifier is added to the query string part of this URL in the |
||An array of payment transactions contained in the payment. A payment must contain at least one such transaction. See the PaymentTransaction page for the appropriate structure and syntax.
Defining multiple transactions allow the payment initiator to distribute the payment amount between multiple shops. See the following page to learn more: Facilitated payments
||The order number generated by the shop. This is to aid the shop in identifying a given payment in its own system. This also shows up in generated monthly account statements and transaction history exports, so it also helps with bookkeeping.|
||The shipping address associated with the payment, if applicable. Providing this is recommended because it helps the automatic anti-fraud analysis get more accurate results. See the ShippingAddress page for the appropriate structure and syntax.|
||This indicates in which language the Barion Smart Gateway should display for the payer upon redirect.|
|The currency of the payment. Must be supplied in ISO 4217 format. This affects all transactions included in the payment; it is not possible to define multiple transactions in different currencies.|
||The mobile phone number of the payer. Must be set to enable payment buttons. The number must be sent in the expected format, without + sign or leading zero(s).|
||The work phone of the payer. The number must be sent in the expected format, without + sign or leading zero(s).|
||The home phone number of the payer. The number must be sent in the expected format, without + sign or leading zero(s).|
||The billing address associated with the payment, if applicable.|
||Information about the account of the payer in the merchant's system.|
||Information about current purchase.|
||The merchant's preference of the 3DS challenge. Here you can specify what 3DS authentication should be utilized.|
|Property name||Property type||Description|
|PaymentId||Guid||The identifier of the newly initialized payment, generated by the Barion system.|
|PaymentRequestId||string||The payment identifier supplied by the API caller in the request.|
|Status||PaymentStatus||The status of the payment in the Barion system.|
|QRUrl||string||URL for a QR code representing the payment. This is useful in physical real life situations where the payer uses a mobile device.|
|RecurrenceResult||RecurrenceResult||Indicates the result of an authorized payment scenario. The result depends on the values of the InitiateRecurrence and RecurrenceId properties supplied in the request.
|Transactions||ProcessedTransaction||An array containing all transactions associated with the payment. If the Barion system deducts fees from the shop after payments, this also contains these additional fee transactions beside the payment transactions that were sent in the request.|
|GatewayUrl||string||The URL of the Barion Smart Gateway (including the payment identifier), where the API caller should redirect the payer.|
|CallbackUrl||string||The URL (including the payment identifier) where the Barion system will send a request to whenever there is a change in the state of the payment. If an explicit URL was not supplied, this will be the callback URL associated with the shop that started the payment.|
|RedirectUrl||string||The URL (including the payment identifier) where the payer gets redirected to after the payment is completed or cancelled. If an explicit URL was not supplied, this will be the redirect URL associated with the shop that started the payment.|
|ThreeDSAuthClientData||string||Encrypted client authentication data required for 3D Secure processing. This value can be used when the webshop first tried to complete the payment without user interaction, but the charge failed due to a 3D Secure challenge being mandatory.|
|TraceId||string||A unique value generated by the card issuer to track a chain of recurring or token payments that require 3D Secure authentication. This shall be used in such scenarios, otherwise it can be ignored.|