<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.barion.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vinczei</id>
	<title>Barion Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.barion.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vinczei"/>
	<link rel="alternate" type="text/html" href="https://docs.barion.com/Special:Contributions/Vinczei"/>
	<updated>2026-11-21T17:26:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://docs.barion.com/index.php?title=Payment-GetPaymentState-v2&amp;diff=3876</id>
		<title>Payment-GetPaymentState-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Payment-GetPaymentState-v2&amp;diff=3876"/>
		<updated>2023-04-17T12:43:27Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Output properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Request the current state of a payment}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=GET&lt;br /&gt;
|uri=/v2/Payment/GetPaymentState&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/payment/getpaymentstate&amp;lt;/code&amp;gt; API endpoint is used to query the details and current state of a given payment.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Creating_a_shop|Creating a shop in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
* API: [[Payment-Start-v2 | /Payment/Start]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
[[Barion Shop Authentication]]&lt;br /&gt;
&lt;br /&gt;
== Use cases ==&lt;br /&gt;
&lt;br /&gt;
This API endpoint is designed to be used in the following scenarios:&lt;br /&gt;
* [[Responsive_web_payment|Responsive Web Payment]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| POSKey || Guid || &lt;br /&gt;
* Required&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PaymentId || Guid || &lt;br /&gt;
* Required&lt;br /&gt;
|| The identifier of the payment in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| PaymentId || Guid || The identifier of the payment in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PaymentRequestId || string || The identifier of the payment in the shop&#039;s system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| POSId || Guid || The public identifier of the shop that created the payment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| POSName || string || The name of the shop that created the payment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| POSOwnerEmail || string || The e-mail address of the owner of the shop that created the payment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| POSOwnerCountry || string || ISO2 country code of the owner of the shop that created the payment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Status || [[PaymentStatus]] || The current status of the payment in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PaymentType || string || The type of the payment. Can be &amp;lt;code&amp;gt;Immediate&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Reservation&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| AllowedFundingSources || string[] || The allowed funding sources that were defined when creating the payment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| FundingSource || string || The funding source that was used to complete the payment. If the payment is not yet completed, this is empty. Can be &amp;lt;code&amp;gt;Balance&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;BankCard&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;BankTransfer&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| FundingInformation || [[FundingInformation]] || Detailed information about the funding source that was used to complete the payment. If the payment is not yet completed, this is empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecurrenceType || [[RecurrenceType]] || The RecurrenceType that was defined in the payment/start request for the recurring scenario.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TraceId || string || The Trace Id that identifies that recurring scenario. Read more about this [[Token_payment_3D_Secure|here]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| GuestCheckout || bool || Indicates whether the payment allows guest checkout.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| CreatedAt || DateTime || The timestamp showing when the payment was created.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| CompletedAt || DateTime || The timestamp showing when the payment was completed. If the payment is not yet completed, this is empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ValidUntil || DateTime || Timestamp showing the expiration time of the payment time window. The payment must be completed before this elapses.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ReservedUntil || DateTime || Timestamp showing the expiration time of the reservation time window. The reserved payment must be finished before this elapses. If the payment type is not reservation, this is empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| DelayedCaptureUntil || DateTime || Timestamp showing the expiration time of the authorization time window. The authorized payment must be finished before this elapses. If the payment type is not DelayedCapture, this is empty.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Transactions || [[DetailedPaymentTransaction]][] || An array containing a detailed structure of all transactions associated with the payment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Total || decimal || The total amount of the payment &amp;lt;u&amp;gt;at the time of the request&amp;lt;/u&amp;gt;. If a reservation was finished with a lower amount, or a previously completed payment was refunded, this can be less than at the time of creation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The 3 character ISO 4217 currency code of the payment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| SuggestedLocale || string || Indicates in which language the Barion Smart Gateway should be shown for the payer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| FraudRiskScore || int || A risk score computed by the anti-fraud analysis, between a range of 0 (completely legit) to 100 (certain fraud). Transactions under 10 are usually safe. Transactions with 10 an more, but less than 30 are risky, caution is advised. Transactions with 30 and over are blocked automatically for being almost certainly fraudulent.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| CallbackUrl || string || The URL (including the payment identifier) where the Barion system will send (or already sent) a request to whenever there is a change in the state of the payment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RedirectUrl || string|| The URL (including the payment identifier) where the payer gets (or already got) redirected to after the payment is or was completed or cancelled.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=DetailedPaymentTransaction&amp;diff=3875</id>
		<title>DetailedPaymentTransaction</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=DetailedPaymentTransaction&amp;diff=3875"/>
		<updated>2023-04-17T12:42:40Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Property list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Detailed payment transaction structure}}&lt;br /&gt;
&lt;br /&gt;
This structure represents a detailed description of a payment transaction of a payment.&lt;br /&gt;
This is similar to the [[PaymentTransaction]] structure, but it contains more information about the transaction.&lt;br /&gt;
&lt;br /&gt;
= API usage =&lt;br /&gt;
&lt;br /&gt;
This structure is used by the following API endpoints:&lt;br /&gt;
* [[Payment-GetPaymentState-v2]]&lt;br /&gt;
&lt;br /&gt;
= Property list =&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the transaction generated by the Barion system.&lt;br /&gt;
|-&lt;br /&gt;
| POSTransactionId || string || The unique identifier of the transaction at the shop that started the payment.&lt;br /&gt;
|-&lt;br /&gt;
| TransactionTime || Timestamp || The timestamp of the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| Total || decimal || The original amount of the transaction. This is determined upon payment creation and is not affected by any later events (e.g. finishing a reservation with a lower amount, or refunding a payment).&lt;br /&gt;
|-&lt;br /&gt;
| Currency || string || The 3 character ISO 4217 currency code of the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| Payer || [[UserInformation]] || The user that paid the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| Payee || [[UserInformation]] || The user that received the money from the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| Comment || string || The comment of the transaction set by the shop when the payment was created.&lt;br /&gt;
|-&lt;br /&gt;
| Status || [[TransactionStatus]] || The current status of the transaction. This is NOT the same as the status of the payment itself.&lt;br /&gt;
|-&lt;br /&gt;
| TransactionType || [[TransactionType]] || The type of the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| Items || [[Item]][] || The items included in the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| RelatedId || Guid || The identifier of the related transaction, if it exists. For example, additional fee transactions have the identifier of the original payment transaction in this field.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=BalanceChangeType&amp;diff=3872</id>
		<title>BalanceChangeType</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=BalanceChangeType&amp;diff=3872"/>
		<updated>2023-03-27T11:08:16Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: Created page with &amp;quot;{{PageTitle|title=Balance change type type enumeration}}  This enum indicates the direction of change regarding the account&amp;#039;s available balance. It is used in context of a cer...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Balance change type type enumeration}}&lt;br /&gt;
&lt;br /&gt;
This enum indicates the direction of change regarding the account&#039;s available balance. It is used in context of a certain transaction.&lt;br /&gt;
&lt;br /&gt;
= Included in =&lt;br /&gt;
&lt;br /&gt;
Balance change types are used in the following structures:&lt;br /&gt;
* [[UserHistory-GetHistory-v3]]&lt;br /&gt;
&lt;br /&gt;
= Enum list =&lt;br /&gt;
&lt;br /&gt;
{{api_enum_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| NoChange || 1 || The account&#039;s balance did not change&lt;br /&gt;
|-&lt;br /&gt;
| Credit || 2 || The account&#039;s balance has been increased&lt;br /&gt;
|-&lt;br /&gt;
| Debit || 3 || The account&#039;s balance has been decreased&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=UserHistory-GetHistory-v3&amp;diff=3871</id>
		<title>UserHistory-GetHistory-v3</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=UserHistory-GetHistory-v3&amp;diff=3871"/>
		<updated>2023-03-27T11:04:55Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Output properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: transaction history}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=GET&lt;br /&gt;
|uri=/v3/UserHistory/GetHistory&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/v3/UserHistory/GetHistory&amp;lt;/code&amp;gt; API endpoint is used to query the transaction history from the Barion system for the authenticated wallet.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=This API should not be used for reconciliation, use the [[Statement-Download-v2 | statement API]] instead.|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=The item type of history elements does not correlate with the type of transactions exported through GUI or downloaded with[[Statement-Download-v2 | statement API]].|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
[[Barion Wallet Authentication]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
The input properties should be defined in the query string.&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| LastVisibleItemId || Guid ||&lt;br /&gt;
* Optional&lt;br /&gt;
 || &lt;br /&gt;
The identifier of the oldest transaction. Only transactions before the defined transaction will be included in the response.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| LastRequestTime || DateTime || &lt;br /&gt;
* Optional&lt;br /&gt;
*Universal Time Coordinated (UTC)&lt;br /&gt;
|| &lt;br /&gt;
The exact time of the last request. Only transactions after the defined request time will be included in the response.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Limit || int || &lt;br /&gt;
* Optional&lt;br /&gt;
* If not defined the default value is 20&lt;br /&gt;
* If the defined value is greater than 20 the default value will be used&lt;br /&gt;
|| &lt;br /&gt;
The expected number of transactions in the response.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Must be supplied in ISO 4217 format&lt;br /&gt;
Accepted values: &lt;br /&gt;
{{CurrencyList}}&lt;br /&gt;
|| The currency of the transaction. If the currency is defined, then only transactions in the same currency will be included in the response.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| Id || Guid || The identifier of the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| Type || [[HistoryItemType]] || The type of the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| HappenedAtUtc || DateTime || The exact time when the transaction happened.&lt;br /&gt;
|-&lt;br /&gt;
| ConcurrencyOrder || int || The order of the transaction when more than one transaction happened at the same time. When only one transaction happened at a given timestamp, this value can be ignored.&lt;br /&gt;
|-&lt;br /&gt;
| SourceAccount || [[UserHistoryParticipant]] || The user who initiated the transaction or from whom the money originated.&lt;br /&gt;
|-&lt;br /&gt;
| TargetAccount || [[UserHistoryParticipant]] || The user who will receive the amount of the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| Amount || decimal || The amount of the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| Currency || string || The 3-character ISO 4217 currency code of the payment.&lt;br /&gt;
|-&lt;br /&gt;
| Description || string || Description of the transaction. Max: 640 characters.&lt;br /&gt;
|-&lt;br /&gt;
| IsInProgress || bool || This flag indicates that the transaction is not in the final state.&lt;br /&gt;
|-&lt;br /&gt;
| BalanceChangeType || [[BalanceChangeType]] || Indicates the direction of change regarding the account&#039;s available balance.&amp;lt;br&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;NoChange&#039;&#039;&#039;: the account&#039;s balance did not change after the transaction&lt;br /&gt;
* &#039;&#039;&#039;Credit&#039;&#039;&#039;: the account&#039;s balance has increased after the transaction&lt;br /&gt;
* &#039;&#039;&#039;Debit&#039;&#039;&#039;: the account&#039;s balance has decreased after the transaction&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Note: this property is only available in the TEST environment at the moment&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=UserHistory-GetHistory-v3&amp;diff=3768</id>
		<title>UserHistory-GetHistory-v3</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=UserHistory-GetHistory-v3&amp;diff=3768"/>
		<updated>2023-01-19T08:10:17Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: Created page with &amp;quot;{{PageTitle|title=Barion API: transaction history}}  {{TableOfContents}}  {{api_callmethod |method=GET |uri=/v3/UserHistory/GetHistory }}  The &amp;lt;code&amp;gt;/v3/UserHistory/GetHistory...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: transaction history}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=GET&lt;br /&gt;
|uri=/v3/UserHistory/GetHistory&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/v3/UserHistory/GetHistory&amp;lt;/code&amp;gt; API endpoint is used to query the transaction history from the Barion system for the authenticated wallet.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=This API should not be used for reconciliation, use the [[Statement-Download-v2 | statement API]] instead.|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=The item type of history elements does not correlate with the type of transactions exported through GUI or downloaded with[[Statement-Download-v2 | statement API]].|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
[[Barion Wallet Authentication]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
The input properties should be defined in the query string.&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| LastVisibleItemId || Guid ||&lt;br /&gt;
* Optional&lt;br /&gt;
 || &lt;br /&gt;
The identifier of the most recent transaction. Only transactions after the defined transaction will be included in the response.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| LastRequestTime || DateTime || &lt;br /&gt;
* Optional&lt;br /&gt;
*Universal Time Coordinated (UTC)&lt;br /&gt;
|| &lt;br /&gt;
The exact time of the last request. Only transactions after the defined request time will be included in the response.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Limit || int || &lt;br /&gt;
* Optional&lt;br /&gt;
* If not defined the default value is 20&lt;br /&gt;
* If the defined value is greater than 20 the default value will be used&lt;br /&gt;
|| &lt;br /&gt;
The expected number of transactions in the response.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Must be supplied in ISO 4217 format&lt;br /&gt;
Accepted values: &lt;br /&gt;
{{CurrencyList}}&lt;br /&gt;
|| The currency of the transaction. If the currency is defined, then only transactions in the same currency will be included in the response.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| Id || Guid || The identifier of the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| Type || [[HistoryItemType]] || The type of the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| HappenedAtUtc || DateTime || The exact time when the transaction happened.&lt;br /&gt;
|-&lt;br /&gt;
| ConcurrencyOrder || int || The order of the transaction when more than one transaction happened at the same time. When only one transaction happened at a given timestamp, this value can be ignored.&lt;br /&gt;
|-&lt;br /&gt;
| SourceAccount || [[UserHistoryParticipant]] || The user who initiated the transaction or from whom the money originated.&lt;br /&gt;
|-&lt;br /&gt;
| TargetAccount || [[UserHistoryParticipant]] || The user who will receive the amount of the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| Amount || decimal || The amount of the transaction.&lt;br /&gt;
|-&lt;br /&gt;
| Currency || string || The 3-character ISO 4217 currency code of the payment.&lt;br /&gt;
|-&lt;br /&gt;
| Description || string || Description of the transaction. Max: 640 characters.&lt;br /&gt;
|-&lt;br /&gt;
| IsInProgress || bool || This flag indicates that the transaction is not in the final state.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Barion_Wallet_Authentication&amp;diff=3761</id>
		<title>Barion Wallet Authentication</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Barion_Wallet_Authentication&amp;diff=3761"/>
		<updated>2022-11-25T09:24:53Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Managing API keys */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is wallet authentication? =&lt;br /&gt;
&lt;br /&gt;
Some API endpoints can only be reached using wallet-level authentication (for a full list see [[List_of_API_endpoints|List of Barion API endpoints]]). This is achieved through the usage of API keys tied to each wallet.&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=NOTE|text=This feature is only available to business accounts.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
= Using API keys =&lt;br /&gt;
&lt;br /&gt;
To use an endpoint which requires wallet-level authentication, simply send your API key in the &amp;lt;code&amp;gt;x-api-key&amp;lt;/code&amp;gt; header of your request.&lt;br /&gt;
&lt;br /&gt;
You can directly use values copied from the secure site&#039;s access page.&lt;br /&gt;
&lt;br /&gt;
= Managing API keys =&lt;br /&gt;
&lt;br /&gt;
The management interface of wallet-level API keys can be found on the [https://secure.barion.com Barion secure site] under the &amp;lt;tt&amp;gt;Wallet -&amp;gt; Access&amp;lt;/tt&amp;gt; menu item.&lt;br /&gt;
&lt;br /&gt;
[[File:Wallet_key_management_page_2.png|The wallet key management page with only one active API key]]&lt;br /&gt;
&lt;br /&gt;
You can view your currently active API key or place it onto the clipboard via clicking the icons on the right side of the screen.&lt;br /&gt;
&lt;br /&gt;
== Rotating keys ==&lt;br /&gt;
&lt;br /&gt;
In case a key&#039;s secrecy is compromised it is important to change it to avoid unauthorized parties from using Barion in your name.&lt;br /&gt;
&lt;br /&gt;
You can add a new API key to your wallet by clicking the &amp;quot;rotate&amp;quot; icon to the right of the key. &amp;lt;strong&amp;gt;This does not deactivate the old API key&amp;lt;/strong&amp;gt;, it just adds a new one. After changing all usages of the old key to the new one, the old one can be safely deleted.&lt;br /&gt;
&lt;br /&gt;
[[File:Wallet_key_management_page_-_under_rotation_2.png|The wallet key management page with two active API keys]]&lt;br /&gt;
&lt;br /&gt;
As there can only be at most two active API keys tied to a wallet at all times, it is not possible to rotate one of two active keys. You&#039;ll have to delete one of them to start rotating the other one.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=File:Wallet_key_management_page_2.png&amp;diff=3760</id>
		<title>File:Wallet key management page 2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=File:Wallet_key_management_page_2.png&amp;diff=3760"/>
		<updated>2022-11-25T09:24:31Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=File:Wallet_key_management_page_-_under_rotation_2.png&amp;diff=3759</id>
		<title>File:Wallet key management page - under rotation 2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=File:Wallet_key_management_page_-_under_rotation_2.png&amp;diff=3759"/>
		<updated>2022-11-25T09:24:06Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=File:Wallet_key_management_page.png&amp;diff=3758</id>
		<title>File:Wallet key management page.png</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=File:Wallet_key_management_page.png&amp;diff=3758"/>
		<updated>2022-11-25T09:22:32Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: Vinczei uploaded a new version of File:Wallet key management page.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
A cropped screenshot of the secure site&#039;s wallet key management interface.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Barion_Wallet_Authentication&amp;diff=3753</id>
		<title>Barion Wallet Authentication</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Barion_Wallet_Authentication&amp;diff=3753"/>
		<updated>2022-11-21T09:49:38Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is wallet authentication? =&lt;br /&gt;
&lt;br /&gt;
Some API endpoints can only be reached using wallet-level authentication (for a full list see [[List_of_API_endpoints|List of Barion API endpoints]]). This is achieved through the usage of API keys tied to each wallet.&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=NOTE|text=This feature is only available to organizations registered to Barion. |color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
= Using API keys =&lt;br /&gt;
&lt;br /&gt;
To use an endpoint which requires wallet-level authentication, simply send your API key in the &amp;lt;code&amp;gt;x-api-key&amp;lt;/code&amp;gt; header of your request.&lt;br /&gt;
&lt;br /&gt;
The format of the key should be with lower case letters and &amp;lt;strong&amp;gt;without dashes&amp;lt;/strong&amp;gt;. You can directly use values copied from the secure site&#039;s access page.&lt;br /&gt;
&lt;br /&gt;
= Managing API keys =&lt;br /&gt;
&lt;br /&gt;
The management interface of wallet-level API keys can be found on the [https://secure.barion.com Barion secure site] under the &amp;lt;tt&amp;gt;Wallet -&amp;gt; Access&amp;lt;/tt&amp;gt; menu item.&lt;br /&gt;
&lt;br /&gt;
[[File:Wallet_key_management_page.png|The wallet key management page with only one active API key]]&lt;br /&gt;
&lt;br /&gt;
You can view your currently active API key or place it onto the clipboard via clicking the icons on the right side of the screen.&lt;br /&gt;
&lt;br /&gt;
== Rotating keys ==&lt;br /&gt;
&lt;br /&gt;
In case a key&#039;s secrecy is compromised it is important to change it to avoid unauthorized parties from using Barion in your name.&lt;br /&gt;
&lt;br /&gt;
You can add a new API key to your wallet by clicking the &amp;quot;rotate&amp;quot; icon to the right of the key. &amp;lt;strong&amp;gt;This does not deactivate the old API key&amp;lt;/strong&amp;gt;, it just adds a new one. After changing all usages of the old key to the new one, the old one can be safely deleted.&lt;br /&gt;
&lt;br /&gt;
[[File:Wallet_key_management_page_-_under_rotation.png|The wallet key management page with two active API keys]]&lt;br /&gt;
&lt;br /&gt;
As there can only be at most two active API keys tied to a wallet at all times, it is not possible to rotate one of two active keys. You&#039;ll have to delete one of them to start rotating the other one.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3593</id>
		<title>Withdraw-BankTransfer-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3593"/>
		<updated>2022-09-01T07:06:32Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initiate a bank transfer}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Withdraw/BankTransfer&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/withdraw/banktransfer&amp;lt;/code&amp;gt; API endpoint is used to send money out of the Barion system via bank (wire) transfer.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=This API endpoint is obsolete as of August 2022. Please implement or migrate to [[Withdraw-BankTransfer-v3|/v3/Withdraw/BankTransfer]]|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=Starting September 2022 this API endpoint does NOT accept withdrawal requests in CZK currency that are targeted &amp;lt;u&amp;gt;outside of Czechia&amp;lt;/u&amp;gt;.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Barion users are authenticated either with username/password provided in the query string or with basic authentication. You can find more information about basic authentication [[Basic_authentication|here]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;CZK&amp;quot; (Czech crown)&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the bank transfer. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Barion does not do currency rate conversion. The caller must have an active account with the selected currency, and must ensure that the target bank accepts the selected currency.&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#920000;&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; Withdraws in CZK currency that are targeted outside of Czechia are not supported on this endpoint starting September 2022.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to withdraw, excluding fees.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The name of the recipient of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment|| string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 90 characters&lt;br /&gt;
|| The comment of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || &lt;br /&gt;
* Required&lt;br /&gt;
|| Information about the recipient&#039;s bank account.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the bank transfer, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The currency of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || The total amount transferred.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || The name of the recipient of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || The comment of the bank transfer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || The bank account data.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Possible error responses  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| ModelValidationError || This happens when some of the input properties fail the basic validation. For example a string property exceeds its allowed length.&lt;br /&gt;
|-&lt;br /&gt;
| AuthenticationFailed || The provided UserName or Password are not correct.&lt;br /&gt;
|-&lt;br /&gt;
| MinimumWithdrawAmountNotReached || The amount specified does not reach the minimum bank transfer amount. &#039;&#039;&#039;This is not in production yet&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCharacter || One of the characters is invalid for the bank transfer process&lt;br /&gt;
|-&lt;br /&gt;
| InvalidAccount || There is no account belonging to the user with the specified currency.&lt;br /&gt;
|-&lt;br /&gt;
| InappropriateVerificationLevel || The user does not have the verification level to be able to transfer.&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCurrency || The system does not support the specified currency&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCountry || The Country specified in the BankAccount field is invalid.&lt;br /&gt;
|-&lt;br /&gt;
| LowBalance || There are not enough funds to cover the withdraw amount and the fee.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberBlackListed || The target bankaccount number is on blacklist, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsOverWithdrawLimit|| The withdraw amount exceeded the allowed limit for non-verified customers, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsDeleted || The user is deleted from the system, the withdraw is not possible. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsSuspended || The user is suspended until the suspension is lifted no withdraws are allowed.&lt;br /&gt;
|-&lt;br /&gt;
| WithdrawFromCustomerAccountToSystemAccount || Withdraw to the specified target account is not allowed.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberNotAllowed|| Target Bank account number not in the list of allowed bank account numbers for this account.&lt;br /&gt;
|-&lt;br /&gt;
| InternalServerError || Something unexpected happened&lt;br /&gt;
|-&lt;br /&gt;
| UnsupportedWithdraw || In the case of foreign CZK transfers (targeted outside of Czechia) this endpoint is not suitable to start the transfer. Please upgrade to the [[Withdraw-BankTransfer-v3|v3 version]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer amount limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Amount limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Minimum 100 CZK&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer character limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Character limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || Allowed characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, á, ä, č, ď, é, ě, í, ľ, ň, ó, ô, ö, ř, ŕ, š, ť, ú, ů, ü, ý, ž, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Á, Ä, Č, Ď, É, Ě, Í, Ľ, Ň, Ó, Ô, Ö, Ř, Ŕ, Š, Ť, Ú, Ů, Ü, Ý, Ž, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, !, &amp;quot;, #, $, %, &amp;amp;, *, ;, &amp;lt;, =, &amp;gt;, @, [, ], ^, `, {, |, }, ~, §, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3592</id>
		<title>Withdraw-BankTransfer-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3592"/>
		<updated>2022-09-01T07:06:23Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initiate a bank transfer}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Withdraw/BankTransfer&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/withdraw/banktransfer&amp;lt;/code&amp;gt; API endpoint is used to send money out of the Barion system via bank (wire) transfer.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=This API endpoint is obsolete as of August 2022. Please implement or migrate to [[Withdraw-BankTransfer-v3|/v3/Withdraw/BankTransfer]]|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=As of September 2022 this API endpoint does NOT accept withdrawal requests in CZK currency that are targeted &amp;lt;u&amp;gt;outside of Czechia&amp;lt;/u&amp;gt;.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Barion users are authenticated either with username/password provided in the query string or with basic authentication. You can find more information about basic authentication [[Basic_authentication|here]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;CZK&amp;quot; (Czech crown)&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the bank transfer. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Barion does not do currency rate conversion. The caller must have an active account with the selected currency, and must ensure that the target bank accepts the selected currency.&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#920000;&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; Withdraws in CZK currency that are targeted outside of Czechia are not supported on this endpoint starting September 2022.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to withdraw, excluding fees.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The name of the recipient of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment|| string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 90 characters&lt;br /&gt;
|| The comment of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || &lt;br /&gt;
* Required&lt;br /&gt;
|| Information about the recipient&#039;s bank account.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the bank transfer, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The currency of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || The total amount transferred.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || The name of the recipient of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || The comment of the bank transfer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || The bank account data.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Possible error responses  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| ModelValidationError || This happens when some of the input properties fail the basic validation. For example a string property exceeds its allowed length.&lt;br /&gt;
|-&lt;br /&gt;
| AuthenticationFailed || The provided UserName or Password are not correct.&lt;br /&gt;
|-&lt;br /&gt;
| MinimumWithdrawAmountNotReached || The amount specified does not reach the minimum bank transfer amount. &#039;&#039;&#039;This is not in production yet&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCharacter || One of the characters is invalid for the bank transfer process&lt;br /&gt;
|-&lt;br /&gt;
| InvalidAccount || There is no account belonging to the user with the specified currency.&lt;br /&gt;
|-&lt;br /&gt;
| InappropriateVerificationLevel || The user does not have the verification level to be able to transfer.&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCurrency || The system does not support the specified currency&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCountry || The Country specified in the BankAccount field is invalid.&lt;br /&gt;
|-&lt;br /&gt;
| LowBalance || There are not enough funds to cover the withdraw amount and the fee.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberBlackListed || The target bankaccount number is on blacklist, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsOverWithdrawLimit|| The withdraw amount exceeded the allowed limit for non-verified customers, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsDeleted || The user is deleted from the system, the withdraw is not possible. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsSuspended || The user is suspended until the suspension is lifted no withdraws are allowed.&lt;br /&gt;
|-&lt;br /&gt;
| WithdrawFromCustomerAccountToSystemAccount || Withdraw to the specified target account is not allowed.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberNotAllowed|| Target Bank account number not in the list of allowed bank account numbers for this account.&lt;br /&gt;
|-&lt;br /&gt;
| InternalServerError || Something unexpected happened&lt;br /&gt;
|-&lt;br /&gt;
| UnsupportedWithdraw || In the case of foreign CZK transfers (targeted outside of Czechia) this endpoint is not suitable to start the transfer. Please upgrade to the [[Withdraw-BankTransfer-v3|v3 version]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer amount limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Amount limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Minimum 100 CZK&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer character limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Character limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || Allowed characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, á, ä, č, ď, é, ě, í, ľ, ň, ó, ô, ö, ř, ŕ, š, ť, ú, ů, ü, ý, ž, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Á, Ä, Č, Ď, É, Ě, Í, Ľ, Ň, Ó, Ô, Ö, Ř, Ŕ, Š, Ť, Ú, Ů, Ü, Ý, Ž, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, !, &amp;quot;, #, $, %, &amp;amp;, *, ;, &amp;lt;, =, &amp;gt;, @, [, ], ^, `, {, |, }, ~, §, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3591</id>
		<title>Withdraw-BankTransfer-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3591"/>
		<updated>2022-09-01T07:05:54Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Input properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initiate a bank transfer}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Withdraw/BankTransfer&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/withdraw/banktransfer&amp;lt;/code&amp;gt; API endpoint is used to send money out of the Barion system via bank (wire) transfer.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=This API endpoint is obsolete as of August 2022. Please implement or migrate to [[Withdraw-BankTransfer-v3|/v3/Withdraw/BankTransfer]]|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=As of September 2022 this API endpoint does NOT accept withdrawal requests in CZK currency.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Barion users are authenticated either with username/password provided in the query string or with basic authentication. You can find more information about basic authentication [[Basic_authentication|here]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;CZK&amp;quot; (Czech crown)&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the bank transfer. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Barion does not do currency rate conversion. The caller must have an active account with the selected currency, and must ensure that the target bank accepts the selected currency.&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#920000;&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; Withdraws in CZK currency that are targeted outside of Czechia are not supported on this endpoint starting September 2022.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to withdraw, excluding fees.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The name of the recipient of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment|| string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 90 characters&lt;br /&gt;
|| The comment of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || &lt;br /&gt;
* Required&lt;br /&gt;
|| Information about the recipient&#039;s bank account.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the bank transfer, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The currency of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || The total amount transferred.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || The name of the recipient of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || The comment of the bank transfer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || The bank account data.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Possible error responses  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| ModelValidationError || This happens when some of the input properties fail the basic validation. For example a string property exceeds its allowed length.&lt;br /&gt;
|-&lt;br /&gt;
| AuthenticationFailed || The provided UserName or Password are not correct.&lt;br /&gt;
|-&lt;br /&gt;
| MinimumWithdrawAmountNotReached || The amount specified does not reach the minimum bank transfer amount. &#039;&#039;&#039;This is not in production yet&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCharacter || One of the characters is invalid for the bank transfer process&lt;br /&gt;
|-&lt;br /&gt;
| InvalidAccount || There is no account belonging to the user with the specified currency.&lt;br /&gt;
|-&lt;br /&gt;
| InappropriateVerificationLevel || The user does not have the verification level to be able to transfer.&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCurrency || The system does not support the specified currency&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCountry || The Country specified in the BankAccount field is invalid.&lt;br /&gt;
|-&lt;br /&gt;
| LowBalance || There are not enough funds to cover the withdraw amount and the fee.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberBlackListed || The target bankaccount number is on blacklist, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsOverWithdrawLimit|| The withdraw amount exceeded the allowed limit for non-verified customers, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsDeleted || The user is deleted from the system, the withdraw is not possible. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsSuspended || The user is suspended until the suspension is lifted no withdraws are allowed.&lt;br /&gt;
|-&lt;br /&gt;
| WithdrawFromCustomerAccountToSystemAccount || Withdraw to the specified target account is not allowed.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberNotAllowed|| Target Bank account number not in the list of allowed bank account numbers for this account.&lt;br /&gt;
|-&lt;br /&gt;
| InternalServerError || Something unexpected happened&lt;br /&gt;
|-&lt;br /&gt;
| UnsupportedWithdraw || In the case of foreign CZK transfers (targeted outside of Czechia) this endpoint is not suitable to start the transfer. Please upgrade to the [[Withdraw-BankTransfer-v3|v3 version]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer amount limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Amount limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Minimum 100 CZK&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer character limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Character limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || Allowed characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, á, ä, č, ď, é, ě, í, ľ, ň, ó, ô, ö, ř, ŕ, š, ť, ú, ů, ü, ý, ž, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Á, Ä, Č, Ď, É, Ě, Í, Ľ, Ň, Ó, Ô, Ö, Ř, Ŕ, Š, Ť, Ú, Ů, Ü, Ý, Ž, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, !, &amp;quot;, #, $, %, &amp;amp;, *, ;, &amp;lt;, =, &amp;gt;, @, [, ], ^, `, {, |, }, ~, §, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3590</id>
		<title>Withdraw-BankTransfer-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3590"/>
		<updated>2022-09-01T07:05:18Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Bank transfer amount limitations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initiate a bank transfer}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Withdraw/BankTransfer&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/withdraw/banktransfer&amp;lt;/code&amp;gt; API endpoint is used to send money out of the Barion system via bank (wire) transfer.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=This API endpoint is obsolete as of August 2022. Please implement or migrate to [[Withdraw-BankTransfer-v3|/v3/Withdraw/BankTransfer]]|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=As of September 2022 this API endpoint does NOT accept withdrawal requests in CZK currency.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Barion users are authenticated either with username/password provided in the query string or with basic authentication. You can find more information about basic authentication [[Basic_authentication|here]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;lt;s&amp;gt;&amp;quot;CZK&amp;quot; (Czech crown)&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the bank transfer. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Barion does not do currency rate conversion. The caller must have an active account with the selected currency, and must ensure that the target bank accepts the selected currency.&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#920000;&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; CZK currency is not supported on this endpoint starting September 2022.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to withdraw, excluding fees.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The name of the recipient of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment|| string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 90 characters&lt;br /&gt;
|| The comment of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || &lt;br /&gt;
* Required&lt;br /&gt;
|| Information about the recipient&#039;s bank account.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the bank transfer, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The currency of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || The total amount transferred.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || The name of the recipient of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || The comment of the bank transfer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || The bank account data.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Possible error responses  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| ModelValidationError || This happens when some of the input properties fail the basic validation. For example a string property exceeds its allowed length.&lt;br /&gt;
|-&lt;br /&gt;
| AuthenticationFailed || The provided UserName or Password are not correct.&lt;br /&gt;
|-&lt;br /&gt;
| MinimumWithdrawAmountNotReached || The amount specified does not reach the minimum bank transfer amount. &#039;&#039;&#039;This is not in production yet&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCharacter || One of the characters is invalid for the bank transfer process&lt;br /&gt;
|-&lt;br /&gt;
| InvalidAccount || There is no account belonging to the user with the specified currency.&lt;br /&gt;
|-&lt;br /&gt;
| InappropriateVerificationLevel || The user does not have the verification level to be able to transfer.&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCurrency || The system does not support the specified currency&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCountry || The Country specified in the BankAccount field is invalid.&lt;br /&gt;
|-&lt;br /&gt;
| LowBalance || There are not enough funds to cover the withdraw amount and the fee.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberBlackListed || The target bankaccount number is on blacklist, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsOverWithdrawLimit|| The withdraw amount exceeded the allowed limit for non-verified customers, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsDeleted || The user is deleted from the system, the withdraw is not possible. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsSuspended || The user is suspended until the suspension is lifted no withdraws are allowed.&lt;br /&gt;
|-&lt;br /&gt;
| WithdrawFromCustomerAccountToSystemAccount || Withdraw to the specified target account is not allowed.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberNotAllowed|| Target Bank account number not in the list of allowed bank account numbers for this account.&lt;br /&gt;
|-&lt;br /&gt;
| InternalServerError || Something unexpected happened&lt;br /&gt;
|-&lt;br /&gt;
| UnsupportedWithdraw || In the case of foreign CZK transfers (targeted outside of Czechia) this endpoint is not suitable to start the transfer. Please upgrade to the [[Withdraw-BankTransfer-v3|v3 version]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer amount limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Amount limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Minimum 100 CZK&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer character limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Character limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || Allowed characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, á, ä, č, ď, é, ě, í, ľ, ň, ó, ô, ö, ř, ŕ, š, ť, ú, ů, ü, ý, ž, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Á, Ä, Č, Ď, É, Ě, Í, Ľ, Ň, Ó, Ô, Ö, Ř, Ŕ, Š, Ť, Ú, Ů, Ü, Ý, Ž, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, !, &amp;quot;, #, $, %, &amp;amp;, *, ;, &amp;lt;, =, &amp;gt;, @, [, ], ^, `, {, |, }, ~, §, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3589</id>
		<title>Withdraw-BankTransfer-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3589"/>
		<updated>2022-09-01T07:05:07Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Bank transfer character limitations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initiate a bank transfer}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Withdraw/BankTransfer&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/withdraw/banktransfer&amp;lt;/code&amp;gt; API endpoint is used to send money out of the Barion system via bank (wire) transfer.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=This API endpoint is obsolete as of August 2022. Please implement or migrate to [[Withdraw-BankTransfer-v3|/v3/Withdraw/BankTransfer]]|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=As of September 2022 this API endpoint does NOT accept withdrawal requests in CZK currency.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Barion users are authenticated either with username/password provided in the query string or with basic authentication. You can find more information about basic authentication [[Basic_authentication|here]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;lt;s&amp;gt;&amp;quot;CZK&amp;quot; (Czech crown)&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the bank transfer. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Barion does not do currency rate conversion. The caller must have an active account with the selected currency, and must ensure that the target bank accepts the selected currency.&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#920000;&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; CZK currency is not supported on this endpoint starting September 2022.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to withdraw, excluding fees.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The name of the recipient of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment|| string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 90 characters&lt;br /&gt;
|| The comment of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || &lt;br /&gt;
* Required&lt;br /&gt;
|| Information about the recipient&#039;s bank account.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the bank transfer, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The currency of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || The total amount transferred.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || The name of the recipient of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || The comment of the bank transfer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || The bank account data.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Possible error responses  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| ModelValidationError || This happens when some of the input properties fail the basic validation. For example a string property exceeds its allowed length.&lt;br /&gt;
|-&lt;br /&gt;
| AuthenticationFailed || The provided UserName or Password are not correct.&lt;br /&gt;
|-&lt;br /&gt;
| MinimumWithdrawAmountNotReached || The amount specified does not reach the minimum bank transfer amount. &#039;&#039;&#039;This is not in production yet&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCharacter || One of the characters is invalid for the bank transfer process&lt;br /&gt;
|-&lt;br /&gt;
| InvalidAccount || There is no account belonging to the user with the specified currency.&lt;br /&gt;
|-&lt;br /&gt;
| InappropriateVerificationLevel || The user does not have the verification level to be able to transfer.&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCurrency || The system does not support the specified currency&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCountry || The Country specified in the BankAccount field is invalid.&lt;br /&gt;
|-&lt;br /&gt;
| LowBalance || There are not enough funds to cover the withdraw amount and the fee.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberBlackListed || The target bankaccount number is on blacklist, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsOverWithdrawLimit|| The withdraw amount exceeded the allowed limit for non-verified customers, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsDeleted || The user is deleted from the system, the withdraw is not possible. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsSuspended || The user is suspended until the suspension is lifted no withdraws are allowed.&lt;br /&gt;
|-&lt;br /&gt;
| WithdrawFromCustomerAccountToSystemAccount || Withdraw to the specified target account is not allowed.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberNotAllowed|| Target Bank account number not in the list of allowed bank account numbers for this account.&lt;br /&gt;
|-&lt;br /&gt;
| InternalServerError || Something unexpected happened&lt;br /&gt;
|-&lt;br /&gt;
| UnsupportedWithdraw || In the case of foreign CZK transfers (targeted outside of Czechia) this endpoint is not suitable to start the transfer. Please upgrade to the [[Withdraw-BankTransfer-v3|v3 version]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer amount limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Amount limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;No limitation&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Minimum 100 CZK&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer character limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Character limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || Allowed characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, á, ä, č, ď, é, ě, í, ľ, ň, ó, ô, ö, ř, ŕ, š, ť, ú, ů, ü, ý, ž, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Á, Ä, Č, Ď, É, Ě, Í, Ľ, Ň, Ó, Ô, Ö, Ř, Ŕ, Š, Ť, Ú, Ů, Ü, Ý, Ž, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, !, &amp;quot;, #, $, %, &amp;amp;, *, ;, &amp;lt;, =, &amp;gt;, @, [, ], ^, `, {, |, }, ~, §, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3588</id>
		<title>Withdraw-BankTransfer-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3588"/>
		<updated>2022-09-01T07:04:27Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Bank transfer character limitations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initiate a bank transfer}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Withdraw/BankTransfer&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/withdraw/banktransfer&amp;lt;/code&amp;gt; API endpoint is used to send money out of the Barion system via bank (wire) transfer.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=This API endpoint is obsolete as of August 2022. Please implement or migrate to [[Withdraw-BankTransfer-v3|/v3/Withdraw/BankTransfer]]|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=As of September 2022 this API endpoint does NOT accept withdrawal requests in CZK currency.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Barion users are authenticated either with username/password provided in the query string or with basic authentication. You can find more information about basic authentication [[Basic_authentication|here]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;lt;s&amp;gt;&amp;quot;CZK&amp;quot; (Czech crown)&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the bank transfer. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Barion does not do currency rate conversion. The caller must have an active account with the selected currency, and must ensure that the target bank accepts the selected currency.&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#920000;&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; CZK currency is not supported on this endpoint starting September 2022.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to withdraw, excluding fees.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The name of the recipient of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment|| string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 90 characters&lt;br /&gt;
|| The comment of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || &lt;br /&gt;
* Required&lt;br /&gt;
|| Information about the recipient&#039;s bank account.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the bank transfer, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The currency of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || The total amount transferred.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || The name of the recipient of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || The comment of the bank transfer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || The bank account data.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Possible error responses  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| ModelValidationError || This happens when some of the input properties fail the basic validation. For example a string property exceeds its allowed length.&lt;br /&gt;
|-&lt;br /&gt;
| AuthenticationFailed || The provided UserName or Password are not correct.&lt;br /&gt;
|-&lt;br /&gt;
| MinimumWithdrawAmountNotReached || The amount specified does not reach the minimum bank transfer amount. &#039;&#039;&#039;This is not in production yet&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCharacter || One of the characters is invalid for the bank transfer process&lt;br /&gt;
|-&lt;br /&gt;
| InvalidAccount || There is no account belonging to the user with the specified currency.&lt;br /&gt;
|-&lt;br /&gt;
| InappropriateVerificationLevel || The user does not have the verification level to be able to transfer.&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCurrency || The system does not support the specified currency&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCountry || The Country specified in the BankAccount field is invalid.&lt;br /&gt;
|-&lt;br /&gt;
| LowBalance || There are not enough funds to cover the withdraw amount and the fee.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberBlackListed || The target bankaccount number is on blacklist, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsOverWithdrawLimit|| The withdraw amount exceeded the allowed limit for non-verified customers, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsDeleted || The user is deleted from the system, the withdraw is not possible. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsSuspended || The user is suspended until the suspension is lifted no withdraws are allowed.&lt;br /&gt;
|-&lt;br /&gt;
| WithdrawFromCustomerAccountToSystemAccount || Withdraw to the specified target account is not allowed.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberNotAllowed|| Target Bank account number not in the list of allowed bank account numbers for this account.&lt;br /&gt;
|-&lt;br /&gt;
| InternalServerError || Something unexpected happened&lt;br /&gt;
|-&lt;br /&gt;
| UnsupportedWithdraw || In the case of foreign CZK transfers (targeted outside of Czechia) this endpoint is not suitable to start the transfer. Please upgrade to the [[Withdraw-BankTransfer-v3|v3 version]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer amount limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Amount limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;No limitation&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Minimum 100 CZK&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer character limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Character limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK || &amp;lt;s&amp;gt;Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Allowed characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, á, ä, č, ď, é, ě, í, ľ, ň, ó, ô, ö, ř, ŕ, š, ť, ú, ů, ü, ý, ž, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Á, Ä, Č, Ď, É, Ě, Í, Ľ, Ň, Ó, Ô, Ö, Ř, Ŕ, Š, Ť, Ú, Ů, Ü, Ý, Ž, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, !, &amp;quot;, #, $, %, &amp;amp;, *, ;, &amp;lt;, =, &amp;gt;, @, [, ], ^, `, {, |, }, ~, §, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3587</id>
		<title>Withdraw-BankTransfer-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3587"/>
		<updated>2022-09-01T07:03:56Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Bank transfer amount limitations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initiate a bank transfer}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Withdraw/BankTransfer&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/withdraw/banktransfer&amp;lt;/code&amp;gt; API endpoint is used to send money out of the Barion system via bank (wire) transfer.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=This API endpoint is obsolete as of August 2022. Please implement or migrate to [[Withdraw-BankTransfer-v3|/v3/Withdraw/BankTransfer]]|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=As of September 2022 this API endpoint does NOT accept withdrawal requests in CZK currency.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Barion users are authenticated either with username/password provided in the query string or with basic authentication. You can find more information about basic authentication [[Basic_authentication|here]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;lt;s&amp;gt;&amp;quot;CZK&amp;quot; (Czech crown)&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the bank transfer. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Barion does not do currency rate conversion. The caller must have an active account with the selected currency, and must ensure that the target bank accepts the selected currency.&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#920000;&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; CZK currency is not supported on this endpoint starting September 2022.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to withdraw, excluding fees.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The name of the recipient of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment|| string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 90 characters&lt;br /&gt;
|| The comment of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || &lt;br /&gt;
* Required&lt;br /&gt;
|| Information about the recipient&#039;s bank account.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the bank transfer, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The currency of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || The total amount transferred.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || The name of the recipient of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || The comment of the bank transfer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || The bank account data.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Possible error responses  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| ModelValidationError || This happens when some of the input properties fail the basic validation. For example a string property exceeds its allowed length.&lt;br /&gt;
|-&lt;br /&gt;
| AuthenticationFailed || The provided UserName or Password are not correct.&lt;br /&gt;
|-&lt;br /&gt;
| MinimumWithdrawAmountNotReached || The amount specified does not reach the minimum bank transfer amount. &#039;&#039;&#039;This is not in production yet&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCharacter || One of the characters is invalid for the bank transfer process&lt;br /&gt;
|-&lt;br /&gt;
| InvalidAccount || There is no account belonging to the user with the specified currency.&lt;br /&gt;
|-&lt;br /&gt;
| InappropriateVerificationLevel || The user does not have the verification level to be able to transfer.&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCurrency || The system does not support the specified currency&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCountry || The Country specified in the BankAccount field is invalid.&lt;br /&gt;
|-&lt;br /&gt;
| LowBalance || There are not enough funds to cover the withdraw amount and the fee.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberBlackListed || The target bankaccount number is on blacklist, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsOverWithdrawLimit|| The withdraw amount exceeded the allowed limit for non-verified customers, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsDeleted || The user is deleted from the system, the withdraw is not possible. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsSuspended || The user is suspended until the suspension is lifted no withdraws are allowed.&lt;br /&gt;
|-&lt;br /&gt;
| WithdrawFromCustomerAccountToSystemAccount || Withdraw to the specified target account is not allowed.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberNotAllowed|| Target Bank account number not in the list of allowed bank account numbers for this account.&lt;br /&gt;
|-&lt;br /&gt;
| InternalServerError || Something unexpected happened&lt;br /&gt;
|-&lt;br /&gt;
| UnsupportedWithdraw || In the case of foreign CZK transfers (targeted outside of Czechia) this endpoint is not suitable to start the transfer. Please upgrade to the [[Withdraw-BankTransfer-v3|v3 version]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer amount limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Amount limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;No limitation&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;CZK&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Not Czechia&amp;lt;/s&amp;gt; || &amp;lt;s&amp;gt;Minimum 100 CZK&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer character limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Character limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, á, ä, č, ď, é, ě, í, ľ, ň, ó, ô, ö, ř, ŕ, š, ť, ú, ů, ü, ý, ž, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Á, Ä, Č, Ď, É, Ě, Í, Ľ, Ň, Ó, Ô, Ö, Ř, Ŕ, Š, Ť, Ú, Ů, Ü, Ý, Ž, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, !, &amp;quot;, #, $, %, &amp;amp;, *, ;, &amp;lt;, =, &amp;gt;, @, [, ], ^, `, {, |, }, ~, §, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Not Czechia || Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3586</id>
		<title>Withdraw-BankTransfer-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3586"/>
		<updated>2022-09-01T07:03:16Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Possible error responses */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initiate a bank transfer}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Withdraw/BankTransfer&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/withdraw/banktransfer&amp;lt;/code&amp;gt; API endpoint is used to send money out of the Barion system via bank (wire) transfer.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=This API endpoint is obsolete as of August 2022. Please implement or migrate to [[Withdraw-BankTransfer-v3|/v3/Withdraw/BankTransfer]]|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=As of September 2022 this API endpoint does NOT accept withdrawal requests in CZK currency.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Barion users are authenticated either with username/password provided in the query string or with basic authentication. You can find more information about basic authentication [[Basic_authentication|here]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;lt;s&amp;gt;&amp;quot;CZK&amp;quot; (Czech crown)&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the bank transfer. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Barion does not do currency rate conversion. The caller must have an active account with the selected currency, and must ensure that the target bank accepts the selected currency.&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#920000;&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; CZK currency is not supported on this endpoint starting September 2022.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to withdraw, excluding fees.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The name of the recipient of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment|| string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 90 characters&lt;br /&gt;
|| The comment of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || &lt;br /&gt;
* Required&lt;br /&gt;
|| Information about the recipient&#039;s bank account.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the bank transfer, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The currency of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || The total amount transferred.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || The name of the recipient of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || The comment of the bank transfer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || The bank account data.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Possible error responses  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| ModelValidationError || This happens when some of the input properties fail the basic validation. For example a string property exceeds its allowed length.&lt;br /&gt;
|-&lt;br /&gt;
| AuthenticationFailed || The provided UserName or Password are not correct.&lt;br /&gt;
|-&lt;br /&gt;
| MinimumWithdrawAmountNotReached || The amount specified does not reach the minimum bank transfer amount. &#039;&#039;&#039;This is not in production yet&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCharacter || One of the characters is invalid for the bank transfer process&lt;br /&gt;
|-&lt;br /&gt;
| InvalidAccount || There is no account belonging to the user with the specified currency.&lt;br /&gt;
|-&lt;br /&gt;
| InappropriateVerificationLevel || The user does not have the verification level to be able to transfer.&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCurrency || The system does not support the specified currency&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCountry || The Country specified in the BankAccount field is invalid.&lt;br /&gt;
|-&lt;br /&gt;
| LowBalance || There are not enough funds to cover the withdraw amount and the fee.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberBlackListed || The target bankaccount number is on blacklist, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsOverWithdrawLimit|| The withdraw amount exceeded the allowed limit for non-verified customers, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsDeleted || The user is deleted from the system, the withdraw is not possible. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsSuspended || The user is suspended until the suspension is lifted no withdraws are allowed.&lt;br /&gt;
|-&lt;br /&gt;
| WithdrawFromCustomerAccountToSystemAccount || Withdraw to the specified target account is not allowed.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberNotAllowed|| Target Bank account number not in the list of allowed bank account numbers for this account.&lt;br /&gt;
|-&lt;br /&gt;
| InternalServerError || Something unexpected happened&lt;br /&gt;
|-&lt;br /&gt;
| UnsupportedWithdraw || In the case of foreign CZK transfers (targeted outside of Czechia) this endpoint is not suitable to start the transfer. Please upgrade to the [[Withdraw-BankTransfer-v3|v3 version]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer amount limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Amount limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Not Czechia || Minimum 100 CZK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer character limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Character limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, á, ä, č, ď, é, ě, í, ľ, ň, ó, ô, ö, ř, ŕ, š, ť, ú, ů, ü, ý, ž, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Á, Ä, Č, Ď, É, Ě, Í, Ľ, Ň, Ó, Ô, Ö, Ř, Ŕ, Š, Ť, Ú, Ů, Ü, Ý, Ž, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, !, &amp;quot;, #, $, %, &amp;amp;, *, ;, &amp;lt;, =, &amp;gt;, @, [, ], ^, `, {, |, }, ~, §, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Not Czechia || Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3585</id>
		<title>Withdraw-BankTransfer-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3585"/>
		<updated>2022-09-01T07:02:57Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Input properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initiate a bank transfer}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Withdraw/BankTransfer&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/withdraw/banktransfer&amp;lt;/code&amp;gt; API endpoint is used to send money out of the Barion system via bank (wire) transfer.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=This API endpoint is obsolete as of August 2022. Please implement or migrate to [[Withdraw-BankTransfer-v3|/v3/Withdraw/BankTransfer]]|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=As of September 2022 this API endpoint does NOT accept withdrawal requests in CZK currency.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Barion users are authenticated either with username/password provided in the query string or with basic authentication. You can find more information about basic authentication [[Basic_authentication|here]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;lt;s&amp;gt;&amp;quot;CZK&amp;quot; (Czech crown)&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the bank transfer. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Barion does not do currency rate conversion. The caller must have an active account with the selected currency, and must ensure that the target bank accepts the selected currency.&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#920000;&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; CZK currency is not supported on this endpoint starting September 2022.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to withdraw, excluding fees.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The name of the recipient of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment|| string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 90 characters&lt;br /&gt;
|| The comment of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || &lt;br /&gt;
* Required&lt;br /&gt;
|| Information about the recipient&#039;s bank account.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the bank transfer, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The currency of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || The total amount transferred.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || The name of the recipient of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || The comment of the bank transfer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || The bank account data.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Possible error responses  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| ModelValidationError || This happens when some of the input properties fail the basic validation. For example a string property exceeds its allowed length.&lt;br /&gt;
|-&lt;br /&gt;
| AuthenticationFailed || The provided UserName or Password are not correct.&lt;br /&gt;
|-&lt;br /&gt;
| MinimumWithdrawAmountNotReached || The amount specified does not reach the minimum bank transfer amount. &#039;&#039;&#039;This is not in production yet&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCharacter || One of the characters is invalid for the bank transfer process&lt;br /&gt;
|-&lt;br /&gt;
| InvalidAccount || There is no account belonging to the user with the specified currency.&lt;br /&gt;
|-&lt;br /&gt;
| InappropriateVerificationLevel || The user does not have the verification level to be able to transfer.&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCurrency || The system does not support the specified currency&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCountry || The Country specified in the BankAccount field is invalid.&lt;br /&gt;
|-&lt;br /&gt;
| LowBalance || There are not enough funds to cover the withdraw amount and the fee.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberBlackListed || The target bankaccount number is on blacklist, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsOverWithdrawLimit|| The withdraw amount exceeded the allowed limit for non-verified customers, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsDeleted || The user is deleted from the system, the withdraw is not possible. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsSuspended || The user is suspended until the suspension is lifted no withdraws are allowed.&lt;br /&gt;
|-&lt;br /&gt;
| WithdrawFromCustomerAccountToSystemAccount || Withdraw to the specified target account is not allowed.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberNotAllowed|| Target Bank account number not in the list of allowed bank account numbers for this account.&lt;br /&gt;
|-&lt;br /&gt;
| InternalServerError || Something unexpected happened&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;background:orange;padding:0 5px; color:white;&amp;quot;&amp;gt;SOON&amp;lt;/span&amp;gt; UnsupportedWithdraw || In the case of foreign CZK transfers (targeted outside of Czechia) this endpoint is not suitable to start the transfer. Please upgrade to the [[Withdraw-BankTransfer-v3|v3 version]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer amount limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Amount limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Not Czechia || Minimum 100 CZK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer character limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Character limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, á, ä, č, ď, é, ě, í, ľ, ň, ó, ô, ö, ř, ŕ, š, ť, ú, ů, ü, ý, ž, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Á, Ä, Č, Ď, É, Ě, Í, Ľ, Ň, Ó, Ô, Ö, Ř, Ŕ, Š, Ť, Ú, Ů, Ü, Ý, Ž, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, !, &amp;quot;, #, $, %, &amp;amp;, *, ;, &amp;lt;, =, &amp;gt;, @, [, ], ^, `, {, |, }, ~, §, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Not Czechia || Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3584</id>
		<title>Withdraw-BankTransfer-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3584"/>
		<updated>2022-09-01T07:01:24Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initiate a bank transfer}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Withdraw/BankTransfer&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/withdraw/banktransfer&amp;lt;/code&amp;gt; API endpoint is used to send money out of the Barion system via bank (wire) transfer.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=This API endpoint is obsolete as of August 2022. Please implement or migrate to [[Withdraw-BankTransfer-v3|/v3/Withdraw/BankTransfer]]|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=As of September 2022 this API endpoint does NOT accept withdrawal requests in CZK currency.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Barion users are authenticated either with username/password provided in the query string or with basic authentication. You can find more information about basic authentication [[Basic_authentication|here]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;CZK&amp;quot; (Czech crown)&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the bank transfer. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Barion does not do currency rate conversion. The caller must have an active account with the selected currency, and must ensure that the target bank accepts the selected currency.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to withdraw, excluding fees.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The name of the recipient of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment|| string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 90 characters&lt;br /&gt;
|| The comment of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || &lt;br /&gt;
* Required&lt;br /&gt;
|| Information about the recipient&#039;s bank account.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the bank transfer, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The currency of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || The total amount transferred.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || The name of the recipient of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || The comment of the bank transfer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || The bank account data.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Possible error responses  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| ModelValidationError || This happens when some of the input properties fail the basic validation. For example a string property exceeds its allowed length.&lt;br /&gt;
|-&lt;br /&gt;
| AuthenticationFailed || The provided UserName or Password are not correct.&lt;br /&gt;
|-&lt;br /&gt;
| MinimumWithdrawAmountNotReached || The amount specified does not reach the minimum bank transfer amount. &#039;&#039;&#039;This is not in production yet&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCharacter || One of the characters is invalid for the bank transfer process&lt;br /&gt;
|-&lt;br /&gt;
| InvalidAccount || There is no account belonging to the user with the specified currency.&lt;br /&gt;
|-&lt;br /&gt;
| InappropriateVerificationLevel || The user does not have the verification level to be able to transfer.&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCurrency || The system does not support the specified currency&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCountry || The Country specified in the BankAccount field is invalid.&lt;br /&gt;
|-&lt;br /&gt;
| LowBalance || There are not enough funds to cover the withdraw amount and the fee.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberBlackListed || The target bankaccount number is on blacklist, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsOverWithdrawLimit|| The withdraw amount exceeded the allowed limit for non-verified customers, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsDeleted || The user is deleted from the system, the withdraw is not possible. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsSuspended || The user is suspended until the suspension is lifted no withdraws are allowed.&lt;br /&gt;
|-&lt;br /&gt;
| WithdrawFromCustomerAccountToSystemAccount || Withdraw to the specified target account is not allowed.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberNotAllowed|| Target Bank account number not in the list of allowed bank account numbers for this account.&lt;br /&gt;
|-&lt;br /&gt;
| InternalServerError || Something unexpected happened&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;background:orange;padding:0 5px; color:white;&amp;quot;&amp;gt;SOON&amp;lt;/span&amp;gt; UnsupportedWithdraw || In the case of foreign CZK transfers (targeted outside of Czechia) this endpoint is not suitable to start the transfer. Please upgrade to the [[Withdraw-BankTransfer-v3|v3 version]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer amount limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Amount limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Not Czechia || Minimum 100 CZK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer character limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Character limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, á, ä, č, ď, é, ě, í, ľ, ň, ó, ô, ö, ř, ŕ, š, ť, ú, ů, ü, ý, ž, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Á, Ä, Č, Ď, É, Ě, Í, Ľ, Ň, Ó, Ô, Ö, Ř, Ŕ, Š, Ť, Ú, Ů, Ü, Ý, Ž, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, !, &amp;quot;, #, $, %, &amp;amp;, *, ;, &amp;lt;, =, &amp;gt;, @, [, ], ^, `, {, |, }, ~, §, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Not Czechia || Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3583</id>
		<title>Withdraw-BankTransfer-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Withdraw-BankTransfer-v2&amp;diff=3583"/>
		<updated>2022-09-01T07:01:12Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initiate a bank transfer}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Withdraw/BankTransfer&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/withdraw/banktransfer&amp;lt;/code&amp;gt; API endpoint is used to send money out of the Barion system via bank (wire) transfer.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=This API endpoint is obsolete as of August 2022. Please implement or migrate to [[Withdraw-BankTransfer-v3|Withdraw/BankTransfer v3]]|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=As of September 2022 this API endpoint does NOT accept withdrawal requests in CZK currency.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Barion users are authenticated either with username/password provided in the query string or with basic authentication. You can find more information about basic authentication [[Basic_authentication|here]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;CZK&amp;quot; (Czech crown)&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the bank transfer. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Barion does not do currency rate conversion. The caller must have an active account with the selected currency, and must ensure that the target bank accepts the selected currency.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to withdraw, excluding fees.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The name of the recipient of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment|| string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 90 characters&lt;br /&gt;
|| The comment of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || &lt;br /&gt;
* Required&lt;br /&gt;
|| Information about the recipient&#039;s bank account.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the bank transfer, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The currency of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || The total amount transferred.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecipientName || string || The name of the recipient of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || The comment of the bank transfer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| BankAccount|| [[BankAccount]] || The bank account data.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Possible error responses  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| ModelValidationError || This happens when some of the input properties fail the basic validation. For example a string property exceeds its allowed length.&lt;br /&gt;
|-&lt;br /&gt;
| AuthenticationFailed || The provided UserName or Password are not correct.&lt;br /&gt;
|-&lt;br /&gt;
| MinimumWithdrawAmountNotReached || The amount specified does not reach the minimum bank transfer amount. &#039;&#039;&#039;This is not in production yet&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCharacter || One of the characters is invalid for the bank transfer process&lt;br /&gt;
|-&lt;br /&gt;
| InvalidAccount || There is no account belonging to the user with the specified currency.&lt;br /&gt;
|-&lt;br /&gt;
| InappropriateVerificationLevel || The user does not have the verification level to be able to transfer.&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCurrency || The system does not support the specified currency&lt;br /&gt;
|-&lt;br /&gt;
| InvalidCountry || The Country specified in the BankAccount field is invalid.&lt;br /&gt;
|-&lt;br /&gt;
| LowBalance || There are not enough funds to cover the withdraw amount and the fee.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberBlackListed || The target bankaccount number is on blacklist, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsOverWithdrawLimit|| The withdraw amount exceeded the allowed limit for non-verified customers, the withdraw process is terminated and the customer gets suspended. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsDeleted || The user is deleted from the system, the withdraw is not possible. &lt;br /&gt;
|-&lt;br /&gt;
| UserIsSuspended || The user is suspended until the suspension is lifted no withdraws are allowed.&lt;br /&gt;
|-&lt;br /&gt;
| WithdrawFromCustomerAccountToSystemAccount || Withdraw to the specified target account is not allowed.&lt;br /&gt;
|-&lt;br /&gt;
| BankAccountNumberNotAllowed|| Target Bank account number not in the list of allowed bank account numbers for this account.&lt;br /&gt;
|-&lt;br /&gt;
| InternalServerError || Something unexpected happened&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;background:orange;padding:0 5px; color:white;&amp;quot;&amp;gt;SOON&amp;lt;/span&amp;gt; UnsupportedWithdraw || In the case of foreign CZK transfers (targeted outside of Czechia) this endpoint is not suitable to start the transfer. Please upgrade to the [[Withdraw-BankTransfer-v3|v3 version]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer amount limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Amount limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Not Czechia || Minimum 100 CZK&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bank transfer character limitations  ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Currency || Target country || Character limitation&lt;br /&gt;
|-&lt;br /&gt;
| HUF || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| EUR || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| USD || Anywhere || No limitation&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Czechia || Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, á, ä, č, ď, é, ě, í, ľ, ň, ó, ô, ö, ř, ŕ, š, ť, ú, ů, ü, ý, ž, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Á, Ä, Č, Ď, É, Ě, Í, Ľ, Ň, Ó, Ô, Ö, Ř, Ŕ, Š, Ť, Ú, Ů, Ü, Ý, Ž, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, !, &amp;quot;, #, $, %, &amp;amp;, *, ;, &amp;lt;, =, &amp;gt;, @, [, ], ^, `, {, |, }, ~, §, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CZK || Not Czechia || Allowed characters: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /, -, ?, :, (, ), ., ,, &#039;, +, SPACE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Token_payment_3D_Secure&amp;diff=3378</id>
		<title>Token payment 3D Secure</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Token_payment_3D_Secure&amp;diff=3378"/>
		<updated>2022-05-05T10:02:32Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Possible error responses for the subsequent payment requests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Token Payment with 3D Secure}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This payment scenario allows the integrator shop to register a token for a customer (and a funding source) in the Barion system and then, later on, using this token, charge the customer without redirecting her to the Barion Smart Gateway UI. The user may be present at the site of the merchant or she can be off-session as well, so the merchant can charge her e.g. for subscriptions. This means that the customer authorizes the shop to charge her card or Barion balance without typing in the card information or Barion login again.&lt;br /&gt;
&lt;br /&gt;
[[File:3ds-recurring.png|1500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=Premium feature|text=This scenario is not allowed automatically for every approved shop and should be requested from Barion!|color=#1993c7}}&lt;br /&gt;
&lt;br /&gt;
= Token payment scenarios =&lt;br /&gt;
Token payment can be used in three use cases: &lt;br /&gt;
* &#039;&#039;&#039;Customer Initiated Payments&#039;&#039;&#039;: when the user is present on the website of the merchant and she decides to pay :&lt;br /&gt;
** &#039;&#039;&#039;OneClick payment&#039;&#039;&#039;: the user is charged upon her request initiated on the website of the merchant. Subsequent payments are subject to PSD2 SCA and as the user is present, she has to go through the authentication process.&lt;br /&gt;
* &#039;&#039;&#039;Merchant Initiated Payments&#039;&#039;&#039;: when the merchant initiates the payment without the user being present. It has two subtypes:&lt;br /&gt;
** &#039;&#039;&#039;Recurring payment&#039;&#039;&#039;: the user is charged with the same amount on a regular basis, typically in case of subscriptions. Subsequent payments are exempted from PSD2 SCA, but liability still shifts to the card issuer.&lt;br /&gt;
** &#039;&#039;&#039;MIT (merchant initiated transaction)&#039;&#039;&#039;: the user is charged on an irregular basis and/or with a different amount. Subsequent payments of this type are excluded from PSD2 SCA, the liability is on the merchant.&lt;br /&gt;
&lt;br /&gt;
== Customer participation ==&lt;br /&gt;
&lt;br /&gt;
Since the token scenario is suitable for both customer and merchant initiated payments here is a comparison about who starts the payment. This includes the regular, non-tokenized payment scenario as well:&lt;br /&gt;
&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | Scenario&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Initial payment&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Subsequent payments&lt;br /&gt;
|-&lt;br /&gt;
! Customer present&lt;br /&gt;
! Customer at Barion Smart GW &lt;br /&gt;
! Customer present&lt;br /&gt;
! Customer at Barion Smart GW&lt;br /&gt;
|-&lt;br /&gt;
| Non token (regular) payment || YES || YES || YES || YES &lt;br /&gt;
|-&lt;br /&gt;
| OneClick payment || YES || YES/NO&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; || YES || style=&amp;quot;background:#FFE2C4&amp;quot; | NO &lt;br /&gt;
|-&lt;br /&gt;
| Recurring payment || YES || YES/NO&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; || style=&amp;quot;background:#FFE2C4&amp;quot; | NO || style=&amp;quot;background:#FFE2C4&amp;quot; | NO &lt;br /&gt;
|-&lt;br /&gt;
| MIT || YES || YES/NO&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; || style=&amp;quot;background:#FFE2C4&amp;quot; | NO || style=&amp;quot;background:#FFE2C4&amp;quot; | NO &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #aaa; background-color:#eee; font-size: 0.8em; padding:5px 10px; display:inline-block;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; Token payment scenarios can be initiated with already registered &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; as well, in this case the customer may remain on the merchant&#039;s site. &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements for the scenarios ==&lt;br /&gt;
&lt;br /&gt;
These token payment scenarios have different requirements, this table below summarizes the key differences.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
! Payment amount&lt;br /&gt;
! Payment frequency&lt;br /&gt;
! Liability in case of fraud&lt;br /&gt;
|-&lt;br /&gt;
| OneClick payment || Various || Various || Card issuer&lt;br /&gt;
|-&lt;br /&gt;
| Recurring payment || Subsequent amounts must be equal or less than the initial amount  || Initial payment must define a minimum amount of days to wait between charges || Card issuer &lt;br /&gt;
|-&lt;br /&gt;
| Merchant initiated payment || Various  || Various || Merchant&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== 3DS authentication of the payer ==&lt;br /&gt;
&lt;br /&gt;
The new more secure 3DS v2 authentication must be performed for every online card payment. These token payment scenarios also have to use this new secure way of authentication. &lt;br /&gt;
The initial payment of a token scenario must be authenticated every time although the subsequent payments may be exempted in certain cases. &lt;br /&gt;
&lt;br /&gt;
Here is a table to compare the 3DS authentication requirements:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
! Initial payment&lt;br /&gt;
! Subsequent payments&lt;br /&gt;
|-&lt;br /&gt;
| One-click payment || ✔️ || ✔️&lt;br /&gt;
|-&lt;br /&gt;
| Recurring payment || ✔️ || &lt;br /&gt;
|-&lt;br /&gt;
| Merchant initiated payment || ✔️ || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;IMPORTANT:&#039;&#039; when performing subsequent One-click payments with the &amp;lt;code&amp;gt;ChallengePreference&amp;lt;/code&amp;gt; parameter set to &amp;lt;code&amp;gt;NoChallengeNeeded&amp;lt;/code&amp;gt; (indicating a request for Transaction Risk Analysis), only a fraud analysis will be performed, and the customer is not required to undergo a 3DS challenge.&lt;br /&gt;
&lt;br /&gt;
== Real life examples ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Phone bill&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Payer has a usage-based phone subscription that wants to pay without being present for every charge. She authorizes the phone company to charge her card every month.&lt;br /&gt;
* Scenario: Merchant Initiated Transaction&lt;br /&gt;
* Explanation: Despite the frequency of the charges is monthly, the amount of the subsequent payments may exceed the initial payment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TV subscription&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Payer subscribes to online streaming of a television channel. She authorizes the tv company to charge her card every month. The subscription fee is the same for every month.&lt;br /&gt;
* Scenario: Recurring payment&lt;br /&gt;
* Explanation: The amount of the subsequent payments will not exceed the initial payment and the charge is regularly monthly-based.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bookclub with &amp;quot;free first month&amp;quot; bonus&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Payer subscribes to a book renting service. he authorizes the book club to charge her card for a selection of books each month. The subscription fee is the same for every month however, the first month is free. To ensure the subscription the service requires her to register her card details.&lt;br /&gt;
* Scenario: Merchant Initiated Transaction&lt;br /&gt;
* Explanation: Despite the frequency of the charges is monthly, and the fee will stay the same, the initial payment is zero. So the amount of the next payment will exceed the initial payment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Online food delivery service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The food delivery company wants to provide a quick and easy experience for its customer. They decide that the order will be quicker if the customers don&#039;t leave the website to pay for the goods.&lt;br /&gt;
* Scenario: OneClick payment&lt;br /&gt;
* Explanation: The customer will always be there so the other two scenarios are not available.&lt;br /&gt;
&lt;br /&gt;
== How to decide ==&lt;br /&gt;
&lt;br /&gt;
To help you decide on a suitable scenario, please use the decision graph below:&lt;br /&gt;
&lt;br /&gt;
[[File:3ds-recurrencetype-decision.png|520px]]&lt;br /&gt;
&lt;br /&gt;
= Prerequisites =&lt;br /&gt;
To be able to integrate your webshop with the Barion Payment Gateway: &lt;br /&gt;
* You must [[Creating_an_account|register a Barion wallet]] at the Barion website or in the Sandbox environment. Learn more about the Sandbox environment [[Sandbox|here]].&lt;br /&gt;
* For this wallet you have to [[Creating_a_shop|create a shop]] which should be approved by Barion.&lt;br /&gt;
* For every currency you plan to conduct payments in you have to make sure there is an account created in your Barion wallet. This means that if you plan to have USD payments then there should be a USD account created in your wallet.&lt;br /&gt;
* To make sure every corner case scenario works for your webshop it is best to top up that account with a small amount (approx. 5-10EUR or your choice of currency around the same value).&lt;br /&gt;
* For the technical communication guide please read this: [[Calling_the_API|Calling the API]]&lt;br /&gt;
&lt;br /&gt;
= The payment process =&lt;br /&gt;
&lt;br /&gt;
The process is divided into two major steps:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;[[#Step 1:  Creating the funding source token|Creating the token]] that represents one of the customer&#039;s funding sources (credit card or e-money wallet)&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
         &amp;lt;li&amp;gt;Preparing the payment via the Barion API&amp;lt;/li&amp;gt;&lt;br /&gt;
         &amp;lt;li&amp;gt;Redirecting the customer to the Barion Smart Gateway to select a funding source&amp;lt;/li&amp;gt;&lt;br /&gt;
         &amp;lt;li&amp;gt;Processing the callback and requesting information about the result of the payment&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
   &amp;lt;/li&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;[[#Step 2: Using the token|Using the registered token]] to charge the customer&amp;lt;/li&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 1:  Creating the funding source token ==&lt;br /&gt;
To be able to use a token payment scenario first the merchant has to register the token with Barion. The merchant has to make sure that the customer is well aware of the fact that they are giving consent to a tokenized payment. The Barion Smart Gateway UI does not indicate in any way that the payment is a token payment.&lt;br /&gt;
&lt;br /&gt;
The token is registered to the shop and not to the merchant&#039;s Barion account. So if the merchant has multiple shops in its Barion account, the registered tokens can not be shared among them even if the customer is the same. If you want to use tokens in multiple shops, please contact Barion in the Customer center.&lt;br /&gt;
&lt;br /&gt;
=== 1.1 Preparing the payment===&lt;br /&gt;
&lt;br /&gt;
The token registration is basically a [[Responsive_web_payment|normal payment]] with three extra properties in the [[Payment-Start-v2|Payment/Start]] request:&lt;br /&gt;
* InitiateRecurrence&lt;br /&gt;
* RecurrenceId&lt;br /&gt;
* RecurrenceType&lt;br /&gt;
&lt;br /&gt;
==== InitiateRecurrence====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; is a bool property. If you set it to &#039;&#039;&#039;true&#039;&#039;&#039; then the payment gateway will consider the payment as a token registration. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This happens even if the customer is already has a registered token, so you are able to re-register a funding source or even a customer. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== RecurrenceId ====&lt;br /&gt;
The next required property for a token registration is the token itself. This is generated by the shop and has to be unique for every registration. The token should be specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; property of the [[Payment-Start-v2|Payment/Start]] request. This token must be saved in the webshops database. A &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; token represents the funding source (bank card or Barion balance) of a customer. Since a customer can have multiple cards and accounts as a funding source make sure that in the webshop&#039;s system multiple tokens can belong to a single customer.&lt;br /&gt;
&lt;br /&gt;
==== RecurrenceType ====&lt;br /&gt;
The third required property is the [[RecurrenceType|Recurrence Type]]. This specifies the scenario. In case of Recurring Payment &amp;lt;code&amp;gt;PurchaseInformation.RecurringExpiry&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PurchaseInformation.RecurringFrequency&amp;lt;/code&amp;gt; must also be set.&lt;br /&gt;
&lt;br /&gt;
==== Example JSON request for a Merchant Initiated Payment scenario ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-7&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: true,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;MerchantInitiatedPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subscription fee for the first month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-01&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The response will be the same as to a [[Responsive_web_payment#Processing_the_successful_response|basic &#039;&#039;&#039;Immediate&#039;&#039;&#039; scenario]]. The &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; property at this point is &#039;&#039;&#039;None&#039;&#039;&#039; since the token is not registered to a funding source yet.&lt;br /&gt;
&lt;br /&gt;
==== Example JSON request for a Recurring Payment scenario ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Recurring Payment&#039;&#039;&#039; scenario has some extra restrictions. The merchant has to specify two additional properties in the [[Payment-Start-v2|Payment/Start]] request:&lt;br /&gt;
* &amp;lt;code&amp;gt;RecurringExpiry&amp;lt;/code&amp;gt;: The date after subsequent charges should not be accepted.&lt;br /&gt;
* &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt;: The minimum days the merchant has to wait between payments.&lt;br /&gt;
&lt;br /&gt;
Both properties are located in the [[PurchaseInformation]] property and must be specified if this scenario is selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-7, 30-33&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: true,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;RecurringPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subscription fee for the first month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-01&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;PurchaseInformation&amp;quot;:{&lt;br /&gt;
        &amp;quot;RecurringFrequency&amp;quot;: 10,&lt;br /&gt;
        &amp;quot;RecurringExpiry&amp;quot;: &amp;quot;2022-10-01&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Possible error responses ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| RecurringPaymentNotAllowed || The token payment is not allowed for the shop identified by the &#039;&#039;&#039;POSKey&#039;&#039;&#039;. Contact Barion to request this feature.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 1.2 Redirecting the customer to the Barion Smart Gateway to select a funding source ===&lt;br /&gt;
&lt;br /&gt;
After a successful payment preparation, the customer is redirected to the secure Barion Smart Gateway to choose a funding source. The funding source the customer selects will be registered to the token. The funding source can either be a Barion e-money balance or a bank card. This means that even though the customer may own multiple cards only the one that was registered to the token can be used for future token payments. To change the funding source attached to the token a new registration should be requested.&lt;br /&gt;
&lt;br /&gt;
=== 1.3 Processing the callback and requesting information about the result of the payment ===&lt;br /&gt;
&lt;br /&gt;
When the payment is completed (either successfully or unsuccessfully) a callback message is sent to the merchant&#039;s system. Once received a [[Payment-GetPaymentState-v2|GetPaymentState]] request must be sent to the Barion API. On how to implement this please read the article about the  [[Callback_mechanism|Callback mechanism]].&lt;br /&gt;
&lt;br /&gt;
The full response of the GetPaymentState request depends on the payment scenario and the structure of the payment. When it comes to token payment there are several properties to look out for. &lt;br /&gt;
* In case the &amp;lt;code&amp;gt;Status&amp;lt;/code&amp;gt; is &#039;&#039;&#039;Succeeded&#039;&#039;&#039; the funding source token is registered and ready to use.&lt;br /&gt;
* The &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; contains the ID of the token process. This specifies the nature of the token payment. &lt;br /&gt;
&lt;br /&gt;
==== TraceId ====&lt;br /&gt;
&lt;br /&gt;
In case of Recurring payment or Merchant initiated payment scenarios the [[Payment-GetPaymentState-v2|GetPaymentState]] response returns an additional field called &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;. The value of this property is generated by the card issuer and is up to a 100 characters, and should be left intact (whitespaces and 0s can&#039;t be trimmed). The merchant has to save it and submit it in all subsequent Recurring or Merchant initiated payments of the same type, otherwise, the payments can be declined by the issuer. The &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; represents the first, customer-present payment and helps the issuer to connect subsequent payments to this initial payment.&lt;br /&gt;
&lt;br /&gt;
====Example GetPaymentState response====&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;8, 11-12&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;2a9f3260bc2feb118bc3001dd8b71cc4&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;OrderNumber&amp;quot;: null,&lt;br /&gt;
    &amp;quot;POSId&amp;quot;: &amp;quot;[[SHOPS_PUBLIC_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;POSName&amp;quot;: &amp;quot;[[MERCHANTS_BARION_SHOPNAME]]&amp;quot;,&lt;br /&gt;
    &amp;quot;POSOwnerEmail&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSource&amp;quot;: &amp;quot;BankCard&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;MerchantInitiatedPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;FGTRR55322843442124780&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingInformation&amp;quot;: {&lt;br /&gt;
        &amp;quot;BankCard&amp;quot;: {&lt;br /&gt;
            &amp;quot;MaskedPan&amp;quot;: &amp;quot;0425&amp;quot;,&lt;br /&gt;
            &amp;quot;BankCardType&amp;quot;: &amp;quot;Visa&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruYear&amp;quot;: &amp;quot;2020&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruMonth&amp;quot;: &amp;quot;12&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;AuthorizationCode&amp;quot;: &amp;quot;512244&amp;quot;,&lt;br /&gt;
        &amp;quot;ProcessResult&amp;quot;: &amp;quot;Successful&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;AllowedFundingSources&amp;quot;: [&lt;br /&gt;
        &amp;quot;All&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;GuestCheckout&amp;quot;: true,&lt;br /&gt;
    &amp;quot;CreatedAt&amp;quot;: &amp;quot;2020-11-26T07:52:48.9Z&amp;quot;,&lt;br /&gt;
    &amp;quot;ValidUntil&amp;quot;: &amp;quot;2020-11-26T08:22:48.9Z&amp;quot;,&lt;br /&gt;
    &amp;quot;CompletedAt&amp;quot;: &amp;quot;2020-11-26T08:11:54.118Z&amp;quot;,&lt;br /&gt;
    &amp;quot;ReservedUntil&amp;quot;: null,&lt;br /&gt;
    &amp;quot;DelayedCaptureUntil&amp;quot;: null,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
           ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;Total&amp;quot;: 25.20,&lt;br /&gt;
    &amp;quot;SuggestedLocale&amp;quot;: &amp;quot;hu-HU&amp;quot;,&lt;br /&gt;
    &amp;quot;FraudRiskScore&amp;quot;: null,&lt;br /&gt;
    &amp;quot;RedirectUrl&amp;quot;: &amp;quot;https://merchanturl/Redirect?paymentId=2a9f3260bc2feb118bc3001dd8b71cc4&amp;quot;,&lt;br /&gt;
    &amp;quot;CallbackUrl&amp;quot;: &amp;quot;https://merchanturl/Callback?paymentId=2a9f3260bc2feb118bc3001dd8b71cc4&amp;quot;,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Displaying the funding source in a GUI ====&lt;br /&gt;
We strongly advise saving the complete response for future reference. The &amp;lt;code&amp;gt;FundingSource&amp;lt;/code&amp;gt; field tells if the funding source is a Barion balance or a card. If it is a card, it is useful to save [[FundingInformation]] for displaying it for the user, when requesting future payments. The usual way to display funding sources is to show the last 4 digits of the card, with 4 stars, eg: *** 1234. The card used can be obtained from FundingInformation&#039;s [[BankCard]] field. The [[CardType]] field can be used to display the appropriate card logo. You can even show, if the card is expired, and offer to register another one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; FundingInformation part of the GetPaymentState response &#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=json&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
    &amp;quot;FundingInformation&amp;quot;: {&lt;br /&gt;
        &amp;quot;BankCard&amp;quot;: {&lt;br /&gt;
            &amp;quot;MaskedPan&amp;quot;: &amp;quot;0425&amp;quot;,&lt;br /&gt;
            &amp;quot;BankCardType&amp;quot;: &amp;quot;Visa&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruYear&amp;quot;: &amp;quot;2020&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruMonth&amp;quot;: &amp;quot;12&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;AuthorizationCode&amp;quot;: &amp;quot;512244&amp;quot;,&lt;br /&gt;
        &amp;quot;ProcessResult&amp;quot;: &amp;quot;Successful&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be displayed for example as &amp;lt;code&amp;gt;VISA **** 0425 (12/20)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a request-response diagram of the token registration process:&lt;br /&gt;
 &lt;br /&gt;
[[File:Token_payment_initiation.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Step 2: Using the token =&lt;br /&gt;
&lt;br /&gt;
To use an already registered token for a payment, you have to use the same [[Payment-Start-v2|/Payment/Start]] API endpoint but the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; should be set to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;. This tells the Barion API to use the token for payment instead of only registering it. The token should be specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; property. To be able to use a token, the initial payment must be in a successful state.&lt;br /&gt;
&lt;br /&gt;
At this point, the merchant has to decide whether this subsequent payment is used for the same token payment scenario or something changed. This is important because the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; can only be used for the same scenario, otherwise, the card issuer will decline the charge.&lt;br /&gt;
A &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; can only be used again if:&lt;br /&gt;
* the funding source is the same (technically the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; is the same)&lt;br /&gt;
* the token payment scenario is the same (technically the &amp;lt;code&amp;gt;RecurrenceType&amp;lt;/code&amp;gt; is the same)&lt;br /&gt;
* this subsequent request complies with the scenario restrictions (eg: in case of recurring payment the amount of the subsequent payment does not exceed the initial amount)&lt;br /&gt;
&lt;br /&gt;
If the funding source changes, new &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; must be requested. The process to do that is [[#Changing the funding source|described in detail here]]. If the funding source stays the same but the scenario changes or the restrictions are no longer met new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; must be requested. The process to do that is [[#Changing the token payment scenario with an existing token|described here]].&lt;br /&gt;
&lt;br /&gt;
== Subsequent payments in case of Recurring payment scenario ==&lt;br /&gt;
&lt;br /&gt;
In this case, three extra conditions must be met:&lt;br /&gt;
* the amount of the subsequent payment must not be higher than the initial amount&lt;br /&gt;
* at least that much days must be spent as defined in the initial &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt; property&lt;br /&gt;
* the date of the payment must not exceed the day specified in the initial &amp;lt;code&amp;gt;RecurringExpiry&amp;lt;/code&amp;gt; property&lt;br /&gt;
&lt;br /&gt;
Please be aware that in case any of these are no longer valid the merchant has to request a new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; as [[#Changing the token payment scenario with an existing token|described here]]. &lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=These conditions are not enforced by the Barion system so the violation of them will result in a declined charge.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
Payment/start must not include the &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RecurringExpiry&amp;lt;/code&amp;gt; properties (since they are already fixed during the initial payment).&lt;br /&gt;
&lt;br /&gt;
==== Example payment/start of a subsequent Recurring payment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-8&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: false,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;RecurringPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;FGTRR55322843442124780&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subscription fee for the second month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-02&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example response to this request ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;4,8,11&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;fb582913dc2feb11a49f309c23734b1c&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;RecurrenceResult&amp;quot;: &amp;quot;Successful&amp;quot;,&lt;br /&gt;
    &amp;quot;ThreeDSAuthClientData&amp;quot;: null,&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;FGTRR55322843442124780&amp;quot;,&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The structure of the response is the same as the normal &amp;lt;tt&amp;gt;/Payment/Start&amp;lt;/tt&amp;gt; response just the statuses will be different. In this case&lt;br /&gt;
* the payment level &amp;lt;code&amp;gt;Status&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Succeeded&#039;&#039;&#039; instead of &#039;&#039;&#039;Prepared&#039;&#039;&#039;&lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Successful&#039;&#039;&#039; (or &#039;&#039;&#039;Failed&#039;&#039;&#039;) instead of &#039;&#039;&#039;None&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The value of the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; will be the same as in the request.&lt;br /&gt;
&lt;br /&gt;
== Subsequent payments in case of Merchant Initiated Payment scenario ==&lt;br /&gt;
&lt;br /&gt;
In this scenario there are no restrictions.&lt;br /&gt;
&lt;br /&gt;
==== Example payment/start of a subsequent Merchant Initiated Payment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-8&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: false,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;MerchantInitiatedPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;KBYRR55322844552124780&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 75,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Usage fee for 2020/12&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Phone bill&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Usage fee for 2020/12&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 75,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 75,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-02&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example response to this request ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;4,8,11&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;fb582913dc2feb11a49f309c23734b1c&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;RecurrenceResult&amp;quot;: &amp;quot;Successful&amp;quot;,&lt;br /&gt;
    &amp;quot;ThreeDSAuthClientData&amp;quot;: null,&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;KBYRR55322844552124780&amp;quot;,&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The structure of the response is the same as the normal &amp;lt;tt&amp;gt;/Payment/Start&amp;lt;/tt&amp;gt; response just the statuses will be different. In this case&lt;br /&gt;
* the payment level &amp;lt;code&amp;gt;Status&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Succeeded&#039;&#039;&#039; instead of &#039;&#039;&#039;Prepared&#039;&#039;&#039;&lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Successful&#039;&#039;&#039; (or &#039;&#039;&#039;Failed&#039;&#039;&#039;) instead of &#039;&#039;&#039;None&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The value of the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; will be the same as in the request.&lt;br /&gt;
&lt;br /&gt;
== Subsequent payments in case of OneClick Payment scenario ==&lt;br /&gt;
&lt;br /&gt;
In this scenario, the merchant has to prepare to perform the [[#Off-site 3DS v2 authentication|off-site 3DS v2 authentication]] of the payer. 3DS authentication is not required in the following cases:&lt;br /&gt;
* the token (&amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt;) was requested before 3DS came into effect,&lt;br /&gt;
* the original payment was not initialized by bank card,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; is not used in this scenario since the payer is present during the transaction. &lt;br /&gt;
&lt;br /&gt;
==== Example payment/start of a subsequent OneClick Payment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-7&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: false,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;OneClickPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 17,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Book: How to shop online&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;How to shop online&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Book about shopping online&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;piece&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 17,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 17,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-02&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example response to this request ====&lt;br /&gt;
&lt;br /&gt;
In this scenario, the response contains the &amp;lt;code&amp;gt;ThreeDSAuthClientData&amp;lt;/code&amp;gt; property that is used to perform an [[#Off-site 3DS v2 authentication|off-site 3DS v2 authentication]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;4,8-9&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;fb582913dc2feb11a49f309c23734b1c&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;RecurrenceResult&amp;quot;: &amp;quot;Successful&amp;quot;,&lt;br /&gt;
    &amp;quot;ThreeDSAuthClientData&amp;quot;: &amp;quot;ewoJIkNhcmRQdWJs...WZXJzaW9uIjogIjIuMS4wIgp9Cg==&amp;quot;,&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Possible error responses for the subsequent payment requests ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| InvalidRecurrenceId|| The token specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; is invalid. Check if the token registration was successful.&lt;br /&gt;
|-&lt;br /&gt;
| RecurringPaymentDenied|| Something happened to the user since the token registration, either deleted, suspended, or blocked. The payment s not allowed in these cases.&lt;br /&gt;
|-&lt;br /&gt;
| InsufficientFunds|| If the original payment was with an e-money wallet and the customer doesn&#039;t have enough money to fulfill this charge this error happens.&lt;br /&gt;
|-&lt;br /&gt;
| OriginalPaymentWasntSuccessful || This means that the token belongs to an originally unsuccessful payment so this token can not be used anymore. This could only happen if the original payment was financed with a credit card.&lt;br /&gt;
|-&lt;br /&gt;
|InvalidCurrency || If the original payment was paid with e-money and the current token payment is in a currency that the wallet does not have an account in this error happens.&lt;br /&gt;
|-&lt;br /&gt;
|CardExpired || The card that was used to fulfill the initial payment is no longer valid. The &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; has to be re-initialized.&lt;br /&gt;
|-&lt;br /&gt;
|TopUpFailed || The attempt to charge the card that was use to fulfill the initial payment was unsuccessful. Often accompanied by other more specific errors.&lt;br /&gt;
|-&lt;br /&gt;
|ThreeDsNotEnabled || The card issuer rejected the card due to lack of Strong Customer Authentication. Check whether the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; is specified correctly (in case the scenario requires it).&lt;br /&gt;
|-&lt;br /&gt;
|InvalidUser || The payee defined in the transaction is not a valid Barion wallet. Either does not exist or not fully activated.&lt;br /&gt;
|-&lt;br /&gt;
|UserCantMakeOutgoingTransaction || The payee specified in the transaction is not allowed to make payeetransactions since the wallet is suspended or does not exist.&lt;br /&gt;
|-&lt;br /&gt;
|CardError || An error happened in the 3DSecure authentication system or the bank system when trying to process the card that has been used to complete the initial payment. This can mean a few things, from security settings to active limits on the card. The possible reasons should be discussed with the customer.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is the request-response diagram of the subsequent payments:&lt;br /&gt;
&lt;br /&gt;
[[File:Token_payment_2.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; when requesting Transaction Risk Analysis (TRA) during a subsequent payment, and all conditions have been met, challenge is not shown to the user.&lt;br /&gt;
&lt;br /&gt;
== RecurrenceResult: ThreeDSAuthenticationRequired ==&lt;br /&gt;
&lt;br /&gt;
In response to a subsequent payment, this RecurrenceResult can be received. This means that the payment can not be processed due to the lack of 3DS v2 information. &lt;br /&gt;
&lt;br /&gt;
This can happen if the initial payment was successfully authenticated via 3DS v2 but the subsequent payment does not refer to the original authentication with the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To fix this, request and store the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; of the initial payment and then specify it in the subsequent [[Payment-Start-v2]].&lt;br /&gt;
&lt;br /&gt;
To learn the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; of a previous payment just simply request the payment information via the [[Payment-GetPaymentState-v2]] endpoint.&lt;br /&gt;
&lt;br /&gt;
= Changing funding source or token scenarios =&lt;br /&gt;
&lt;br /&gt;
==Changing the funding source==&lt;br /&gt;
&lt;br /&gt;
This could happen if the funding source becomes invalid for some reason (card gets deleted or expires) or the merchant decides to use that token for another payer. In this case, the merchant has to register the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; again. &lt;br /&gt;
To do this a new payment must be started and in the [[Payment-Start-v2|Payment/Start]] request the following setup should be specified:&lt;br /&gt;
* the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; field has to be set to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; &lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; has to be specified.&lt;br /&gt;
* and the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; should not be specified.&lt;br /&gt;
&lt;br /&gt;
[[File:Funding-source-change.png|1500px]]&lt;br /&gt;
&lt;br /&gt;
Since the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; is bound to the payer and the process if the funding source changes new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; will be generated. This new ID must be saved to this payment and must be used from this moment on for subsequent payments.&lt;br /&gt;
&lt;br /&gt;
==Changing the token payment scenario with an existing token==&lt;br /&gt;
&lt;br /&gt;
This could occur when the merchant wants to get authorization from the payer to a new token scenario for the already registered funding source. To be able to do this the merchant has to have a valid and registered &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt;.&lt;br /&gt;
Let&#039;s see some examples when this may be necessary:&lt;br /&gt;
* The payer subscribed to the merchant&#039;s service beforehand and the merchant decided to use the recurring payment token scenario. The payer wants to subscribe to another service and this requires a different payment schedule. This means that the &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt; that was specified initially can not be maintained so it is required to acquire a new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;&lt;br /&gt;
* The payer bought something on the merchant&#039;s website and uses the one-click feature for subsequent fast non-redirect payments. After a while, the payer decides to subscribe to a service provided by this same merchant. This means that the merchant has to create a new token scenario (not a one-click payment but a recurring payment). For this, the merchant has to acquire a new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;. This can be done without redirecting the payer to Barion using the existing &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; and performing a 3DS authentication on the merchant&#039;s website.&lt;br /&gt;
&lt;br /&gt;
To do these a new payment must be started and in the [[Payment-Start-v2|Payment/Start]] request the following setup should be specified:&lt;br /&gt;
* the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; field has to be set to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; &lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; has to be specified.&lt;br /&gt;
* and the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; should not be specified.&lt;br /&gt;
&lt;br /&gt;
After this, a 3DS authentication has to be completed to acquire a new trace ID. This can be done on the merchant&#039;s site if the merchant implements the barion.offsitegw.js for off-site 3DS authentication.&lt;br /&gt;
&lt;br /&gt;
This means that it can be achieved to acquire different Trace IDs for different scenarios with only one &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is basically categorizing the different token scenarios as opposed to using every subsequent payment as an unmarked charge.&lt;br /&gt;
&lt;br /&gt;
[[File:Mutiple-traceid.png|1500px]]&lt;br /&gt;
&lt;br /&gt;
= Off-site 3DS v2 authentication =&lt;br /&gt;
&lt;br /&gt;
In certain scenarios, the payer has to be authenticated to lower the risk of the card transaction. This can be either performed &lt;br /&gt;
* on the Barion Smart Gateway (on-site) by redirecting the customer to Barion &lt;br /&gt;
* or on the merchant&#039;s website (off-site) by integrating the Barion Off-site client library.&lt;br /&gt;
&lt;br /&gt;
This section describes how to integrate the Barion off-site authentication library into the merchant&#039;s site.&lt;br /&gt;
&lt;br /&gt;
== Step 1 : Initialize the off-site authentication library  ==&lt;br /&gt;
You have to include the following css and javascript files in the code of your site. &lt;br /&gt;
&amp;lt;source lang=html&amp;gt;&lt;br /&gt;
&amp;lt;link href=&amp;quot;https://secure.barion.com/static/barion.offsitegw.min.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;https://secure.barion.com/static/barion.offsitegw.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
These files include all the necessary javascript code and styling to handle the 3DS authentication and display the challenge if necessary.&lt;br /&gt;
&lt;br /&gt;
Then you have to initialize the Barion javascript client. To do that, you have to define a configuration object that specifies your functions that handle the off-site authentication events. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Authentication events&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;onAuthenticationSucceeded&amp;lt;/code&amp;gt;: the 3DS v2 authentication successfully completed&lt;br /&gt;
* &amp;lt;code&amp;gt;onAuthenticationFailed&amp;lt;/code&amp;gt;:  the 3DS v2 authentication failed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
const configuration = {&lt;br /&gt;
    onAuthenticationSucceeded: function () {&lt;br /&gt;
        // handle successful authentication by calling the Barion API via merchant&#039;s backend&lt;br /&gt;
        // Call the v2/payment/complete endpoint&lt;br /&gt;
    },&lt;br /&gt;
    onAuthenticationFailed: function () {&lt;br /&gt;
        // Handle unsuccessful authentication result, no charge was made.&lt;br /&gt;
        // The payment might be still valid only the authentication failed&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you have to pass this config object to the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
const gw = new Barion.OffsiteGw(configuration);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the DOM is loaded you have to initialize the library:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
document.addEventListener(&amp;quot;DOMContentLoaded&amp;quot;, function () {&lt;br /&gt;
    // Initiate the Barion Offiste GW library&lt;br /&gt;
    gw.init();&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 2: Start the authentication process ==&lt;br /&gt;
Once the &amp;lt;code&amp;gt;ThreeDSAuthClientData&amp;lt;/code&amp;gt; is acquired from the payment/start you can start the authentication process by calling the &amp;lt;code&amp;gt;authenticate()&amp;lt;/code&amp;gt; method of the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
gw.authenticate(threeDsClientData);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will start the authentication process and present the challenge if needed. Visually this will create a modal window over the merchant&#039;s site and show the payer every necessary information.&lt;br /&gt;
Once the authentication process finished (either with or without a challenge) the appropriate event will be fired.&lt;br /&gt;
&lt;br /&gt;
== Step 3: Completing the payment ==&lt;br /&gt;
&lt;br /&gt;
In case of successful authentication, you have to call our [[Payment-Complete-v3|/Payment/Complete]] endpoint, where the actual charge will happen.&lt;br /&gt;
&lt;br /&gt;
=== Possible error responses for the subsequent payment requests ===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
== Suggested implementation flow for off-site authentication ==&lt;br /&gt;
&lt;br /&gt;
Ideally, an off-site authentication should be part of a client-side experience without any postbacks or page reloads. This is our recommendation to achieve this:&lt;br /&gt;
&lt;br /&gt;
# After the customer clicks on the &amp;quot;Pay&amp;quot; button make an AJAX call from your client-side code to your back-end. &lt;br /&gt;
# Have your backend make a request to our payment/start endpoint (with the appropriate settings for the desired token scenario)&lt;br /&gt;
# Have your backend process the response and pass the value of the &amp;lt;code&amp;gt;ThreeDSAuthClientData&amp;lt;/code&amp;gt; property to your client-side code.&lt;br /&gt;
# Use the Barion off-site library to perform the authentication&lt;br /&gt;
# Once the authentication succeeds send another AJAX request from your client-side code to your back-end.&lt;br /&gt;
# Have your back-end code call our [[Payment-Complete-v3|/Payment/Complete]]&lt;br /&gt;
# Have your backend process the response and pass the result to your client-side code.&lt;br /&gt;
# Display the result for the customer&lt;br /&gt;
&lt;br /&gt;
= Testing the integration =&lt;br /&gt;
&lt;br /&gt;
3D Secure has no environment for end-to-end testing, therefore merchants have to split their testings into two parts: Testing the payment flow with and without challenge. Getting a challenge is only possible with real-life cards, merchants have to use their own (there will be no real charging at the end on the Sandbox of the Payment Gateway, but using a real card will result initiating a real 3DS authentication).&lt;br /&gt;
&lt;br /&gt;
== Testing the whole payment flow, without challenge ==&lt;br /&gt;
&lt;br /&gt;
Use the [[https://docs.barion.com/Sandbox#Test_cards Barion test cards]], they will always get a &amp;quot;frictionless&amp;quot; flow, where the 3DS process is presented on the UI, but you will never see a challenge screen. &lt;br /&gt;
&lt;br /&gt;
This is good for testing your integration itself because it will lead to a successful charge, and you will get a TraceId as well.&lt;br /&gt;
&lt;br /&gt;
== Testing the challenge itself ==&lt;br /&gt;
&lt;br /&gt;
Use your own card, and let the card issuer decide whether your payment will get a challenge or not during the 3DS authentication procedure. Your payment will fail at the end, and you won&#039;t get the TraceId. &lt;br /&gt;
&lt;br /&gt;
This is good to test, how the challenge screens look like in your shop - especially when you integrated OneClick payment directly to your shop. You might also check how your customers see your checkout flow on popular devices.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Token_payment_3D_Secure&amp;diff=3377</id>
		<title>Token payment 3D Secure</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Token_payment_3D_Secure&amp;diff=3377"/>
		<updated>2022-05-05T10:01:07Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Possible error responses for the subsequent payment requests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Token Payment with 3D Secure}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This payment scenario allows the integrator shop to register a token for a customer (and a funding source) in the Barion system and then, later on, using this token, charge the customer without redirecting her to the Barion Smart Gateway UI. The user may be present at the site of the merchant or she can be off-session as well, so the merchant can charge her e.g. for subscriptions. This means that the customer authorizes the shop to charge her card or Barion balance without typing in the card information or Barion login again.&lt;br /&gt;
&lt;br /&gt;
[[File:3ds-recurring.png|1500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=Premium feature|text=This scenario is not allowed automatically for every approved shop and should be requested from Barion!|color=#1993c7}}&lt;br /&gt;
&lt;br /&gt;
= Token payment scenarios =&lt;br /&gt;
Token payment can be used in three use cases: &lt;br /&gt;
* &#039;&#039;&#039;Customer Initiated Payments&#039;&#039;&#039;: when the user is present on the website of the merchant and she decides to pay :&lt;br /&gt;
** &#039;&#039;&#039;OneClick payment&#039;&#039;&#039;: the user is charged upon her request initiated on the website of the merchant. Subsequent payments are subject to PSD2 SCA and as the user is present, she has to go through the authentication process.&lt;br /&gt;
* &#039;&#039;&#039;Merchant Initiated Payments&#039;&#039;&#039;: when the merchant initiates the payment without the user being present. It has two subtypes:&lt;br /&gt;
** &#039;&#039;&#039;Recurring payment&#039;&#039;&#039;: the user is charged with the same amount on a regular basis, typically in case of subscriptions. Subsequent payments are exempted from PSD2 SCA, but liability still shifts to the card issuer.&lt;br /&gt;
** &#039;&#039;&#039;MIT (merchant initiated transaction)&#039;&#039;&#039;: the user is charged on an irregular basis and/or with a different amount. Subsequent payments of this type are excluded from PSD2 SCA, the liability is on the merchant.&lt;br /&gt;
&lt;br /&gt;
== Customer participation ==&lt;br /&gt;
&lt;br /&gt;
Since the token scenario is suitable for both customer and merchant initiated payments here is a comparison about who starts the payment. This includes the regular, non-tokenized payment scenario as well:&lt;br /&gt;
&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | Scenario&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Initial payment&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Subsequent payments&lt;br /&gt;
|-&lt;br /&gt;
! Customer present&lt;br /&gt;
! Customer at Barion Smart GW &lt;br /&gt;
! Customer present&lt;br /&gt;
! Customer at Barion Smart GW&lt;br /&gt;
|-&lt;br /&gt;
| Non token (regular) payment || YES || YES || YES || YES &lt;br /&gt;
|-&lt;br /&gt;
| OneClick payment || YES || YES/NO&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; || YES || style=&amp;quot;background:#FFE2C4&amp;quot; | NO &lt;br /&gt;
|-&lt;br /&gt;
| Recurring payment || YES || YES/NO&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; || style=&amp;quot;background:#FFE2C4&amp;quot; | NO || style=&amp;quot;background:#FFE2C4&amp;quot; | NO &lt;br /&gt;
|-&lt;br /&gt;
| MIT || YES || YES/NO&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; || style=&amp;quot;background:#FFE2C4&amp;quot; | NO || style=&amp;quot;background:#FFE2C4&amp;quot; | NO &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #aaa; background-color:#eee; font-size: 0.8em; padding:5px 10px; display:inline-block;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; Token payment scenarios can be initiated with already registered &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; as well, in this case the customer may remain on the merchant&#039;s site. &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements for the scenarios ==&lt;br /&gt;
&lt;br /&gt;
These token payment scenarios have different requirements, this table below summarizes the key differences.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
! Payment amount&lt;br /&gt;
! Payment frequency&lt;br /&gt;
! Liability in case of fraud&lt;br /&gt;
|-&lt;br /&gt;
| OneClick payment || Various || Various || Card issuer&lt;br /&gt;
|-&lt;br /&gt;
| Recurring payment || Subsequent amounts must be equal or less than the initial amount  || Initial payment must define a minimum amount of days to wait between charges || Card issuer &lt;br /&gt;
|-&lt;br /&gt;
| Merchant initiated payment || Various  || Various || Merchant&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== 3DS authentication of the payer ==&lt;br /&gt;
&lt;br /&gt;
The new more secure 3DS v2 authentication must be performed for every online card payment. These token payment scenarios also have to use this new secure way of authentication. &lt;br /&gt;
The initial payment of a token scenario must be authenticated every time although the subsequent payments may be exempted in certain cases. &lt;br /&gt;
&lt;br /&gt;
Here is a table to compare the 3DS authentication requirements:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
! Initial payment&lt;br /&gt;
! Subsequent payments&lt;br /&gt;
|-&lt;br /&gt;
| One-click payment || ✔️ || ✔️&lt;br /&gt;
|-&lt;br /&gt;
| Recurring payment || ✔️ || &lt;br /&gt;
|-&lt;br /&gt;
| Merchant initiated payment || ✔️ || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;IMPORTANT:&#039;&#039; when performing subsequent One-click payments with the &amp;lt;code&amp;gt;ChallengePreference&amp;lt;/code&amp;gt; parameter set to &amp;lt;code&amp;gt;NoChallengeNeeded&amp;lt;/code&amp;gt; (indicating a request for Transaction Risk Analysis), only a fraud analysis will be performed, and the customer is not required to undergo a 3DS challenge.&lt;br /&gt;
&lt;br /&gt;
== Real life examples ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Phone bill&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Payer has a usage-based phone subscription that wants to pay without being present for every charge. She authorizes the phone company to charge her card every month.&lt;br /&gt;
* Scenario: Merchant Initiated Transaction&lt;br /&gt;
* Explanation: Despite the frequency of the charges is monthly, the amount of the subsequent payments may exceed the initial payment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TV subscription&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Payer subscribes to online streaming of a television channel. She authorizes the tv company to charge her card every month. The subscription fee is the same for every month.&lt;br /&gt;
* Scenario: Recurring payment&lt;br /&gt;
* Explanation: The amount of the subsequent payments will not exceed the initial payment and the charge is regularly monthly-based.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bookclub with &amp;quot;free first month&amp;quot; bonus&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Payer subscribes to a book renting service. he authorizes the book club to charge her card for a selection of books each month. The subscription fee is the same for every month however, the first month is free. To ensure the subscription the service requires her to register her card details.&lt;br /&gt;
* Scenario: Merchant Initiated Transaction&lt;br /&gt;
* Explanation: Despite the frequency of the charges is monthly, and the fee will stay the same, the initial payment is zero. So the amount of the next payment will exceed the initial payment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Online food delivery service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The food delivery company wants to provide a quick and easy experience for its customer. They decide that the order will be quicker if the customers don&#039;t leave the website to pay for the goods.&lt;br /&gt;
* Scenario: OneClick payment&lt;br /&gt;
* Explanation: The customer will always be there so the other two scenarios are not available.&lt;br /&gt;
&lt;br /&gt;
== How to decide ==&lt;br /&gt;
&lt;br /&gt;
To help you decide on a suitable scenario, please use the decision graph below:&lt;br /&gt;
&lt;br /&gt;
[[File:3ds-recurrencetype-decision.png|520px]]&lt;br /&gt;
&lt;br /&gt;
= Prerequisites =&lt;br /&gt;
To be able to integrate your webshop with the Barion Payment Gateway: &lt;br /&gt;
* You must [[Creating_an_account|register a Barion wallet]] at the Barion website or in the Sandbox environment. Learn more about the Sandbox environment [[Sandbox|here]].&lt;br /&gt;
* For this wallet you have to [[Creating_a_shop|create a shop]] which should be approved by Barion.&lt;br /&gt;
* For every currency you plan to conduct payments in you have to make sure there is an account created in your Barion wallet. This means that if you plan to have USD payments then there should be a USD account created in your wallet.&lt;br /&gt;
* To make sure every corner case scenario works for your webshop it is best to top up that account with a small amount (approx. 5-10EUR or your choice of currency around the same value).&lt;br /&gt;
* For the technical communication guide please read this: [[Calling_the_API|Calling the API]]&lt;br /&gt;
&lt;br /&gt;
= The payment process =&lt;br /&gt;
&lt;br /&gt;
The process is divided into two major steps:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;[[#Step 1:  Creating the funding source token|Creating the token]] that represents one of the customer&#039;s funding sources (credit card or e-money wallet)&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
         &amp;lt;li&amp;gt;Preparing the payment via the Barion API&amp;lt;/li&amp;gt;&lt;br /&gt;
         &amp;lt;li&amp;gt;Redirecting the customer to the Barion Smart Gateway to select a funding source&amp;lt;/li&amp;gt;&lt;br /&gt;
         &amp;lt;li&amp;gt;Processing the callback and requesting information about the result of the payment&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
   &amp;lt;/li&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;[[#Step 2: Using the token|Using the registered token]] to charge the customer&amp;lt;/li&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 1:  Creating the funding source token ==&lt;br /&gt;
To be able to use a token payment scenario first the merchant has to register the token with Barion. The merchant has to make sure that the customer is well aware of the fact that they are giving consent to a tokenized payment. The Barion Smart Gateway UI does not indicate in any way that the payment is a token payment.&lt;br /&gt;
&lt;br /&gt;
The token is registered to the shop and not to the merchant&#039;s Barion account. So if the merchant has multiple shops in its Barion account, the registered tokens can not be shared among them even if the customer is the same. If you want to use tokens in multiple shops, please contact Barion in the Customer center.&lt;br /&gt;
&lt;br /&gt;
=== 1.1 Preparing the payment===&lt;br /&gt;
&lt;br /&gt;
The token registration is basically a [[Responsive_web_payment|normal payment]] with three extra properties in the [[Payment-Start-v2|Payment/Start]] request:&lt;br /&gt;
* InitiateRecurrence&lt;br /&gt;
* RecurrenceId&lt;br /&gt;
* RecurrenceType&lt;br /&gt;
&lt;br /&gt;
==== InitiateRecurrence====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; is a bool property. If you set it to &#039;&#039;&#039;true&#039;&#039;&#039; then the payment gateway will consider the payment as a token registration. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This happens even if the customer is already has a registered token, so you are able to re-register a funding source or even a customer. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== RecurrenceId ====&lt;br /&gt;
The next required property for a token registration is the token itself. This is generated by the shop and has to be unique for every registration. The token should be specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; property of the [[Payment-Start-v2|Payment/Start]] request. This token must be saved in the webshops database. A &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; token represents the funding source (bank card or Barion balance) of a customer. Since a customer can have multiple cards and accounts as a funding source make sure that in the webshop&#039;s system multiple tokens can belong to a single customer.&lt;br /&gt;
&lt;br /&gt;
==== RecurrenceType ====&lt;br /&gt;
The third required property is the [[RecurrenceType|Recurrence Type]]. This specifies the scenario. In case of Recurring Payment &amp;lt;code&amp;gt;PurchaseInformation.RecurringExpiry&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PurchaseInformation.RecurringFrequency&amp;lt;/code&amp;gt; must also be set.&lt;br /&gt;
&lt;br /&gt;
==== Example JSON request for a Merchant Initiated Payment scenario ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-7&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: true,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;MerchantInitiatedPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subscription fee for the first month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-01&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The response will be the same as to a [[Responsive_web_payment#Processing_the_successful_response|basic &#039;&#039;&#039;Immediate&#039;&#039;&#039; scenario]]. The &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; property at this point is &#039;&#039;&#039;None&#039;&#039;&#039; since the token is not registered to a funding source yet.&lt;br /&gt;
&lt;br /&gt;
==== Example JSON request for a Recurring Payment scenario ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Recurring Payment&#039;&#039;&#039; scenario has some extra restrictions. The merchant has to specify two additional properties in the [[Payment-Start-v2|Payment/Start]] request:&lt;br /&gt;
* &amp;lt;code&amp;gt;RecurringExpiry&amp;lt;/code&amp;gt;: The date after subsequent charges should not be accepted.&lt;br /&gt;
* &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt;: The minimum days the merchant has to wait between payments.&lt;br /&gt;
&lt;br /&gt;
Both properties are located in the [[PurchaseInformation]] property and must be specified if this scenario is selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-7, 30-33&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: true,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;RecurringPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subscription fee for the first month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-01&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;PurchaseInformation&amp;quot;:{&lt;br /&gt;
        &amp;quot;RecurringFrequency&amp;quot;: 10,&lt;br /&gt;
        &amp;quot;RecurringExpiry&amp;quot;: &amp;quot;2022-10-01&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Possible error responses ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| RecurringPaymentNotAllowed || The token payment is not allowed for the shop identified by the &#039;&#039;&#039;POSKey&#039;&#039;&#039;. Contact Barion to request this feature.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 1.2 Redirecting the customer to the Barion Smart Gateway to select a funding source ===&lt;br /&gt;
&lt;br /&gt;
After a successful payment preparation, the customer is redirected to the secure Barion Smart Gateway to choose a funding source. The funding source the customer selects will be registered to the token. The funding source can either be a Barion e-money balance or a bank card. This means that even though the customer may own multiple cards only the one that was registered to the token can be used for future token payments. To change the funding source attached to the token a new registration should be requested.&lt;br /&gt;
&lt;br /&gt;
=== 1.3 Processing the callback and requesting information about the result of the payment ===&lt;br /&gt;
&lt;br /&gt;
When the payment is completed (either successfully or unsuccessfully) a callback message is sent to the merchant&#039;s system. Once received a [[Payment-GetPaymentState-v2|GetPaymentState]] request must be sent to the Barion API. On how to implement this please read the article about the  [[Callback_mechanism|Callback mechanism]].&lt;br /&gt;
&lt;br /&gt;
The full response of the GetPaymentState request depends on the payment scenario and the structure of the payment. When it comes to token payment there are several properties to look out for. &lt;br /&gt;
* In case the &amp;lt;code&amp;gt;Status&amp;lt;/code&amp;gt; is &#039;&#039;&#039;Succeeded&#039;&#039;&#039; the funding source token is registered and ready to use.&lt;br /&gt;
* The &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; contains the ID of the token process. This specifies the nature of the token payment. &lt;br /&gt;
&lt;br /&gt;
==== TraceId ====&lt;br /&gt;
&lt;br /&gt;
In case of Recurring payment or Merchant initiated payment scenarios the [[Payment-GetPaymentState-v2|GetPaymentState]] response returns an additional field called &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;. The value of this property is generated by the card issuer and is up to a 100 characters, and should be left intact (whitespaces and 0s can&#039;t be trimmed). The merchant has to save it and submit it in all subsequent Recurring or Merchant initiated payments of the same type, otherwise, the payments can be declined by the issuer. The &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; represents the first, customer-present payment and helps the issuer to connect subsequent payments to this initial payment.&lt;br /&gt;
&lt;br /&gt;
====Example GetPaymentState response====&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;8, 11-12&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;2a9f3260bc2feb118bc3001dd8b71cc4&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;OrderNumber&amp;quot;: null,&lt;br /&gt;
    &amp;quot;POSId&amp;quot;: &amp;quot;[[SHOPS_PUBLIC_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;POSName&amp;quot;: &amp;quot;[[MERCHANTS_BARION_SHOPNAME]]&amp;quot;,&lt;br /&gt;
    &amp;quot;POSOwnerEmail&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSource&amp;quot;: &amp;quot;BankCard&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;MerchantInitiatedPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;FGTRR55322843442124780&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingInformation&amp;quot;: {&lt;br /&gt;
        &amp;quot;BankCard&amp;quot;: {&lt;br /&gt;
            &amp;quot;MaskedPan&amp;quot;: &amp;quot;0425&amp;quot;,&lt;br /&gt;
            &amp;quot;BankCardType&amp;quot;: &amp;quot;Visa&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruYear&amp;quot;: &amp;quot;2020&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruMonth&amp;quot;: &amp;quot;12&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;AuthorizationCode&amp;quot;: &amp;quot;512244&amp;quot;,&lt;br /&gt;
        &amp;quot;ProcessResult&amp;quot;: &amp;quot;Successful&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;AllowedFundingSources&amp;quot;: [&lt;br /&gt;
        &amp;quot;All&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;GuestCheckout&amp;quot;: true,&lt;br /&gt;
    &amp;quot;CreatedAt&amp;quot;: &amp;quot;2020-11-26T07:52:48.9Z&amp;quot;,&lt;br /&gt;
    &amp;quot;ValidUntil&amp;quot;: &amp;quot;2020-11-26T08:22:48.9Z&amp;quot;,&lt;br /&gt;
    &amp;quot;CompletedAt&amp;quot;: &amp;quot;2020-11-26T08:11:54.118Z&amp;quot;,&lt;br /&gt;
    &amp;quot;ReservedUntil&amp;quot;: null,&lt;br /&gt;
    &amp;quot;DelayedCaptureUntil&amp;quot;: null,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
           ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;Total&amp;quot;: 25.20,&lt;br /&gt;
    &amp;quot;SuggestedLocale&amp;quot;: &amp;quot;hu-HU&amp;quot;,&lt;br /&gt;
    &amp;quot;FraudRiskScore&amp;quot;: null,&lt;br /&gt;
    &amp;quot;RedirectUrl&amp;quot;: &amp;quot;https://merchanturl/Redirect?paymentId=2a9f3260bc2feb118bc3001dd8b71cc4&amp;quot;,&lt;br /&gt;
    &amp;quot;CallbackUrl&amp;quot;: &amp;quot;https://merchanturl/Callback?paymentId=2a9f3260bc2feb118bc3001dd8b71cc4&amp;quot;,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Displaying the funding source in a GUI ====&lt;br /&gt;
We strongly advise saving the complete response for future reference. The &amp;lt;code&amp;gt;FundingSource&amp;lt;/code&amp;gt; field tells if the funding source is a Barion balance or a card. If it is a card, it is useful to save [[FundingInformation]] for displaying it for the user, when requesting future payments. The usual way to display funding sources is to show the last 4 digits of the card, with 4 stars, eg: *** 1234. The card used can be obtained from FundingInformation&#039;s [[BankCard]] field. The [[CardType]] field can be used to display the appropriate card logo. You can even show, if the card is expired, and offer to register another one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; FundingInformation part of the GetPaymentState response &#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=json&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
    &amp;quot;FundingInformation&amp;quot;: {&lt;br /&gt;
        &amp;quot;BankCard&amp;quot;: {&lt;br /&gt;
            &amp;quot;MaskedPan&amp;quot;: &amp;quot;0425&amp;quot;,&lt;br /&gt;
            &amp;quot;BankCardType&amp;quot;: &amp;quot;Visa&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruYear&amp;quot;: &amp;quot;2020&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruMonth&amp;quot;: &amp;quot;12&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;AuthorizationCode&amp;quot;: &amp;quot;512244&amp;quot;,&lt;br /&gt;
        &amp;quot;ProcessResult&amp;quot;: &amp;quot;Successful&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be displayed for example as &amp;lt;code&amp;gt;VISA **** 0425 (12/20)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a request-response diagram of the token registration process:&lt;br /&gt;
 &lt;br /&gt;
[[File:Token_payment_initiation.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Step 2: Using the token =&lt;br /&gt;
&lt;br /&gt;
To use an already registered token for a payment, you have to use the same [[Payment-Start-v2|/Payment/Start]] API endpoint but the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; should be set to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;. This tells the Barion API to use the token for payment instead of only registering it. The token should be specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; property. To be able to use a token, the initial payment must be in a successful state.&lt;br /&gt;
&lt;br /&gt;
At this point, the merchant has to decide whether this subsequent payment is used for the same token payment scenario or something changed. This is important because the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; can only be used for the same scenario, otherwise, the card issuer will decline the charge.&lt;br /&gt;
A &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; can only be used again if:&lt;br /&gt;
* the funding source is the same (technically the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; is the same)&lt;br /&gt;
* the token payment scenario is the same (technically the &amp;lt;code&amp;gt;RecurrenceType&amp;lt;/code&amp;gt; is the same)&lt;br /&gt;
* this subsequent request complies with the scenario restrictions (eg: in case of recurring payment the amount of the subsequent payment does not exceed the initial amount)&lt;br /&gt;
&lt;br /&gt;
If the funding source changes, new &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; must be requested. The process to do that is [[#Changing the funding source|described in detail here]]. If the funding source stays the same but the scenario changes or the restrictions are no longer met new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; must be requested. The process to do that is [[#Changing the token payment scenario with an existing token|described here]].&lt;br /&gt;
&lt;br /&gt;
== Subsequent payments in case of Recurring payment scenario ==&lt;br /&gt;
&lt;br /&gt;
In this case, three extra conditions must be met:&lt;br /&gt;
* the amount of the subsequent payment must not be higher than the initial amount&lt;br /&gt;
* at least that much days must be spent as defined in the initial &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt; property&lt;br /&gt;
* the date of the payment must not exceed the day specified in the initial &amp;lt;code&amp;gt;RecurringExpiry&amp;lt;/code&amp;gt; property&lt;br /&gt;
&lt;br /&gt;
Please be aware that in case any of these are no longer valid the merchant has to request a new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; as [[#Changing the token payment scenario with an existing token|described here]]. &lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=These conditions are not enforced by the Barion system so the violation of them will result in a declined charge.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
Payment/start must not include the &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RecurringExpiry&amp;lt;/code&amp;gt; properties (since they are already fixed during the initial payment).&lt;br /&gt;
&lt;br /&gt;
==== Example payment/start of a subsequent Recurring payment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-8&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: false,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;RecurringPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;FGTRR55322843442124780&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subscription fee for the second month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-02&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example response to this request ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;4,8,11&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;fb582913dc2feb11a49f309c23734b1c&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;RecurrenceResult&amp;quot;: &amp;quot;Successful&amp;quot;,&lt;br /&gt;
    &amp;quot;ThreeDSAuthClientData&amp;quot;: null,&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;FGTRR55322843442124780&amp;quot;,&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The structure of the response is the same as the normal &amp;lt;tt&amp;gt;/Payment/Start&amp;lt;/tt&amp;gt; response just the statuses will be different. In this case&lt;br /&gt;
* the payment level &amp;lt;code&amp;gt;Status&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Succeeded&#039;&#039;&#039; instead of &#039;&#039;&#039;Prepared&#039;&#039;&#039;&lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Successful&#039;&#039;&#039; (or &#039;&#039;&#039;Failed&#039;&#039;&#039;) instead of &#039;&#039;&#039;None&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The value of the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; will be the same as in the request.&lt;br /&gt;
&lt;br /&gt;
== Subsequent payments in case of Merchant Initiated Payment scenario ==&lt;br /&gt;
&lt;br /&gt;
In this scenario there are no restrictions.&lt;br /&gt;
&lt;br /&gt;
==== Example payment/start of a subsequent Merchant Initiated Payment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-8&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: false,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;MerchantInitiatedPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;KBYRR55322844552124780&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 75,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Usage fee for 2020/12&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Phone bill&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Usage fee for 2020/12&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 75,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 75,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-02&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example response to this request ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;4,8,11&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;fb582913dc2feb11a49f309c23734b1c&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;RecurrenceResult&amp;quot;: &amp;quot;Successful&amp;quot;,&lt;br /&gt;
    &amp;quot;ThreeDSAuthClientData&amp;quot;: null,&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;KBYRR55322844552124780&amp;quot;,&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The structure of the response is the same as the normal &amp;lt;tt&amp;gt;/Payment/Start&amp;lt;/tt&amp;gt; response just the statuses will be different. In this case&lt;br /&gt;
* the payment level &amp;lt;code&amp;gt;Status&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Succeeded&#039;&#039;&#039; instead of &#039;&#039;&#039;Prepared&#039;&#039;&#039;&lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Successful&#039;&#039;&#039; (or &#039;&#039;&#039;Failed&#039;&#039;&#039;) instead of &#039;&#039;&#039;None&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The value of the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; will be the same as in the request.&lt;br /&gt;
&lt;br /&gt;
== Subsequent payments in case of OneClick Payment scenario ==&lt;br /&gt;
&lt;br /&gt;
In this scenario, the merchant has to prepare to perform the [[#Off-site 3DS v2 authentication|off-site 3DS v2 authentication]] of the payer. 3DS authentication is not required in the following cases:&lt;br /&gt;
* the token (&amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt;) was requested before 3DS came into effect,&lt;br /&gt;
* the original payment was not initialized by bank card,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; is not used in this scenario since the payer is present during the transaction. &lt;br /&gt;
&lt;br /&gt;
==== Example payment/start of a subsequent OneClick Payment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-7&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: false,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;OneClickPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 17,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Book: How to shop online&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;How to shop online&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Book about shopping online&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;piece&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 17,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 17,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-02&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example response to this request ====&lt;br /&gt;
&lt;br /&gt;
In this scenario, the response contains the &amp;lt;code&amp;gt;ThreeDSAuthClientData&amp;lt;/code&amp;gt; property that is used to perform an [[#Off-site 3DS v2 authentication|off-site 3DS v2 authentication]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;4,8-9&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;fb582913dc2feb11a49f309c23734b1c&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;RecurrenceResult&amp;quot;: &amp;quot;Successful&amp;quot;,&lt;br /&gt;
    &amp;quot;ThreeDSAuthClientData&amp;quot;: &amp;quot;ewoJIkNhcmRQdWJs...WZXJzaW9uIjogIjIuMS4wIgp9Cg==&amp;quot;,&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Possible error responses for the subsequent payment requests ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| InvalidRecurrenceId|| The token specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; is invalid. Check if the token registration was successful.&lt;br /&gt;
|-&lt;br /&gt;
| RecurringPaymentDenied|| Something happened to the user since the token registration, either deleted, suspended, or blocked. The payment s not allowed in these cases.&lt;br /&gt;
|-&lt;br /&gt;
| InsufficientFunds|| If the original payment was with an e-money wallet and the customer doesn&#039;t have enough money to fulfill this charge this error happens.&lt;br /&gt;
|-&lt;br /&gt;
| OriginalPaymentWasntSuccessful || This means that the token belongs to an originally unsuccessful payment so this token can not be used anymore. This could only happen if the original payment was financed with a credit card.&lt;br /&gt;
|-&lt;br /&gt;
|InvalidCurrency || If the original payment was paid with e-money and the current token payment is in a currency that the wallet does not have an account in this error happens.&lt;br /&gt;
|-&lt;br /&gt;
|CardExpired || The card that was used to fulfill the initial payment is no longer valid. The &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; has to be re-initialized.&lt;br /&gt;
|-&lt;br /&gt;
|TopUpFailed || The attempt to charge the card that was use to fulfill the initial payment was unsuccessful. Often accompanied by other more specific errors.&lt;br /&gt;
|-&lt;br /&gt;
|ThreeDsNotEnabled || The card issuer rejected the card due to lack of Strong Customer Authentication. Check whether the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; is specified correctly (in case the scenario requires it).&lt;br /&gt;
|-&lt;br /&gt;
|InvalidUser || The payee defined in the transaction is not a valid Barion wallet. Either does not exist or not fully activated.&lt;br /&gt;
|-&lt;br /&gt;
|UserCantMakeOutgoingTransaction || The payee specified in the transaction is not allowed to make payeetransactions since the wallet is suspended or does not exist.&lt;br /&gt;
|-&lt;br /&gt;
|CardError || An error happened in the 3DSecure authentication system or the bank system when trying to process the card that has been used to complete the initial payment. The possible reasons should be discussed with the customer.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is the request-response diagram of the subsequent payments:&lt;br /&gt;
&lt;br /&gt;
[[File:Token_payment_2.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; when requesting Transaction Risk Analysis (TRA) during a subsequent payment, and all conditions have been met, challenge is not shown to the user.&lt;br /&gt;
&lt;br /&gt;
== RecurrenceResult: ThreeDSAuthenticationRequired ==&lt;br /&gt;
&lt;br /&gt;
In response to a subsequent payment, this RecurrenceResult can be received. This means that the payment can not be processed due to the lack of 3DS v2 information. &lt;br /&gt;
&lt;br /&gt;
This can happen if the initial payment was successfully authenticated via 3DS v2 but the subsequent payment does not refer to the original authentication with the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To fix this, request and store the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; of the initial payment and then specify it in the subsequent [[Payment-Start-v2]].&lt;br /&gt;
&lt;br /&gt;
To learn the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; of a previous payment just simply request the payment information via the [[Payment-GetPaymentState-v2]] endpoint.&lt;br /&gt;
&lt;br /&gt;
= Changing funding source or token scenarios =&lt;br /&gt;
&lt;br /&gt;
==Changing the funding source==&lt;br /&gt;
&lt;br /&gt;
This could happen if the funding source becomes invalid for some reason (card gets deleted or expires) or the merchant decides to use that token for another payer. In this case, the merchant has to register the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; again. &lt;br /&gt;
To do this a new payment must be started and in the [[Payment-Start-v2|Payment/Start]] request the following setup should be specified:&lt;br /&gt;
* the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; field has to be set to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; &lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; has to be specified.&lt;br /&gt;
* and the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; should not be specified.&lt;br /&gt;
&lt;br /&gt;
[[File:Funding-source-change.png|1500px]]&lt;br /&gt;
&lt;br /&gt;
Since the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; is bound to the payer and the process if the funding source changes new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; will be generated. This new ID must be saved to this payment and must be used from this moment on for subsequent payments.&lt;br /&gt;
&lt;br /&gt;
==Changing the token payment scenario with an existing token==&lt;br /&gt;
&lt;br /&gt;
This could occur when the merchant wants to get authorization from the payer to a new token scenario for the already registered funding source. To be able to do this the merchant has to have a valid and registered &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt;.&lt;br /&gt;
Let&#039;s see some examples when this may be necessary:&lt;br /&gt;
* The payer subscribed to the merchant&#039;s service beforehand and the merchant decided to use the recurring payment token scenario. The payer wants to subscribe to another service and this requires a different payment schedule. This means that the &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt; that was specified initially can not be maintained so it is required to acquire a new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;&lt;br /&gt;
* The payer bought something on the merchant&#039;s website and uses the one-click feature for subsequent fast non-redirect payments. After a while, the payer decides to subscribe to a service provided by this same merchant. This means that the merchant has to create a new token scenario (not a one-click payment but a recurring payment). For this, the merchant has to acquire a new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;. This can be done without redirecting the payer to Barion using the existing &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; and performing a 3DS authentication on the merchant&#039;s website.&lt;br /&gt;
&lt;br /&gt;
To do these a new payment must be started and in the [[Payment-Start-v2|Payment/Start]] request the following setup should be specified:&lt;br /&gt;
* the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; field has to be set to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; &lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; has to be specified.&lt;br /&gt;
* and the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; should not be specified.&lt;br /&gt;
&lt;br /&gt;
After this, a 3DS authentication has to be completed to acquire a new trace ID. This can be done on the merchant&#039;s site if the merchant implements the barion.offsitegw.js for off-site 3DS authentication.&lt;br /&gt;
&lt;br /&gt;
This means that it can be achieved to acquire different Trace IDs for different scenarios with only one &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is basically categorizing the different token scenarios as opposed to using every subsequent payment as an unmarked charge.&lt;br /&gt;
&lt;br /&gt;
[[File:Mutiple-traceid.png|1500px]]&lt;br /&gt;
&lt;br /&gt;
= Off-site 3DS v2 authentication =&lt;br /&gt;
&lt;br /&gt;
In certain scenarios, the payer has to be authenticated to lower the risk of the card transaction. This can be either performed &lt;br /&gt;
* on the Barion Smart Gateway (on-site) by redirecting the customer to Barion &lt;br /&gt;
* or on the merchant&#039;s website (off-site) by integrating the Barion Off-site client library.&lt;br /&gt;
&lt;br /&gt;
This section describes how to integrate the Barion off-site authentication library into the merchant&#039;s site.&lt;br /&gt;
&lt;br /&gt;
== Step 1 : Initialize the off-site authentication library  ==&lt;br /&gt;
You have to include the following css and javascript files in the code of your site. &lt;br /&gt;
&amp;lt;source lang=html&amp;gt;&lt;br /&gt;
&amp;lt;link href=&amp;quot;https://secure.barion.com/static/barion.offsitegw.min.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;https://secure.barion.com/static/barion.offsitegw.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
These files include all the necessary javascript code and styling to handle the 3DS authentication and display the challenge if necessary.&lt;br /&gt;
&lt;br /&gt;
Then you have to initialize the Barion javascript client. To do that, you have to define a configuration object that specifies your functions that handle the off-site authentication events. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Authentication events&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;onAuthenticationSucceeded&amp;lt;/code&amp;gt;: the 3DS v2 authentication successfully completed&lt;br /&gt;
* &amp;lt;code&amp;gt;onAuthenticationFailed&amp;lt;/code&amp;gt;:  the 3DS v2 authentication failed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
const configuration = {&lt;br /&gt;
    onAuthenticationSucceeded: function () {&lt;br /&gt;
        // handle successful authentication by calling the Barion API via merchant&#039;s backend&lt;br /&gt;
        // Call the v2/payment/complete endpoint&lt;br /&gt;
    },&lt;br /&gt;
    onAuthenticationFailed: function () {&lt;br /&gt;
        // Handle unsuccessful authentication result, no charge was made.&lt;br /&gt;
        // The payment might be still valid only the authentication failed&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you have to pass this config object to the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
const gw = new Barion.OffsiteGw(configuration);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the DOM is loaded you have to initialize the library:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
document.addEventListener(&amp;quot;DOMContentLoaded&amp;quot;, function () {&lt;br /&gt;
    // Initiate the Barion Offiste GW library&lt;br /&gt;
    gw.init();&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 2: Start the authentication process ==&lt;br /&gt;
Once the &amp;lt;code&amp;gt;ThreeDSAuthClientData&amp;lt;/code&amp;gt; is acquired from the payment/start you can start the authentication process by calling the &amp;lt;code&amp;gt;authenticate()&amp;lt;/code&amp;gt; method of the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
gw.authenticate(threeDsClientData);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will start the authentication process and present the challenge if needed. Visually this will create a modal window over the merchant&#039;s site and show the payer every necessary information.&lt;br /&gt;
Once the authentication process finished (either with or without a challenge) the appropriate event will be fired.&lt;br /&gt;
&lt;br /&gt;
== Step 3: Completing the payment ==&lt;br /&gt;
&lt;br /&gt;
In case of successful authentication, you have to call our [[Payment-Complete-v3|/Payment/Complete]] endpoint, where the actual charge will happen.&lt;br /&gt;
&lt;br /&gt;
=== Possible error responses for the subsequent payment requests ===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
== Suggested implementation flow for off-site authentication ==&lt;br /&gt;
&lt;br /&gt;
Ideally, an off-site authentication should be part of a client-side experience without any postbacks or page reloads. This is our recommendation to achieve this:&lt;br /&gt;
&lt;br /&gt;
# After the customer clicks on the &amp;quot;Pay&amp;quot; button make an AJAX call from your client-side code to your back-end. &lt;br /&gt;
# Have your backend make a request to our payment/start endpoint (with the appropriate settings for the desired token scenario)&lt;br /&gt;
# Have your backend process the response and pass the value of the &amp;lt;code&amp;gt;ThreeDSAuthClientData&amp;lt;/code&amp;gt; property to your client-side code.&lt;br /&gt;
# Use the Barion off-site library to perform the authentication&lt;br /&gt;
# Once the authentication succeeds send another AJAX request from your client-side code to your back-end.&lt;br /&gt;
# Have your back-end code call our [[Payment-Complete-v3|/Payment/Complete]]&lt;br /&gt;
# Have your backend process the response and pass the result to your client-side code.&lt;br /&gt;
# Display the result for the customer&lt;br /&gt;
&lt;br /&gt;
= Testing the integration =&lt;br /&gt;
&lt;br /&gt;
3D Secure has no environment for end-to-end testing, therefore merchants have to split their testings into two parts: Testing the payment flow with and without challenge. Getting a challenge is only possible with real-life cards, merchants have to use their own (there will be no real charging at the end on the Sandbox of the Payment Gateway, but using a real card will result initiating a real 3DS authentication).&lt;br /&gt;
&lt;br /&gt;
== Testing the whole payment flow, without challenge ==&lt;br /&gt;
&lt;br /&gt;
Use the [[https://docs.barion.com/Sandbox#Test_cards Barion test cards]], they will always get a &amp;quot;frictionless&amp;quot; flow, where the 3DS process is presented on the UI, but you will never see a challenge screen. &lt;br /&gt;
&lt;br /&gt;
This is good for testing your integration itself because it will lead to a successful charge, and you will get a TraceId as well.&lt;br /&gt;
&lt;br /&gt;
== Testing the challenge itself ==&lt;br /&gt;
&lt;br /&gt;
Use your own card, and let the card issuer decide whether your payment will get a challenge or not during the 3DS authentication procedure. Your payment will fail at the end, and you won&#039;t get the TraceId. &lt;br /&gt;
&lt;br /&gt;
This is good to test, how the challenge screens look like in your shop - especially when you integrated OneClick payment directly to your shop. You might also check how your customers see your checkout flow on popular devices.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Calling_the_API&amp;diff=3376</id>
		<title>Calling the API</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Calling_the_API&amp;diff=3376"/>
		<updated>2022-05-05T09:51:12Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Handling the response */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{PageTitle|title=Calling the Barion API}}&lt;br /&gt;
&lt;br /&gt;
== The Barion API ==&lt;br /&gt;
&lt;br /&gt;
Barion offers you a RESTful API service to communicate with your web or mobile merchant services. Learn more about RESTful behavior [https://en.wikipedia.org/wiki/Representational_state_transfer|in the original Wikipedia article].&lt;br /&gt;
&lt;br /&gt;
== Protocols and communication ==&lt;br /&gt;
&lt;br /&gt;
The Barion API communicates via standard &#039;&#039;&#039;HTTP1.1&#039;&#039;&#039; GET or POST requests. A given API endpoint accepts only GET or only POST requests - there are no universal endpoints available.&lt;br /&gt;
On each API endpoint reference page, you can find the path of the API endpoint and the HTTP method it accepts.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Payment/Start&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=All communication must be done over HTTPS. The Barion system only supports TLS v1.1 / v1.2|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=WARNING|text=TLS 1.0 will be switched off on the 20th of July 2018 on the live servers, switch to TLS 1.1 / 1.2 now!|color=#FF0000}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the caller uses an incorrect method, the system responds with a JSON error message.&lt;br /&gt;
&lt;br /&gt;
Example: calling a POST endpoint with a GET request&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Message&amp;quot;: &amp;quot;The requested resource does not support http method &#039;GET&#039;.&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data and content types ==&lt;br /&gt;
&lt;br /&gt;
The API sends and receives all content in standard &#039;&#039;&#039;JSON&#039;&#039;&#039; (JavaScript Object Notation) string format.&lt;br /&gt;
&lt;br /&gt;
Some things you must ensure when creating an API request:&lt;br /&gt;
* JSON strings are UTF-8 encoded.&lt;br /&gt;
* The MIME type of the request sent to the API is defined as &amp;lt;code&amp;gt;application/json&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;Content-length&amp;lt;/code&amp;gt; should also be specified explicitly in all HTTP request headers.&lt;br /&gt;
&lt;br /&gt;
The data types used in the API communication are the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Data type&lt;br /&gt;
! Type description&lt;br /&gt;
|-&lt;br /&gt;
| string&lt;br /&gt;
| Standard character string. The Barion API uses UTF-8 encoding.&lt;br /&gt;
|-&lt;br /&gt;
| int&lt;br /&gt;
| 32-bit signed integer format&lt;br /&gt;
|-&lt;br /&gt;
| GUID (Global Unique Identifier)&lt;br /&gt;
| A 128-bit long hexadecimal identifier with 32 character string representation, like this: &#039;&#039;21EC2020-3AEA-4069-A2DD-08002B30309D&#039;&#039;. Its value is always unique in the Barion system. This is used e.g. to identify payments. For security and compatibility reason the GUID is used without hyphens for most of our API.&lt;br /&gt;
|-&lt;br /&gt;
| DateTime&lt;br /&gt;
| Date and time values, represented in a string format of the &#039;&#039;&#039;ISO-8601&#039;&#039;&#039; standard, like this: &#039;&#039;2014-12-06T08:35:46Z&#039;&#039;. All API call responses contain datetimes as strings.&lt;br /&gt;
|-&lt;br /&gt;
| TimeSpan&lt;br /&gt;
| A time range value represented in a string format of the &#039;&#039;&#039;ISO-8601&#039;&#039;&#039; standard, like this: &#039;&#039;3.14:15:28&#039;&#039; (three days, fourteen hours, fifteen minutes, twenty-eight seconds). All API call responses contain datetimes as strings.&lt;br /&gt;
|-&lt;br /&gt;
| bool&lt;br /&gt;
| Boolean &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; values. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; avoid integer or byte evaluation when constructing the request JSON!&lt;br /&gt;
|-&lt;br /&gt;
| byte&lt;br /&gt;
| Byte representation of an enumeration value. This is only for internal use in the Barion system, API call responses always contain the string representation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== API URLs ==&lt;br /&gt;
&lt;br /&gt;
The base URL for the Barion API depends on the environment you are connecting to.&lt;br /&gt;
&lt;br /&gt;
Base URL for API requests in the &#039;&#039;&#039;Live (production)&#039;&#039;&#039; environment: &amp;lt;code&amp;gt;https://api.barion.com&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Base URL for API requests in the &#039;&#039;&#039;Sandbox (test)&#039;&#039;&#039; environment: &amp;lt;code&amp;gt;https://api.test.barion.com&amp;lt;/code&amp;gt; (learn more about the Sandbox environment [[Sandbox|here]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Always double check that you are connecting to the proper environment to avoid unnecessary hassle and troubleshooting!&lt;br /&gt;
&lt;br /&gt;
== API versioning ==&lt;br /&gt;
&lt;br /&gt;
To avoid breaking changes, whenever there is a major update to an API endpoint, it is moved to a higher level of API version. At the moment, the Barion API offers two different API versions (noted &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;v2&amp;lt;/code&amp;gt;). Some API endpoints are only available in v1 or v2. See the reference page of a given API endpoint to see which versions are available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Though version numbers can be omitted from the endpoint path (such requests always fall back to &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt;), it is recommended to always specify the API version when sending requests to the Barion API to avoid confusion.&lt;br /&gt;
&lt;br /&gt;
Example paths:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://api.barion.com/Transaction/List&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; - implicit call to a &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt; endpoint (version number is omitted from path)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://api.barion.com/v1/Transfer/Send&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; - explicit call to a &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt; endpoint&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://api.barion.com/v2/Payment/Start&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; - explicit call to a &amp;lt;code&amp;gt;v2&amp;lt;/code&amp;gt; endpoint&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=Some endpoints can only be authenticated with username/password combination (eg.: [[Statement-Download-v2|v2/Statement/Download]]).&amp;lt;br/&amp;gt; Should you use this feature, please contact customer support, and request this type of authentication to be enabled on api).|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
For every request sent to the Barion API you have to authenticate yourself. For this every API request should cointain a &amp;lt;code&amp;gt;POSKey&amp;lt;/code&amp;gt; property containing the secret API key for the shop. This key is in the confirmation e-mail that was sent to you when you opened the shop or can be copied from the details page of the shop (secure.barion.com -&amp;gt; Manage my shops -&amp;gt; Details). This is unique for every shop in the system. Be aware that the test and live environment are completely separate environments, you need to create different shops. Make sure that you use the POSkey and not the public key:&lt;br /&gt;
&lt;br /&gt;
[[File:Poskey.jpg]]&lt;br /&gt;
&lt;br /&gt;
If the key is invalid you will receive an &amp;lt;code&amp;gt;AuthenticationFailed&amp;lt;/code&amp;gt; error.&lt;br /&gt;
&lt;br /&gt;
== Handling the response ==&lt;br /&gt;
The structure of the response varies from endpoint to endpoint however on property can found in all of them. Every API response contains an &amp;lt;code&amp;gt;Errors&amp;lt;/code&amp;gt; array. If this array is empty then the request was processed successfully. This array can contain multiple errors so make sure that the integration is prepared for this. The errors have the following fields&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! FieldName || Description&lt;br /&gt;
|-&lt;br /&gt;
| ErrorCode || The error code of the payment, this can be interpreted as an error Id.&lt;br /&gt;
|-&lt;br /&gt;
| Title|| The title of the error, this is a more readable form of the error.&lt;br /&gt;
|-&lt;br /&gt;
| Description|| The description of the error, more information about the error.&lt;br /&gt;
|-&lt;br /&gt;
| EndPoint || The URL of the API endpoint to help the reproduction of the error scenario.&lt;br /&gt;
|-&lt;br /&gt;
| AuthData || The e-mail address of the caller to help the reproduction of the error scenario. &lt;br /&gt;
|-&lt;br /&gt;
| HappenedAt || The timestamp of the response.&lt;br /&gt;
|-&lt;br /&gt;
| PaymentId || &#039;&#039;&#039;(COMING SOON)&#039;&#039;&#039; If the error is related to a business process that involves a given payment, the public identifier of the payment is supplied here. This property is not present on all errors.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example error response&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following example shows an error case where the shop does not have an account with the currency it specified when trying to create a payment.&lt;br /&gt;
This is a validation error, so the payment identifier is not applicable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Errors&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;ErrorCode&amp;quot;: &amp;quot;NotExistingCurrency&amp;quot;,&lt;br /&gt;
      &amp;quot;Title&amp;quot;: &amp;quot;Payment is not supported&amp;quot;,&lt;br /&gt;
      &amp;quot;Description&amp;quot;: &amp;quot;Payment is not supported. The POS doesn’t have an account that supports EUR!&amp;quot;,&lt;br /&gt;
      &amp;quot;EndPoint&amp;quot;: &amp;quot;https://api.barion.com/v2/Payment/Start&amp;quot;,&lt;br /&gt;
      &amp;quot;AuthData&amp;quot;: &amp;quot;shop@example.com&amp;quot;,&lt;br /&gt;
      &amp;quot;HappenedAt&amp;quot;: &amp;quot;2017-02-06T09:48:13.7694921Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example shows a case where after several successful token charges, the customer deleted their payment card from the Barion system, so the subsequent attempt failed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Errors&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;ErrorCode&amp;quot;: &amp;quot;OriginalPaymentCardDoesNotExist&amp;quot;,&lt;br /&gt;
      &amp;quot;Title&amp;quot;: &amp;quot;The original payment card does not exist!&amp;quot;,&lt;br /&gt;
      &amp;quot;Description&amp;quot;: &amp;quot;The payment card that was used for the original payment with recurrence ID &#039;TEST-01&#039; no longer exists in the system!&amp;quot;,&lt;br /&gt;
      &amp;quot;EndPoint&amp;quot;: &amp;quot;https://api.barion.com/v2/Payment/Start&amp;quot;,&lt;br /&gt;
      &amp;quot;AuthData&amp;quot;: &amp;quot;shop@example.com&amp;quot;,&lt;br /&gt;
      &amp;quot;HappenedAt&amp;quot;: &amp;quot;2017-02-06T09:48:13.7694921Z&amp;quot;,&lt;br /&gt;
      &amp;quot;PaymentId&amp;quot;: &amp;quot;e666ddb8e4d34c04b176c65757ef68cf&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Security==&lt;br /&gt;
Please refer to the [[Security Measures]] page for more information on IT security before staring to code.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Calling_the_API&amp;diff=3375</id>
		<title>Calling the API</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Calling_the_API&amp;diff=3375"/>
		<updated>2022-05-05T09:38:02Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Handling the response */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{PageTitle|title=Calling the Barion API}}&lt;br /&gt;
&lt;br /&gt;
== The Barion API ==&lt;br /&gt;
&lt;br /&gt;
Barion offers you a RESTful API service to communicate with your web or mobile merchant services. Learn more about RESTful behavior [https://en.wikipedia.org/wiki/Representational_state_transfer|in the original Wikipedia article].&lt;br /&gt;
&lt;br /&gt;
== Protocols and communication ==&lt;br /&gt;
&lt;br /&gt;
The Barion API communicates via standard &#039;&#039;&#039;HTTP1.1&#039;&#039;&#039; GET or POST requests. A given API endpoint accepts only GET or only POST requests - there are no universal endpoints available.&lt;br /&gt;
On each API endpoint reference page, you can find the path of the API endpoint and the HTTP method it accepts.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Payment/Start&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=All communication must be done over HTTPS. The Barion system only supports TLS v1.1 / v1.2|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=WARNING|text=TLS 1.0 will be switched off on the 20th of July 2018 on the live servers, switch to TLS 1.1 / 1.2 now!|color=#FF0000}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the caller uses an incorrect method, the system responds with a JSON error message.&lt;br /&gt;
&lt;br /&gt;
Example: calling a POST endpoint with a GET request&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Message&amp;quot;: &amp;quot;The requested resource does not support http method &#039;GET&#039;.&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data and content types ==&lt;br /&gt;
&lt;br /&gt;
The API sends and receives all content in standard &#039;&#039;&#039;JSON&#039;&#039;&#039; (JavaScript Object Notation) string format.&lt;br /&gt;
&lt;br /&gt;
Some things you must ensure when creating an API request:&lt;br /&gt;
* JSON strings are UTF-8 encoded.&lt;br /&gt;
* The MIME type of the request sent to the API is defined as &amp;lt;code&amp;gt;application/json&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;Content-length&amp;lt;/code&amp;gt; should also be specified explicitly in all HTTP request headers.&lt;br /&gt;
&lt;br /&gt;
The data types used in the API communication are the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Data type&lt;br /&gt;
! Type description&lt;br /&gt;
|-&lt;br /&gt;
| string&lt;br /&gt;
| Standard character string. The Barion API uses UTF-8 encoding.&lt;br /&gt;
|-&lt;br /&gt;
| int&lt;br /&gt;
| 32-bit signed integer format&lt;br /&gt;
|-&lt;br /&gt;
| GUID (Global Unique Identifier)&lt;br /&gt;
| A 128-bit long hexadecimal identifier with 32 character string representation, like this: &#039;&#039;21EC2020-3AEA-4069-A2DD-08002B30309D&#039;&#039;. Its value is always unique in the Barion system. This is used e.g. to identify payments. For security and compatibility reason the GUID is used without hyphens for most of our API.&lt;br /&gt;
|-&lt;br /&gt;
| DateTime&lt;br /&gt;
| Date and time values, represented in a string format of the &#039;&#039;&#039;ISO-8601&#039;&#039;&#039; standard, like this: &#039;&#039;2014-12-06T08:35:46Z&#039;&#039;. All API call responses contain datetimes as strings.&lt;br /&gt;
|-&lt;br /&gt;
| TimeSpan&lt;br /&gt;
| A time range value represented in a string format of the &#039;&#039;&#039;ISO-8601&#039;&#039;&#039; standard, like this: &#039;&#039;3.14:15:28&#039;&#039; (three days, fourteen hours, fifteen minutes, twenty-eight seconds). All API call responses contain datetimes as strings.&lt;br /&gt;
|-&lt;br /&gt;
| bool&lt;br /&gt;
| Boolean &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; values. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; avoid integer or byte evaluation when constructing the request JSON!&lt;br /&gt;
|-&lt;br /&gt;
| byte&lt;br /&gt;
| Byte representation of an enumeration value. This is only for internal use in the Barion system, API call responses always contain the string representation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== API URLs ==&lt;br /&gt;
&lt;br /&gt;
The base URL for the Barion API depends on the environment you are connecting to.&lt;br /&gt;
&lt;br /&gt;
Base URL for API requests in the &#039;&#039;&#039;Live (production)&#039;&#039;&#039; environment: &amp;lt;code&amp;gt;https://api.barion.com&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Base URL for API requests in the &#039;&#039;&#039;Sandbox (test)&#039;&#039;&#039; environment: &amp;lt;code&amp;gt;https://api.test.barion.com&amp;lt;/code&amp;gt; (learn more about the Sandbox environment [[Sandbox|here]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Always double check that you are connecting to the proper environment to avoid unnecessary hassle and troubleshooting!&lt;br /&gt;
&lt;br /&gt;
== API versioning ==&lt;br /&gt;
&lt;br /&gt;
To avoid breaking changes, whenever there is a major update to an API endpoint, it is moved to a higher level of API version. At the moment, the Barion API offers two different API versions (noted &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;v2&amp;lt;/code&amp;gt;). Some API endpoints are only available in v1 or v2. See the reference page of a given API endpoint to see which versions are available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Though version numbers can be omitted from the endpoint path (such requests always fall back to &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt;), it is recommended to always specify the API version when sending requests to the Barion API to avoid confusion.&lt;br /&gt;
&lt;br /&gt;
Example paths:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://api.barion.com/Transaction/List&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; - implicit call to a &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt; endpoint (version number is omitted from path)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://api.barion.com/v1/Transfer/Send&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; - explicit call to a &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt; endpoint&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://api.barion.com/v2/Payment/Start&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; - explicit call to a &amp;lt;code&amp;gt;v2&amp;lt;/code&amp;gt; endpoint&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=Some endpoints can only be authenticated with username/password combination (eg.: [[Statement-Download-v2|v2/Statement/Download]]).&amp;lt;br/&amp;gt; Should you use this feature, please contact customer support, and request this type of authentication to be enabled on api).|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
For every request sent to the Barion API you have to authenticate yourself. For this every API request should cointain a &amp;lt;code&amp;gt;POSKey&amp;lt;/code&amp;gt; property containing the secret API key for the shop. This key is in the confirmation e-mail that was sent to you when you opened the shop or can be copied from the details page of the shop (secure.barion.com -&amp;gt; Manage my shops -&amp;gt; Details). This is unique for every shop in the system. Be aware that the test and live environment are completely separate environments, you need to create different shops. Make sure that you use the POSkey and not the public key:&lt;br /&gt;
&lt;br /&gt;
[[File:Poskey.jpg]]&lt;br /&gt;
&lt;br /&gt;
If the key is invalid you will receive an &amp;lt;code&amp;gt;AuthenticationFailed&amp;lt;/code&amp;gt; error.&lt;br /&gt;
&lt;br /&gt;
== Handling the response ==&lt;br /&gt;
The structure of the response varies from endpoint to endpoint however on property can found in all of them. Every API response contains an &amp;lt;code&amp;gt;Errors&amp;lt;/code&amp;gt; array. If this array is empty then the request was processed successfully. This array can contain multiple errors so make sure that the integration is prepared for this. The errors have the following fields&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! FieldName || Description&lt;br /&gt;
|-&lt;br /&gt;
| ErrorCode || The error code of the payment, this can be interpreted as an error Id.&lt;br /&gt;
|-&lt;br /&gt;
| Title|| The title of the error, this is a more readable form of the error.&lt;br /&gt;
|-&lt;br /&gt;
| Description|| The description of the error, more information about the error.&lt;br /&gt;
|-&lt;br /&gt;
| EndPoint || The URL of the API endpoint to help the reproduction of the error scenario.&lt;br /&gt;
|-&lt;br /&gt;
| AuthData || The e-mail address of the caller to help the reproduction of the error scenario. &lt;br /&gt;
|-&lt;br /&gt;
| HappenedAt || The timestamp of the response.&lt;br /&gt;
|-&lt;br /&gt;
| PaymentId || &#039;&#039;&#039;(COMING SOON)&#039;&#039;&#039; If the error is related to a business process that involves a given payment, the public identifier of the payment is supplied here. This property is not present on all errors.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example error response&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=json&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Errors&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;ErrorCode&amp;quot;: &amp;quot;NotExistingPaymentId&amp;quot;,&lt;br /&gt;
      &amp;quot;Title&amp;quot;: &amp;quot;The given payment id is invalid&amp;quot;,&lt;br /&gt;
      &amp;quot;Description&amp;quot;: &amp;quot;The given payment id(510bbd38-08c9-40b9-9e21-c6f6cb9eb4f1) is invalid!&amp;quot;,&lt;br /&gt;
      &amp;quot;EndPoint&amp;quot;: &amp;quot;https://api.barion.com/v2/Payment/GetPaymentState?POSKey=5b65f8f7a5f4405bb19495383dcf170a&amp;amp;PaymentId=510bbd3808c940b99e21c6f6cb9eb4f1&amp;quot;,&lt;br /&gt;
      &amp;quot;AuthData&amp;quot;: &amp;quot;shop@example.com&amp;quot;,&lt;br /&gt;
      &amp;quot;HappenedAt&amp;quot;: &amp;quot;2017-02-06T09:48:13.7694921Z&amp;quot;,&lt;br /&gt;
      &amp;quot;PaymentId&amp;quot;: &amp;quot;e666ddb8e4d34c04b176c65757ef68cf&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Security==&lt;br /&gt;
Please refer to the [[Security Measures]] page for more information on IT security before staring to code.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Calling_the_API&amp;diff=3374</id>
		<title>Calling the API</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Calling_the_API&amp;diff=3374"/>
		<updated>2022-05-05T09:37:49Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Handling the response */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{PageTitle|title=Calling the Barion API}}&lt;br /&gt;
&lt;br /&gt;
== The Barion API ==&lt;br /&gt;
&lt;br /&gt;
Barion offers you a RESTful API service to communicate with your web or mobile merchant services. Learn more about RESTful behavior [https://en.wikipedia.org/wiki/Representational_state_transfer|in the original Wikipedia article].&lt;br /&gt;
&lt;br /&gt;
== Protocols and communication ==&lt;br /&gt;
&lt;br /&gt;
The Barion API communicates via standard &#039;&#039;&#039;HTTP1.1&#039;&#039;&#039; GET or POST requests. A given API endpoint accepts only GET or only POST requests - there are no universal endpoints available.&lt;br /&gt;
On each API endpoint reference page, you can find the path of the API endpoint and the HTTP method it accepts.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Payment/Start&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=All communication must be done over HTTPS. The Barion system only supports TLS v1.1 / v1.2|color=#FF7A3D}}&lt;br /&gt;
{{NotificationBox|title=WARNING|text=TLS 1.0 will be switched off on the 20th of July 2018 on the live servers, switch to TLS 1.1 / 1.2 now!|color=#FF0000}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the caller uses an incorrect method, the system responds with a JSON error message.&lt;br /&gt;
&lt;br /&gt;
Example: calling a POST endpoint with a GET request&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Message&amp;quot;: &amp;quot;The requested resource does not support http method &#039;GET&#039;.&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data and content types ==&lt;br /&gt;
&lt;br /&gt;
The API sends and receives all content in standard &#039;&#039;&#039;JSON&#039;&#039;&#039; (JavaScript Object Notation) string format.&lt;br /&gt;
&lt;br /&gt;
Some things you must ensure when creating an API request:&lt;br /&gt;
* JSON strings are UTF-8 encoded.&lt;br /&gt;
* The MIME type of the request sent to the API is defined as &amp;lt;code&amp;gt;application/json&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;Content-length&amp;lt;/code&amp;gt; should also be specified explicitly in all HTTP request headers.&lt;br /&gt;
&lt;br /&gt;
The data types used in the API communication are the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Data type&lt;br /&gt;
! Type description&lt;br /&gt;
|-&lt;br /&gt;
| string&lt;br /&gt;
| Standard character string. The Barion API uses UTF-8 encoding.&lt;br /&gt;
|-&lt;br /&gt;
| int&lt;br /&gt;
| 32-bit signed integer format&lt;br /&gt;
|-&lt;br /&gt;
| GUID (Global Unique Identifier)&lt;br /&gt;
| A 128-bit long hexadecimal identifier with 32 character string representation, like this: &#039;&#039;21EC2020-3AEA-4069-A2DD-08002B30309D&#039;&#039;. Its value is always unique in the Barion system. This is used e.g. to identify payments. For security and compatibility reason the GUID is used without hyphens for most of our API.&lt;br /&gt;
|-&lt;br /&gt;
| DateTime&lt;br /&gt;
| Date and time values, represented in a string format of the &#039;&#039;&#039;ISO-8601&#039;&#039;&#039; standard, like this: &#039;&#039;2014-12-06T08:35:46Z&#039;&#039;. All API call responses contain datetimes as strings.&lt;br /&gt;
|-&lt;br /&gt;
| TimeSpan&lt;br /&gt;
| A time range value represented in a string format of the &#039;&#039;&#039;ISO-8601&#039;&#039;&#039; standard, like this: &#039;&#039;3.14:15:28&#039;&#039; (three days, fourteen hours, fifteen minutes, twenty-eight seconds). All API call responses contain datetimes as strings.&lt;br /&gt;
|-&lt;br /&gt;
| bool&lt;br /&gt;
| Boolean &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; values. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; avoid integer or byte evaluation when constructing the request JSON!&lt;br /&gt;
|-&lt;br /&gt;
| byte&lt;br /&gt;
| Byte representation of an enumeration value. This is only for internal use in the Barion system, API call responses always contain the string representation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== API URLs ==&lt;br /&gt;
&lt;br /&gt;
The base URL for the Barion API depends on the environment you are connecting to.&lt;br /&gt;
&lt;br /&gt;
Base URL for API requests in the &#039;&#039;&#039;Live (production)&#039;&#039;&#039; environment: &amp;lt;code&amp;gt;https://api.barion.com&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Base URL for API requests in the &#039;&#039;&#039;Sandbox (test)&#039;&#039;&#039; environment: &amp;lt;code&amp;gt;https://api.test.barion.com&amp;lt;/code&amp;gt; (learn more about the Sandbox environment [[Sandbox|here]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Always double check that you are connecting to the proper environment to avoid unnecessary hassle and troubleshooting!&lt;br /&gt;
&lt;br /&gt;
== API versioning ==&lt;br /&gt;
&lt;br /&gt;
To avoid breaking changes, whenever there is a major update to an API endpoint, it is moved to a higher level of API version. At the moment, the Barion API offers two different API versions (noted &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;v2&amp;lt;/code&amp;gt;). Some API endpoints are only available in v1 or v2. See the reference page of a given API endpoint to see which versions are available.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Though version numbers can be omitted from the endpoint path (such requests always fall back to &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt;), it is recommended to always specify the API version when sending requests to the Barion API to avoid confusion.&lt;br /&gt;
&lt;br /&gt;
Example paths:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://api.barion.com/Transaction/List&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; - implicit call to a &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt; endpoint (version number is omitted from path)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://api.barion.com/v1/Transfer/Send&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; - explicit call to a &amp;lt;code&amp;gt;v1&amp;lt;/code&amp;gt; endpoint&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://api.barion.com/v2/Payment/Start&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; - explicit call to a &amp;lt;code&amp;gt;v2&amp;lt;/code&amp;gt; endpoint&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=Some endpoints can only be authenticated with username/password combination (eg.: [[Statement-Download-v2|v2/Statement/Download]]).&amp;lt;br/&amp;gt; Should you use this feature, please contact customer support, and request this type of authentication to be enabled on api).|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
For every request sent to the Barion API you have to authenticate yourself. For this every API request should cointain a &amp;lt;code&amp;gt;POSKey&amp;lt;/code&amp;gt; property containing the secret API key for the shop. This key is in the confirmation e-mail that was sent to you when you opened the shop or can be copied from the details page of the shop (secure.barion.com -&amp;gt; Manage my shops -&amp;gt; Details). This is unique for every shop in the system. Be aware that the test and live environment are completely separate environments, you need to create different shops. Make sure that you use the POSkey and not the public key:&lt;br /&gt;
&lt;br /&gt;
[[File:Poskey.jpg]]&lt;br /&gt;
&lt;br /&gt;
If the key is invalid you will receive an &amp;lt;code&amp;gt;AuthenticationFailed&amp;lt;/code&amp;gt; error.&lt;br /&gt;
&lt;br /&gt;
== Handling the response ==&lt;br /&gt;
The structure of the response varies from endpoint to endpoint however on property can found in all of them. Every API response contains an &amp;lt;code&amp;gt;Errors&amp;lt;/code&amp;gt; array. If this array is empty then the request was processed successfully. This array can contain multiple errors so make sure that the integration is prepared for this. The errors have the following fields&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! FieldName || Description&lt;br /&gt;
|-&lt;br /&gt;
| ErrorCode || The error code of the payment, this can be interpreted as an error Id.&lt;br /&gt;
|-&lt;br /&gt;
| Title|| The title of the error, this is a more readable form of the error.&lt;br /&gt;
|-&lt;br /&gt;
| Description|| The description of the error, more information about the error.&lt;br /&gt;
|-&lt;br /&gt;
| EndPoint || The URL of the API endpoint to help the reproduction of the error scenario.&lt;br /&gt;
|-&lt;br /&gt;
| AuthData || The e-mail address of the caller to help the reproduction of the error scenario. &lt;br /&gt;
|-&lt;br /&gt;
| HappenedAt || The timestamp of the response.&lt;br /&gt;
|-&lt;br /&gt;
| PaymentId || &#039;&#039;&#039;(COMING SOON)&#039;&#039;&#039; If the error is related to a business process that involves a given payment, the public identifier of the payment is supplied here. This property is not present on all errors.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example error response&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=json&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Errors&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;ErrorCode&amp;quot;: &amp;quot;NotExistingPaymentId&amp;quot;,&lt;br /&gt;
      &amp;quot;Title&amp;quot;: &amp;quot;The given payment id is invalid&amp;quot;,&lt;br /&gt;
      &amp;quot;Description&amp;quot;: &amp;quot;The given payment id(510bbd38-08c9-40b9-9e21-c6f6cb9eb4f1) is invalid!&amp;quot;,&lt;br /&gt;
      &amp;quot;EndPoint&amp;quot;: &amp;quot;https://api.barion.com/v2/Payment/GetPaymentState?POSKey=5b65f8f7a5f4405bb19495383dcf170a&amp;amp;PaymentId=510bbd3808c940b99e21c6f6cb9eb4f1&amp;quot;,&lt;br /&gt;
      &amp;quot;AuthData&amp;quot;: &amp;quot;shop@example.com&amp;quot;,&lt;br /&gt;
      &amp;quot;HappenedAt&amp;quot;: &amp;quot;2017-02-06T09:48:13.7694921Z&amp;quot;,&lt;br /&gt;
      &amp;quot;PaymentId&amp;quot;: &amp;quot;e666ddb8-e4d3-4c04-b176-c65757ef68cf&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Security==&lt;br /&gt;
Please refer to the [[Security Measures]] page for more information on IT security before staring to code.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=FundingSources&amp;diff=3355</id>
		<title>FundingSources</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=FundingSources&amp;diff=3355"/>
		<updated>2022-02-18T12:14:42Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Possible values */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=FundingSources array}}&lt;br /&gt;
&lt;br /&gt;
This array inidcates the payment methods, that will be available to the payer on the gateway.&lt;br /&gt;
&lt;br /&gt;
This array is used by the following API endpoints:&lt;br /&gt;
* [[Payment-Start-v2-3DS]]&lt;br /&gt;
&lt;br /&gt;
= Possible values =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; There is no option to disallow payment by balance since that would deny Barion Wallet users with a balance the ability to pay. There is an option to exclude cards, but not balance.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
!Value&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| All || Payment can be completed with all funding sources. Equivalent to [&amp;quot;Balance&amp;quot;, &amp;quot;Card&amp;quot;, &amp;quot;GooglePay&amp;quot;, &amp;quot;ApplePay&amp;quot;]&lt;br /&gt;
|-&lt;br /&gt;
| Balance || Payer can use their Barion wallet balance&lt;br /&gt;
|-&lt;br /&gt;
| BankCard|| Charge can be executed by bank card, either as a guest or as a logged-in Barion user.&lt;br /&gt;
|-&lt;br /&gt;
| GooglePay || Payment can be completed using GooglePay &amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Only available as guest on capable devices&lt;br /&gt;
|-&lt;br /&gt;
| ApplePay || Payment can be completed using ApplePay&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Only available as guest on capable devices&lt;br /&gt;
|-&lt;br /&gt;
| BankTransfer || Payment can be completed via bank transfer&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Supported banks vary by country and currency&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Available payment methods granted by Barion operators for your shop, so for eg. if your contract denies GooglePay, it won&#039;t be displayed on Barion Smart Gateway, no matter what you send.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Callback_mechanism&amp;diff=3293</id>
		<title>Callback mechanism</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Callback_mechanism&amp;diff=3293"/>
		<updated>2022-01-19T07:17:28Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Actions initiating a callback */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Payment callback mechanism (aka. IPN)}}&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Whenever a given payment&#039;s state changes, it is expected that the caller system and the Barion database are synchronized. This is accomplished by implementing the &#039;&#039;&#039;callback mechanism&#039;&#039;&#039; (referred to as &#039;&#039;&amp;quot;Instant Payment Notification&amp;quot;&#039;&#039; or &#039;&#039;&amp;quot;IPN&amp;quot;&#039;&#039; in some terminology) between the two systems.&lt;br /&gt;
&lt;br /&gt;
== The callback process ==&lt;br /&gt;
&lt;br /&gt;
The event flow of the implemented callback mechanism is simple:&lt;br /&gt;
&lt;br /&gt;
# The payment gets completed, cancelled, expired, refunded, taken under investigation, or released from investigation&lt;br /&gt;
# The Barion system sends an &#039;&#039;&#039;HTTP POST&#039;&#039;&#039; request to the merchant&#039;s system to the URL defined by the merchant (in the &amp;lt;code&amp;gt;CallbackUrl&amp;lt;/code&amp;gt; parameter of the [[Payment-Start-v2|/v2/Payment/Start]] API call) with the payment&#039;s unique identifier, indicating that something has just happened, so the merchant&#039;s system should check the payment now&lt;br /&gt;
# The merchant&#039;s system sends a request to the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint with its POSKey and the received payment identifier&lt;br /&gt;
# Based on the response received, the merchant&#039;s system can determine what processing tasks should take place&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=Always process the entire response with all included transaction data, because different actions make different changes to the payment state object.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
== Structure and processing of the callback request ==&lt;br /&gt;
&lt;br /&gt;
The callback request contains one parameter, the payment identifier. This is sent in the &amp;lt;code&amp;gt;paymentId&amp;lt;/code&amp;gt; field of the POST request body. The merchant&#039;s system must send an &amp;lt;code&amp;gt;HTTP 200 OK&amp;lt;/code&amp;gt; response (with any content) in order for the callback to be considered successful. The timeout period for answering a callback request is &#039;&#039;&#039;15 seconds&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If the Barion system does not get an HTTP 200 response, it retries sending the callback for a maximum of 5 times, with exponential back-off timing delay between tries:&lt;br /&gt;
* 2 seconds&lt;br /&gt;
* 6 seconds&lt;br /&gt;
* 18 seconds&lt;br /&gt;
* 54 seconds&lt;br /&gt;
* 2 minutes 42 seconds&lt;br /&gt;
So the total time window allocated for successful callback is roughly &#039;&#039;&#039;4 minutes&#039;&#039;&#039;. If the Barion system fails to get an HTTP 200 response after that, the callback is not sent and the merchant&#039;s system automatically gets an e-mail notification about the error.&lt;br /&gt;
&lt;br /&gt;
Every time, when your system receives a callback request from the Barion you have to call the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint to find out the change. First, your system should check the payment&#039;s status and after the list of the payment&#039;s transactions. For example, if you requested a payment refund or when the reserved payment&#039;s time limit has expired the list of payment’s transactions will contain new e-money transactions. It&#039;s your system&#039;s responsibility to handle changes.&lt;br /&gt;
&lt;br /&gt;
== Actions initiating a callback, and how to detect them ==&lt;br /&gt;
&lt;br /&gt;
Different actions result in different changes in the payment state object that you query on the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint. Depending on what happened in the payment&#039;s life cycle, there are different things to look for. This section should help you choose what checks to perform based on your integration scenario. Please read these thoroughly and perform all applying checks in your business logic when processing a callback.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Successful payment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the customer successfully completes the payment, the payment status will be set to different values depending on the type of the payment.&lt;br /&gt;
* &amp;lt;code&amp;gt;Successful&amp;lt;/code&amp;gt; when using Immediate payments&lt;br /&gt;
* &amp;lt;code&amp;gt;Reserved&amp;lt;/code&amp;gt; when using Reservation payments&lt;br /&gt;
* &amp;lt;code&amp;gt;Authorized&amp;lt;/code&amp;gt; when using Delayed Capture payments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Payment rejection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the customer decides to reject payment, and return to the shop, the payment status will be set to &amp;lt;code&amp;gt;Canceled&amp;lt;/code&amp;gt;. The payment can no longer be completed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Finishing a Reservation payment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the shop finishes a Reservation payment, the payment status will be set depending on the finish being partial or full.&lt;br /&gt;
* if there are multiple payment transactions, but only certain one of them are being finished, the payment status will NOT change (it will stay in &amp;lt;code&amp;gt;Reserved&amp;lt;/code&amp;gt;)&lt;br /&gt;
* when every transaction in the payment has been finished, the payment status will be set to &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt;&lt;br /&gt;
* transactions finished with a lower amount than the initial reserve will result in a partial refund to the user, which shows up as a new refund transaction in the Transactions[] array of the payment state object&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Capturing a Delayed Capture payment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the shop captures a Delayed Capture payment, the payment status will be set to &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt;, regardless to whether the authorization and capture amounts match. No refund transaction is being created in this case, because the partial capture happens directly on the bank card.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Payment expiring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When a payment expires without being completed, the payment status will be set to &amp;lt;code&amp;gt;Expired&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If the payment was an ongoing Reservation payment that hasn&#039;t been finished in time, a refund will also be created, which shows up as a new refund transaction in the payment state object&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Refund&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When a manual refund is executed (via the website, or the [[Payment-Refund-v2|/v2/Payment/Refund]] API), a new refund transaction will be added to the Transactions[] array in the payment state object. Only &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt; payments can be refunded manually, and the payment status will not change during a refund, it will stay &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=Different actions make different changes to the overall payment state. Never rely only on payment status changes! Always process the entire payment state object and execute your business logic accordingly.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
Never rely on the callback function alone. When the callback URL is requested, your application must call the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] Barion API to get the proper payment state.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Security Measures]] page for more information and a list of IP addresses.&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=The IP address of the callback request may change any time for security reasons.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
== Why you should use it ==&lt;br /&gt;
&lt;br /&gt;
When a Barion Smart Gateway payment process takes place between the two systems, neither of them can rely purely on explicit user interaction to process things. In such situations, the Barion system must inform the merchant&#039;s system that the payment has changed in some way, without involving the user.&lt;br /&gt;
&lt;br /&gt;
Here are some examples:&lt;br /&gt;
&lt;br /&gt;
* the payment is completed, but the user closed their browser or lose network connection, preventing them from returning to the webshop or application that redirected them to the Barion Smart Gateway&lt;br /&gt;
* the user explicitly cancels the payment, but closes their browser instead of navigating back to the merchant&lt;br /&gt;
* the payment is never completed and expires because of the time window limit&lt;br /&gt;
* the payment is refunded &lt;br /&gt;
&lt;br /&gt;
Implementing callback handling will save you time and pain tracking such &amp;quot;lost&amp;quot; payments. It also eases the troubleshooting with your customers, since you will always have valid data on your side.&lt;br /&gt;
&lt;br /&gt;
== Rate limiting ==&lt;br /&gt;
To prevent potential disruptions in our service caused by the abuse of the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint, we have introduced a rate-limiting feature to throttle excessive requests. &#039;&#039;&#039;Generally, you should rely on the callback mechanism whenever possible unless you have a specific reason not to&#039;&#039;&#039;, but if you want to manually get the details of a payment, here are a couple of things to bear in mind:&lt;br /&gt;
* Make sure you do not send continuous requests for the same payment even if you need to get its current state manually without waiting for the callback to happen&lt;br /&gt;
* Do not keep requesting for an indefinite time, even if your requests are throttled (e.g. if a problem occurs during the payment process, and the callback never happens, you shouldn&#039;t keep polling the API indefinitely) In this case the frequency is not the problem, but as time passes these orphan requests can cause a great load together&lt;br /&gt;
&lt;br /&gt;
To avoid these situations, the following throttling logic is implemented on our API:&lt;br /&gt;
* During a 5 seconds window we only accept the first 2 [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] requests with the same payment ID. This means that if you submit two requests less than 5 seconds apart, subsequent requests will be denied until 5 seconds pass after the initial successful request. These requests will return with an HTTP 429 &amp;quot;Too many requests&amp;quot; error.&lt;br /&gt;
* We keep track of requests, and if requests with the same payment ID reach a certain limit during a specific timeframe, all further requests will return HTTP 429. The exact timeframe and limits are not disclosed to the public.&lt;br /&gt;
&lt;br /&gt;
To reinforce the points above, we recommend using the callback mechanism described above, and calling the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint only when there&#039;s a reason to do so.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Callback_mechanism&amp;diff=3292</id>
		<title>Callback mechanism</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Callback_mechanism&amp;diff=3292"/>
		<updated>2022-01-17T10:27:08Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* The callback process */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Payment callback mechanism (aka. IPN)}}&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Whenever a given payment&#039;s state changes, it is expected that the caller system and the Barion database are synchronized. This is accomplished by implementing the &#039;&#039;&#039;callback mechanism&#039;&#039;&#039; (referred to as &#039;&#039;&amp;quot;Instant Payment Notification&amp;quot;&#039;&#039; or &#039;&#039;&amp;quot;IPN&amp;quot;&#039;&#039; in some terminology) between the two systems.&lt;br /&gt;
&lt;br /&gt;
== The callback process ==&lt;br /&gt;
&lt;br /&gt;
The event flow of the implemented callback mechanism is simple:&lt;br /&gt;
&lt;br /&gt;
# The payment gets completed, cancelled, expired, refunded, taken under investigation, or released from investigation&lt;br /&gt;
# The Barion system sends an &#039;&#039;&#039;HTTP POST&#039;&#039;&#039; request to the merchant&#039;s system to the URL defined by the merchant (in the &amp;lt;code&amp;gt;CallbackUrl&amp;lt;/code&amp;gt; parameter of the [[Payment-Start-v2|/v2/Payment/Start]] API call) with the payment&#039;s unique identifier, indicating that something has just happened, so the merchant&#039;s system should check the payment now&lt;br /&gt;
# The merchant&#039;s system sends a request to the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint with its POSKey and the received payment identifier&lt;br /&gt;
# Based on the response received, the merchant&#039;s system can determine what processing tasks should take place&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=Always process the entire response with all included transaction data, because different actions make different changes to the payment state object.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
== Structure and processing of the callback request ==&lt;br /&gt;
&lt;br /&gt;
The callback request contains one parameter, the payment identifier. This is sent in the &amp;lt;code&amp;gt;paymentId&amp;lt;/code&amp;gt; field of the POST request body. The merchant&#039;s system must send an &amp;lt;code&amp;gt;HTTP 200 OK&amp;lt;/code&amp;gt; response (with any content) in order for the callback to be considered successful. The timeout period for answering a callback request is &#039;&#039;&#039;15 seconds&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If the Barion system does not get an HTTP 200 response, it retries sending the callback for a maximum of 5 times, with exponential back-off timing delay between tries:&lt;br /&gt;
* 2 seconds&lt;br /&gt;
* 6 seconds&lt;br /&gt;
* 18 seconds&lt;br /&gt;
* 54 seconds&lt;br /&gt;
* 2 minutes 42 seconds&lt;br /&gt;
So the total time window allocated for successful callback is roughly &#039;&#039;&#039;4 minutes&#039;&#039;&#039;. If the Barion system fails to get an HTTP 200 response after that, the callback is not sent and the merchant&#039;s system automatically gets an e-mail notification about the error.&lt;br /&gt;
&lt;br /&gt;
Every time, when your system receives a callback request from the Barion you have to call the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint to find out the change. First, your system should check the payment&#039;s status and after the list of the payment&#039;s transactions. For example, if you requested a payment refund or when the reserved payment&#039;s time limit has expired the list of payment’s transactions will contain new e-money transactions. It&#039;s your system&#039;s responsibility to handle changes.&lt;br /&gt;
&lt;br /&gt;
== Actions initiating a callback ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Successful payment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the customer successfully completes the payment, the payment status will be set to different values depending on the type of the payment.&lt;br /&gt;
* &amp;lt;code&amp;gt;Successful&amp;lt;/code&amp;gt; when using Immediate payments&lt;br /&gt;
* &amp;lt;code&amp;gt;Reserved&amp;lt;/code&amp;gt; when using Reservation payments&lt;br /&gt;
* &amp;lt;code&amp;gt;Authorized&amp;lt;/code&amp;gt; when using Delayed Capture payments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Payment rejection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the customer decides to reject payment, and return to the shop, the payment status will be set to &amp;lt;code&amp;gt;Canceled&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Finishing a Reservation payment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the shop finishes a Reservation payment, the payment status will be set depending on the finish being partial or full.&lt;br /&gt;
* if only certain transactions are being finished, the payment status will NOT change&lt;br /&gt;
* when every transaction in the payment has been finished, the payment status will be set to &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt;&lt;br /&gt;
* transactions finished with a lower amount than the initial reserve will result in a refund to the user, which shows up as a separate transaction in the payment state object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Finishing a Delayed Capture payment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the shop finishes a Delayed Capture payment, the payment status will be set to &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt;, regardless to whether the authorization and capture amounts match.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Payment expiring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When a payment expires without being completed, the payment status will be set to &amp;lt;code&amp;gt;Expired&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If the payment was an ongoing Reservation payment that was not finished, a refund will also be created, which shows up as a separate transaction in the payment state object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Refund&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When a refund happens, it results in a separate refund transaction being added to the Transactions array in the payment state object. Only &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt; payments can be refunded, and the payment status will not change during a refund!&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=Different actions make different changes to the overall payment state. Never rely only on payment status changes! Always process the entire payment state object and execute your business logic accordingly.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
Never rely on the callback function alone. When the callback URL is requested, your application must call the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] Barion API to get the proper payment state.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Security Measures]] page for more information and a list of IP addresses.&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=The IP address of the callback request may change any time for security reasons.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
== Why you should use it ==&lt;br /&gt;
&lt;br /&gt;
When a Barion Smart Gateway payment process takes place between the two systems, neither of them can rely purely on explicit user interaction to process things. In such situations, the Barion system must inform the merchant&#039;s system that the payment has changed in some way, without involving the user.&lt;br /&gt;
&lt;br /&gt;
Here are some examples:&lt;br /&gt;
&lt;br /&gt;
* the payment is completed, but the user closed their browser or lose network connection, preventing them from returning to the webshop or application that redirected them to the Barion Smart Gateway&lt;br /&gt;
* the user explicitly cancels the payment, but closes their browser instead of navigating back to the merchant&lt;br /&gt;
* the payment is never completed and expires because of the time window limit&lt;br /&gt;
* the payment is refunded &lt;br /&gt;
&lt;br /&gt;
Implementing callback handling will save you time and pain tracking such &amp;quot;lost&amp;quot; payments. It also eases the troubleshooting with your customers, since you will always have valid data on your side.&lt;br /&gt;
&lt;br /&gt;
== Rate limiting ==&lt;br /&gt;
To prevent potential disruptions in our service caused by the abuse of the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint, we have introduced a rate-limiting feature to throttle excessive requests. &#039;&#039;&#039;Generally, you should rely on the callback mechanism whenever possible unless you have a specific reason not to&#039;&#039;&#039;, but if you want to manually get the details of a payment, here are a couple of things to bear in mind:&lt;br /&gt;
* Make sure you do not send continuous requests for the same payment even if you need to get its current state manually without waiting for the callback to happen&lt;br /&gt;
* Do not keep requesting for an indefinite time, even if your requests are throttled (e.g. if a problem occurs during the payment process, and the callback never happens, you shouldn&#039;t keep polling the API indefinitely) In this case the frequency is not the problem, but as time passes these orphan requests can cause a great load together&lt;br /&gt;
&lt;br /&gt;
To avoid these situations, the following throttling logic is implemented on our API:&lt;br /&gt;
* During a 5 seconds window we only accept the first 2 [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] requests with the same payment ID. This means that if you submit two requests less than 5 seconds apart, subsequent requests will be denied until 5 seconds pass after the initial successful request. These requests will return with an HTTP 429 &amp;quot;Too many requests&amp;quot; error.&lt;br /&gt;
* We keep track of requests, and if requests with the same payment ID reach a certain limit during a specific timeframe, all further requests will return HTTP 429. The exact timeframe and limits are not disclosed to the public.&lt;br /&gt;
&lt;br /&gt;
To reinforce the points above, we recommend using the callback mechanism described above, and calling the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint only when there&#039;s a reason to do so.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Callback_mechanism&amp;diff=3291</id>
		<title>Callback mechanism</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Callback_mechanism&amp;diff=3291"/>
		<updated>2022-01-17T10:26:02Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Security */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Payment callback mechanism (aka. IPN)}}&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Whenever a given payment&#039;s state changes, it is expected that the caller system and the Barion database are synchronized. This is accomplished by implementing the &#039;&#039;&#039;callback mechanism&#039;&#039;&#039; (referred to as &#039;&#039;&amp;quot;Instant Payment Notification&amp;quot;&#039;&#039; or &#039;&#039;&amp;quot;IPN&amp;quot;&#039;&#039; in some terminology) between the two systems.&lt;br /&gt;
&lt;br /&gt;
== The callback process ==&lt;br /&gt;
&lt;br /&gt;
The event flow of the implemented callback mechanism is simple:&lt;br /&gt;
&lt;br /&gt;
# The payment gets completed, cancelled, expired, refunded, taken under investigation, or released from investigation&lt;br /&gt;
# The Barion system sends an &#039;&#039;&#039;HTTP POST&#039;&#039;&#039; request to the merchant&#039;s system to the URL defined by the merchant (in the &amp;lt;code&amp;gt;CallbackUrl&amp;lt;/code&amp;gt; parameter of the [[Payment-Start-v2|/v2/Payment/Start]] API call) with the payment&#039;s unique identifier, indicating that something has just happened, so the merchant&#039;s system should check the payment now&lt;br /&gt;
# The merchant&#039;s system sends a request to the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint with its POSKey and the received payment identifier&lt;br /&gt;
# Based on the response received, the merchant&#039;s system can determine what processing tasks should take place (&#039;&#039;&#039;IMPORTANT:&#039;&#039;&#039; always process the entire response with all included transaction data, because some actions do not update the status of the payment)&lt;br /&gt;
&lt;br /&gt;
== Structure and processing of the callback request ==&lt;br /&gt;
&lt;br /&gt;
The callback request contains one parameter, the payment identifier. This is sent in the &amp;lt;code&amp;gt;paymentId&amp;lt;/code&amp;gt; field of the POST request body. The merchant&#039;s system must send an &amp;lt;code&amp;gt;HTTP 200 OK&amp;lt;/code&amp;gt; response (with any content) in order for the callback to be considered successful. The timeout period for answering a callback request is &#039;&#039;&#039;15 seconds&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If the Barion system does not get an HTTP 200 response, it retries sending the callback for a maximum of 5 times, with exponential back-off timing delay between tries:&lt;br /&gt;
* 2 seconds&lt;br /&gt;
* 6 seconds&lt;br /&gt;
* 18 seconds&lt;br /&gt;
* 54 seconds&lt;br /&gt;
* 2 minutes 42 seconds&lt;br /&gt;
So the total time window allocated for successful callback is roughly &#039;&#039;&#039;4 minutes&#039;&#039;&#039;. If the Barion system fails to get an HTTP 200 response after that, the callback is not sent and the merchant&#039;s system automatically gets an e-mail notification about the error.&lt;br /&gt;
&lt;br /&gt;
Every time, when your system receives a callback request from the Barion you have to call the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint to find out the change. First, your system should check the payment&#039;s status and after the list of the payment&#039;s transactions. For example, if you requested a payment refund or when the reserved payment&#039;s time limit has expired the list of payment’s transactions will contain new e-money transactions. It&#039;s your system&#039;s responsibility to handle changes.&lt;br /&gt;
&lt;br /&gt;
== Actions initiating a callback ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Successful payment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the customer successfully completes the payment, the payment status will be set to different values depending on the type of the payment.&lt;br /&gt;
* &amp;lt;code&amp;gt;Successful&amp;lt;/code&amp;gt; when using Immediate payments&lt;br /&gt;
* &amp;lt;code&amp;gt;Reserved&amp;lt;/code&amp;gt; when using Reservation payments&lt;br /&gt;
* &amp;lt;code&amp;gt;Authorized&amp;lt;/code&amp;gt; when using Delayed Capture payments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Payment rejection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the customer decides to reject payment, and return to the shop, the payment status will be set to &amp;lt;code&amp;gt;Canceled&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Finishing a Reservation payment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the shop finishes a Reservation payment, the payment status will be set depending on the finish being partial or full.&lt;br /&gt;
* if only certain transactions are being finished, the payment status will NOT change&lt;br /&gt;
* when every transaction in the payment has been finished, the payment status will be set to &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt;&lt;br /&gt;
* transactions finished with a lower amount than the initial reserve will result in a refund to the user, which shows up as a separate transaction in the payment state object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Finishing a Delayed Capture payment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the shop finishes a Delayed Capture payment, the payment status will be set to &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt;, regardless to whether the authorization and capture amounts match.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Payment expiring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When a payment expires without being completed, the payment status will be set to &amp;lt;code&amp;gt;Expired&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If the payment was an ongoing Reservation payment that was not finished, a refund will also be created, which shows up as a separate transaction in the payment state object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Refund&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When a refund happens, it results in a separate refund transaction being added to the Transactions array in the payment state object. Only &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt; payments can be refunded, and the payment status will not change during a refund!&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=Different actions make different changes to the overall payment state. Never rely only on payment status changes! Always process the entire payment state object and execute your business logic accordingly.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
Never rely on the callback function alone. When the callback URL is requested, your application must call the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] Barion API to get the proper payment state.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Security Measures]] page for more information and a list of IP addresses.&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=The IP address of the callback request may change any time for security reasons.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
== Why you should use it ==&lt;br /&gt;
&lt;br /&gt;
When a Barion Smart Gateway payment process takes place between the two systems, neither of them can rely purely on explicit user interaction to process things. In such situations, the Barion system must inform the merchant&#039;s system that the payment has changed in some way, without involving the user.&lt;br /&gt;
&lt;br /&gt;
Here are some examples:&lt;br /&gt;
&lt;br /&gt;
* the payment is completed, but the user closed their browser or lose network connection, preventing them from returning to the webshop or application that redirected them to the Barion Smart Gateway&lt;br /&gt;
* the user explicitly cancels the payment, but closes their browser instead of navigating back to the merchant&lt;br /&gt;
* the payment is never completed and expires because of the time window limit&lt;br /&gt;
* the payment is refunded &lt;br /&gt;
&lt;br /&gt;
Implementing callback handling will save you time and pain tracking such &amp;quot;lost&amp;quot; payments. It also eases the troubleshooting with your customers, since you will always have valid data on your side.&lt;br /&gt;
&lt;br /&gt;
== Rate limiting ==&lt;br /&gt;
To prevent potential disruptions in our service caused by the abuse of the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint, we have introduced a rate-limiting feature to throttle excessive requests. &#039;&#039;&#039;Generally, you should rely on the callback mechanism whenever possible unless you have a specific reason not to&#039;&#039;&#039;, but if you want to manually get the details of a payment, here are a couple of things to bear in mind:&lt;br /&gt;
* Make sure you do not send continuous requests for the same payment even if you need to get its current state manually without waiting for the callback to happen&lt;br /&gt;
* Do not keep requesting for an indefinite time, even if your requests are throttled (e.g. if a problem occurs during the payment process, and the callback never happens, you shouldn&#039;t keep polling the API indefinitely) In this case the frequency is not the problem, but as time passes these orphan requests can cause a great load together&lt;br /&gt;
&lt;br /&gt;
To avoid these situations, the following throttling logic is implemented on our API:&lt;br /&gt;
* During a 5 seconds window we only accept the first 2 [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] requests with the same payment ID. This means that if you submit two requests less than 5 seconds apart, subsequent requests will be denied until 5 seconds pass after the initial successful request. These requests will return with an HTTP 429 &amp;quot;Too many requests&amp;quot; error.&lt;br /&gt;
* We keep track of requests, and if requests with the same payment ID reach a certain limit during a specific timeframe, all further requests will return HTTP 429. The exact timeframe and limits are not disclosed to the public.&lt;br /&gt;
&lt;br /&gt;
To reinforce the points above, we recommend using the callback mechanism described above, and calling the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint only when there&#039;s a reason to do so.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Callback_mechanism&amp;diff=3290</id>
		<title>Callback mechanism</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Callback_mechanism&amp;diff=3290"/>
		<updated>2022-01-17T10:11:30Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* The callback process */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Payment callback mechanism (aka. IPN)}}&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Whenever a given payment&#039;s state changes, it is expected that the caller system and the Barion database are synchronized. This is accomplished by implementing the &#039;&#039;&#039;callback mechanism&#039;&#039;&#039; (referred to as &#039;&#039;&amp;quot;Instant Payment Notification&amp;quot;&#039;&#039; or &#039;&#039;&amp;quot;IPN&amp;quot;&#039;&#039; in some terminology) between the two systems.&lt;br /&gt;
&lt;br /&gt;
== The callback process ==&lt;br /&gt;
&lt;br /&gt;
The event flow of the implemented callback mechanism is simple:&lt;br /&gt;
&lt;br /&gt;
# The payment gets completed, cancelled, expired, refunded, taken under investigation, or released from investigation&lt;br /&gt;
# The Barion system sends an &#039;&#039;&#039;HTTP POST&#039;&#039;&#039; request to the merchant&#039;s system to the URL defined by the merchant (in the &amp;lt;code&amp;gt;CallbackUrl&amp;lt;/code&amp;gt; parameter of the [[Payment-Start-v2|/v2/Payment/Start]] API call) with the payment&#039;s unique identifier, indicating that something has just happened, so the merchant&#039;s system should check the payment now&lt;br /&gt;
# The merchant&#039;s system sends a request to the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint with its POSKey and the received payment identifier&lt;br /&gt;
# Based on the response received, the merchant&#039;s system can determine what processing tasks should take place (&#039;&#039;&#039;IMPORTANT:&#039;&#039;&#039; always process the entire response with all included transaction data, because some actions do not update the status of the payment)&lt;br /&gt;
&lt;br /&gt;
== Structure and processing of the callback request ==&lt;br /&gt;
&lt;br /&gt;
The callback request contains one parameter, the payment identifier. This is sent in the &amp;lt;code&amp;gt;paymentId&amp;lt;/code&amp;gt; field of the POST request body. The merchant&#039;s system must send an &amp;lt;code&amp;gt;HTTP 200 OK&amp;lt;/code&amp;gt; response (with any content) in order for the callback to be considered successful. The timeout period for answering a callback request is &#039;&#039;&#039;15 seconds&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If the Barion system does not get an HTTP 200 response, it retries sending the callback for a maximum of 5 times, with exponential back-off timing delay between tries:&lt;br /&gt;
* 2 seconds&lt;br /&gt;
* 6 seconds&lt;br /&gt;
* 18 seconds&lt;br /&gt;
* 54 seconds&lt;br /&gt;
* 2 minutes 42 seconds&lt;br /&gt;
So the total time window allocated for successful callback is roughly &#039;&#039;&#039;4 minutes&#039;&#039;&#039;. If the Barion system fails to get an HTTP 200 response after that, the callback is not sent and the merchant&#039;s system automatically gets an e-mail notification about the error.&lt;br /&gt;
&lt;br /&gt;
Every time, when your system receives a callback request from the Barion you have to call the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint to find out the change. First, your system should check the payment&#039;s status and after the list of the payment&#039;s transactions. For example, if you requested a payment refund or when the reserved payment&#039;s time limit has expired the list of payment’s transactions will contain new e-money transactions. It&#039;s your system&#039;s responsibility to handle changes.&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
Never rely on the callback function alone. When the callback URL is requested, your application must call the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] Barion API to get the proper payment state.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[Security Measures]] page for more information and a list of IP addresses.&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=The IP address of the callback request may change any time for security reasons.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
== Why you should use it ==&lt;br /&gt;
&lt;br /&gt;
When a Barion Smart Gateway payment process takes place between the two systems, neither of them can rely purely on explicit user interaction to process things. In such situations, the Barion system must inform the merchant&#039;s system that the payment has changed in some way, without involving the user.&lt;br /&gt;
&lt;br /&gt;
Here are some examples:&lt;br /&gt;
&lt;br /&gt;
* the payment is completed, but the user closed their browser or lose network connection, preventing them from returning to the webshop or application that redirected them to the Barion Smart Gateway&lt;br /&gt;
* the user explicitly cancels the payment, but closes their browser instead of navigating back to the merchant&lt;br /&gt;
* the payment is never completed and expires because of the time window limit&lt;br /&gt;
* the payment is refunded &lt;br /&gt;
&lt;br /&gt;
Implementing callback handling will save you time and pain tracking such &amp;quot;lost&amp;quot; payments. It also eases the troubleshooting with your customers, since you will always have valid data on your side.&lt;br /&gt;
&lt;br /&gt;
== Rate limiting ==&lt;br /&gt;
To prevent potential disruptions in our service caused by the abuse of the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint, we have introduced a rate-limiting feature to throttle excessive requests. &#039;&#039;&#039;Generally, you should rely on the callback mechanism whenever possible unless you have a specific reason not to&#039;&#039;&#039;, but if you want to manually get the details of a payment, here are a couple of things to bear in mind:&lt;br /&gt;
* Make sure you do not send continuous requests for the same payment even if you need to get its current state manually without waiting for the callback to happen&lt;br /&gt;
* Do not keep requesting for an indefinite time, even if your requests are throttled (e.g. if a problem occurs during the payment process, and the callback never happens, you shouldn&#039;t keep polling the API indefinitely) In this case the frequency is not the problem, but as time passes these orphan requests can cause a great load together&lt;br /&gt;
&lt;br /&gt;
To avoid these situations, the following throttling logic is implemented on our API:&lt;br /&gt;
* During a 5 seconds window we only accept the first 2 [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] requests with the same payment ID. This means that if you submit two requests less than 5 seconds apart, subsequent requests will be denied until 5 seconds pass after the initial successful request. These requests will return with an HTTP 429 &amp;quot;Too many requests&amp;quot; error.&lt;br /&gt;
* We keep track of requests, and if requests with the same payment ID reach a certain limit during a specific timeframe, all further requests will return HTTP 429. The exact timeframe and limits are not disclosed to the public.&lt;br /&gt;
&lt;br /&gt;
To reinforce the points above, we recommend using the callback mechanism described above, and calling the [[Payment-GetPaymentState-v2|/v2/Payment/GetPaymentState]] API endpoint only when there&#039;s a reason to do so.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Payment-Start-v2-old&amp;diff=3286</id>
		<title>Payment-Start-v2-old</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Payment-Start-v2-old&amp;diff=3286"/>
		<updated>2021-12-13T07:42:29Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Input properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initialize a new payment}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=The structure of this API call has been changed due to 3D Secure / PSD2 regulations! You can access the new structure here: [[Payment-Start-v2]]|color=#FF0000}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Payment/Start&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/payment/start&amp;lt;/code&amp;gt; API endpoint is used to create a new payment in the Barion system.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Creating_a_shop|Creating a shop in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Use cases ==&lt;br /&gt;
&lt;br /&gt;
This API endpoint is designed to be used in the following scenarios:&lt;br /&gt;
* [[Responsive_web_payment|Responsive Web Payment]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| POSKey || Guid || &lt;br /&gt;
* Required&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PaymentType || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;Immediate&amp;quot;&lt;br /&gt;
** &amp;quot;Reservation&amp;quot;&lt;br /&gt;
** &amp;quot;DelayedCapture&amp;quot;&lt;br /&gt;
|| The type of the payment, which can be either immediate, money reservation or delayed capture. 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. &lt;br /&gt;
Click here to learn more about reservation payments: [[Reservation_payment|Reservation payments]]&lt;br /&gt;
&lt;br /&gt;
Click here to learn more about delayed capture payments: [[Delayed_Capture|Delayed capture]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ReservationPeriod || TimeSpan (d.hh:mm:ss) || &lt;br /&gt;
* Required only if PaymentType is &amp;quot;Reservation&amp;quot;&lt;br /&gt;
* Minimum value: one minute&lt;br /&gt;
* Maximum value: one year&lt;br /&gt;
* Default value: 30 minutes&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| DelayedCapturePeriod || TimeSpan (d.hh:mm:ss) || &lt;br /&gt;
* Required only if PaymentType is &amp;quot;DelayedCapture&amp;quot;&lt;br /&gt;
* Minimum value: one minute&lt;br /&gt;
* Maximum value: 21 days&lt;br /&gt;
|| 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. The maximum time window depends on the country of the shop: 21 for Hungarian shops, 7 for everybody else&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PaymentWindow || TimeSpan (d.hh:mm:ss) || &lt;br /&gt;
* Optional&lt;br /&gt;
* Minimum value: one minute&lt;br /&gt;
* Maximum value: one week&lt;br /&gt;
* Default value: 30 minutes&lt;br /&gt;
|| Time window for the payment to be completed by the payer. The payer must execute the payment before this elapses, or else the payment will expire and can no longer be completed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| GuestCheckOut || bool || &lt;br /&gt;
* Required&lt;br /&gt;
* Value must be &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot;, integer evaulation is not supported&lt;br /&gt;
|| Flag indicating wether 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| InitiateRecurrence || bool || &lt;br /&gt;
* Optional&lt;br /&gt;
|| 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 susbscription payment scenarios. &lt;br /&gt;
Click here to learn more about token payments: [[Token_payment]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecurrenceId || string || &lt;br /&gt;
* Required when executing authorized payments&lt;br /&gt;
* Maximum length: 100 characters&lt;br /&gt;
* Must be unique per shop and per user&lt;br /&gt;
|| A string used to identify a given authorized payment. Its purpose is determined by the value of the &#039;&#039;&#039;InitiateRecurrence&#039;&#039;&#039; property.&lt;br /&gt;
* If &#039;&#039;&#039;InitiateRecurrence&#039;&#039;&#039; is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, this property must contain a &amp;lt;u&amp;gt;new&amp;lt;/u&amp;gt; desired identifier for a new authorized payment. This should be generated and stored by the shop before calling the API. Also the shop must ensure that this is unique per user in its own system.&lt;br /&gt;
* If &#039;&#039;&#039;InitiateRecurrence&#039;&#039;&#039; is &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, this property must contain an &amp;lt;u&amp;gt;existing&amp;lt;/u&amp;gt; identifier for an authorized payment. This should be used to charge a payer&#039;s funding source (either bank card or Barion wallet) that was already used successfully for a payment in the shop.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| FundingSources || string[] || &lt;br /&gt;
* Required&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;All&amp;quot;&lt;br /&gt;
** &amp;quot;Balance&amp;quot;&lt;br /&gt;
|| An array of strings containing the allowed funding sources that can be used to complete the payment. &amp;quot;Balance&amp;quot; means that the payer can only use their Barion wallet balance, while &amp;quot;All&amp;quot; means the payment can be completed with either a Barion wallet or a bank card.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; There is no option to disallow payment by balance, since that would deny Barion Wallet users with a balance the ability to pay. There is an option to exclude cards, but not balance.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this must be supplied as an array, because more funding source types are planned in the future.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PaymentRequestId || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Maximum length: 100 characters&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PayerHint || string || &lt;br /&gt;
* Optional&lt;br /&gt;
* If provided, must be valid email format&lt;br /&gt;
* Maximum length: 256 characters&lt;br /&gt;
|| The shop can optionally 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RedirectUrl || string || &lt;br /&gt;
* Required &lt;br /&gt;
* Maximum length: 2000 characters&lt;br /&gt;
|| The URL where the payer should be redirected after the payment is completed or cancelled. The payment identifier is added to the query string part of this URL in the &amp;lt;code&amp;gt;paymentId&amp;lt;/code&amp;gt; parameter. If not provided, the system will use the redirect URL assigned to the shop that started the payment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| CallbackUrl || string || &lt;br /&gt;
* Required &lt;br /&gt;
* Maximum length: 2000 characters&lt;br /&gt;
|| 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 &amp;lt;code&amp;gt;paymentId&amp;lt;/code&amp;gt; parameter. Click here to learn more about the callback mechanism: [[Callback_mechanism|Payment callback mechanism (IPN)]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Transactions || [[PaymentTransaction]][] || &lt;br /&gt;
* Required&lt;br /&gt;
|| 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.&lt;br /&gt;
Defining multiple transactions allow the payment initiator to distribute the payment amount between multiple shops. See the following page to learn more: [[Facilitated payments]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| OrderNumber || string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 100 characters&lt;br /&gt;
|| The order number generated by the shop. This is to aid the shop in identifying a given payment in their own system. This also shows up in generated monthly account statements and transaction history exports, so it also helps with bookkeeping.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ShippingAddress || [[ShippingAddress]] || &lt;br /&gt;
* Optional&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Locale || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Maximum length: 10 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;cs-CZ&amp;quot; (Czech)&lt;br /&gt;
** &amp;quot;de-DE&amp;quot; (German)&lt;br /&gt;
** &amp;quot;en-US&amp;quot; (English)&lt;br /&gt;
** &amp;quot;es-ES&amp;quot; (Spanish)&lt;br /&gt;
** &amp;quot;fr-FR&amp;quot; (French)&lt;br /&gt;
** &amp;quot;hu-HU&amp;quot; (Hungarian)&lt;br /&gt;
** &amp;quot;sk-SK&amp;quot; (Slovak)&lt;br /&gt;
** &amp;quot;sl-SI&amp;quot; (Slovenian)&lt;br /&gt;
|| This indicates in which language the Barion Smart Gateway should display for the payer upon redirect. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;CZK&amp;quot; (Czech crown)&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| 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. If no currency is provided, the default value is HUF. You must have a wallet in the given currency.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PayerPhoneNumber || string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Max length: 30 characters&lt;br /&gt;
* Expected format: 36701231234&lt;br /&gt;
* Required for using payment buttons&lt;br /&gt;
|| The phone number of the payer. Must be set to enable [[Payment_Buttons|payment buttons]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| PaymentId || Guid || The identifier of the newly initialized payment, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PaymentRequestId || string || The payment identifier supplied by the API caller in the request.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Status || [[PaymentStatus]]|| The status of the payment in the Barion system. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecurrenceResult || RecurrenceResult || Indicates the result of an authorized payment scenario. The result depends on the values of the &#039;&#039;&#039;InitiateRecurrence&#039;&#039;&#039; and &#039;&#039;&#039;RecurrenceId&#039;&#039;&#039; properties supplied in the request.&lt;br /&gt;
&lt;br /&gt;
* If &#039;&#039;&#039;InitiateRecurrence&#039;&#039;&#039; was &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, and a new authorized payment was successfully created, this will be &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt; (because no actual token charge took place yet)&lt;br /&gt;
&lt;br /&gt;
* If &#039;&#039;&#039;InitiateRecurrence&#039;&#039;&#039; was &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, but a previously authorized payment identifier was supplied in &#039;&#039;&#039;RecurrenceId&#039;&#039;&#039;, the system will try to charge the funding source associated with the authorized payment. If this charge is successful, the result is &amp;lt;code&amp;gt;Successful&amp;lt;/code&amp;gt;. If the system could not charge the funding source, the result is &amp;lt;code&amp;gt;Failed&amp;lt;/code&amp;gt;. If the given identifier is invalid or does not exist, the result is &amp;lt;code&amp;gt;NotFound&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| GatewayUrl || string || The URL of the Barion Smart Gateway (including the payment identifier), where the API caller should redirect the payer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 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.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=CardType&amp;diff=3032</id>
		<title>CardType</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=CardType&amp;diff=3032"/>
		<updated>2021-07-26T05:56:41Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Enum list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Card type enumeration}}&lt;br /&gt;
&lt;br /&gt;
This enum indicates the type of a bank card.&lt;br /&gt;
&lt;br /&gt;
= Included in =&lt;br /&gt;
&lt;br /&gt;
Bank card types are used in the following structures:&lt;br /&gt;
* [[BankCard]]&lt;br /&gt;
&lt;br /&gt;
= Enum list =&lt;br /&gt;
&lt;br /&gt;
{{api_enum_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| Unknown || 0 || The card type is unknown.&lt;br /&gt;
|-&lt;br /&gt;
| MasterCard || 10 || Standard MasterCard bank cards.&lt;br /&gt;
|-&lt;br /&gt;
| Visa || 20 || Standard Visa bank cards.&lt;br /&gt;
|-&lt;br /&gt;
| AmericanExpress || 30 || All kinds of American Express cards.&lt;br /&gt;
|-&lt;br /&gt;
| Electron || 40 || VISA Electron bank cards.&lt;br /&gt;
|-&lt;br /&gt;
| Maestro || 50 || 16 or 19 digit Maestro cards.&lt;br /&gt;
|-&lt;br /&gt;
| DinersClub || 70 || Diners Club cards&lt;br /&gt;
|-&lt;br /&gt;
| Discover || 80 || Discover cards&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; The enum value is returned as string.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Token_payment_3D_Secure&amp;diff=3030</id>
		<title>Token payment 3D Secure</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Token_payment_3D_Secure&amp;diff=3030"/>
		<updated>2021-07-12T15:00:10Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Possible error responses for the subsequent payment requests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Token Payment with 3D Secure}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This payment scenario allows the integrator shop to register a token for a customer (and a funding source) in the Barion system and then, later on, using this token, charge the customer without redirecting her to the Barion Smart Gateway UI. The user may be present at the site of the merchant or she can be off-session as well, so the merchant can charge her e.g. for subscriptions. This means that the customer authorizes the shop to charge her card or Barion balance without typing in the card information or Barion login again.&lt;br /&gt;
&lt;br /&gt;
[[File:3ds-recurring.png|1500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=Premium feature|text=This scenario is not allowed automatically for every approved shop and should be requested from Barion!|color=#1993c7}}&lt;br /&gt;
&lt;br /&gt;
= Token payment scenarios =&lt;br /&gt;
Token payment can be used in three use cases: &lt;br /&gt;
* &#039;&#039;&#039;Customer Initiated Payments&#039;&#039;&#039;: when the user is present on the website of the merchant and she decides to pay :&lt;br /&gt;
** &#039;&#039;&#039;OneClick payment&#039;&#039;&#039;: the user is charged upon her request initiated on the website of the merchant. Subsequent payments are subject to PSD2 SCA and as the user is present, she has to go through the authentication process.&lt;br /&gt;
* &#039;&#039;&#039;Merchant Initiated Payments&#039;&#039;&#039;: when the merchant initiates the payment without the user being present. It has two subtypes:&lt;br /&gt;
** &#039;&#039;&#039;Recurring payment&#039;&#039;&#039;: the user is charged with the same amount on a regular basis, typically in case of subscriptions. Subsequent payments are exempted from PSD2 SCA, but liability still shifts to the card issuer.&lt;br /&gt;
** &#039;&#039;&#039;MIT (merchant initiated transaction)&#039;&#039;&#039;: the user is charged on an irregular basis and/or with a different amount. Subsequent payments of this type are excluded from PSD2 SCA, the liability is on the merchant.&lt;br /&gt;
&lt;br /&gt;
== Customer participation ==&lt;br /&gt;
&lt;br /&gt;
Since the token scenario is suitable for both customer and merchant initiated payments here is a comparison about who starts the payment. This includes the regular, non-tokenized payment scenario as well:&lt;br /&gt;
&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | Scenario&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Initial payment&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Subsequent payments&lt;br /&gt;
|-&lt;br /&gt;
! Customer present&lt;br /&gt;
! Customer at Barion Smart GW &lt;br /&gt;
! Customer present&lt;br /&gt;
! Customer at Barion Smart GW&lt;br /&gt;
|-&lt;br /&gt;
| Non token (regular) payment || YES || YES || YES || YES &lt;br /&gt;
|-&lt;br /&gt;
| OneClick payment || YES || YES/NO&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; || YES || style=&amp;quot;background:#FFE2C4&amp;quot; | NO &lt;br /&gt;
|-&lt;br /&gt;
| Recurring payment || YES || YES/NO&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; || style=&amp;quot;background:#FFE2C4&amp;quot; | NO || style=&amp;quot;background:#FFE2C4&amp;quot; | NO &lt;br /&gt;
|-&lt;br /&gt;
| MIT || YES || YES/NO&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; || style=&amp;quot;background:#FFE2C4&amp;quot; | NO || style=&amp;quot;background:#FFE2C4&amp;quot; | NO &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #aaa; background-color:#eee; font-size: 0.8em; padding:5px 10px; display:inline-block;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; Token payment scenarios can be initiated with already registered &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; as well, in this case the customer may remain on the merchant&#039;s site. &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements for the scenarios ==&lt;br /&gt;
&lt;br /&gt;
These token payment scenarios have different requirements, this table below summarizes the key differences.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
! Payment amount&lt;br /&gt;
! Payment frequency&lt;br /&gt;
! Liability in case of fraud&lt;br /&gt;
|-&lt;br /&gt;
| OneClick payment || Various || Various || Card issuer&lt;br /&gt;
|-&lt;br /&gt;
| Recurring payment || Subsequent amounts must be equal or less than the initial amount  || Initial payment must define a minimum amount of days to wait between charges || Card issuer &lt;br /&gt;
|-&lt;br /&gt;
| Merchant initiated payment || Various  || Various || Merchant&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== 3DS authentication of the payer ==&lt;br /&gt;
&lt;br /&gt;
The new more secure 3DS v2 authentication must be performed for every online card payment. These token payment scenarios also have to use this new secure way of authentication. &lt;br /&gt;
The initial payment of a token scenario must be authenticated every time although the subsequent payments may be exempted in certain cases. &lt;br /&gt;
&lt;br /&gt;
Here is a table to compare the 3DS authentication requirements:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
! Initial payment&lt;br /&gt;
! Subsequent payments&lt;br /&gt;
|-&lt;br /&gt;
| One-click payment || ✔️ || ✔️&lt;br /&gt;
|-&lt;br /&gt;
| Recurring payment || ✔️ || &lt;br /&gt;
|-&lt;br /&gt;
| Merchant initiated payment || ✔️ || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;IMPORTANT:&#039;&#039; when performing subsequent One-click payments with the &amp;lt;code&amp;gt;ChallengePreference&amp;lt;/code&amp;gt; parameter set to &amp;lt;code&amp;gt;NoChallengeNeeded&amp;lt;/code&amp;gt; (indicating a request for Transaction Risk Analysis), only a fraud analysis will be performed, and the customer is not required to undergo a 3DS challenge.&lt;br /&gt;
&lt;br /&gt;
== Real life examples ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Phone bill&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Payer has a usage-based phone subscription that wants to pay without being present for every charge. She authorizes the phone company to charge her card every month.&lt;br /&gt;
* Scenario: Merchant Initiated Transaction&lt;br /&gt;
* Explanation: Despite the frequency of the charges is monthly, the amount of the subsequent payments may exceed the initial payment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TV subscription&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Payer subscribes to online streaming of a television channel. She authorizes the tv company to charge her card every month. The subscription fee is the same for every month.&lt;br /&gt;
* Scenario: Recurring payment&lt;br /&gt;
* Explanation: The amount of the subsequent payments will not exceed the initial payment and the charge is regularly monthly-based.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bookclub with &amp;quot;free first month&amp;quot; bonus&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Payer subscribes to a book renting service. he authorizes the book club to charge her card for a selection of books each month. The subscription fee is the same for every month however, the first month is free. To ensure the subscription the service requires her to register her card details.&lt;br /&gt;
* Scenario: Merchant Initiated Transaction&lt;br /&gt;
* Explanation: Despite the frequency of the charges is monthly, and the fee will stay the same, the initial payment is zero. So the amount of the next payment will exceed the initial payment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Online food delivery service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The food delivery company wants to provide a quick and easy experience for its customer. They decide that the order will be quicker if the customers don&#039;t leave the website to pay for the goods.&lt;br /&gt;
* Scenario: OneClick payment&lt;br /&gt;
* Explanation: The customer will always be there so the other two scenarios are not available.&lt;br /&gt;
&lt;br /&gt;
== How to decide ==&lt;br /&gt;
&lt;br /&gt;
To help you decide on a suitable scenario, please use the decision graph below:&lt;br /&gt;
&lt;br /&gt;
[[File:3ds-recurrencetype-decision.png|520px]]&lt;br /&gt;
&lt;br /&gt;
= Prerequisites =&lt;br /&gt;
To be able to integrate your webshop with the Barion Payment Gateway: &lt;br /&gt;
* You must [[Creating_an_account|register a Barion wallet]] at the Barion website or in the Sandbox environment. Learn more about the Sandbox environment [[Sandbox|here]].&lt;br /&gt;
* For this wallet you have to [[Creating_a_shop|create a shop]] which should be approved by Barion.&lt;br /&gt;
* For every currency you plan to conduct payments in you have to make sure there is an account created in your Barion wallet. This means that if you plan to have USD payments then there should be a USD account created in your wallet.&lt;br /&gt;
* To make sure every corner case scenario works for your webshop it is best to top up that account with a small amount (approx. 5-10EUR or your choice of currency around the same value).&lt;br /&gt;
* For the technical communication guide please read this: [[Calling_the_API|Calling the API]]&lt;br /&gt;
&lt;br /&gt;
= The payment process =&lt;br /&gt;
&lt;br /&gt;
The process is divided into two major steps:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;[[#Step 1:  Creating the funding source token|Creating the token]] that represents one of the customer&#039;s funding sources (credit card or e-money wallet)&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
         &amp;lt;li&amp;gt;Preparing the payment via the Barion API&amp;lt;/li&amp;gt;&lt;br /&gt;
         &amp;lt;li&amp;gt;Redirecting the customer to the Barion Smart Gateway to select a funding source&amp;lt;/li&amp;gt;&lt;br /&gt;
         &amp;lt;li&amp;gt;Processing the callback and requesting information about the result of the payment&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
   &amp;lt;/li&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;[[#Step 2: Using the token|Using the registered token]] to charge the customer&amp;lt;/li&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 1:  Creating the funding source token ==&lt;br /&gt;
To be able to use a token payment scenario first the merchant has to register the token with Barion. The merchant has to make sure that the customer is well aware of the fact that they are giving consent to a tokenized payment. The Barion Smart Gateway UI does not indicate in any way that the payment is a token payment.&lt;br /&gt;
&lt;br /&gt;
The token is registered to the shop and not to the merchant&#039;s Barion account. So if the merchant has multiple shops in its Barion account, the registered tokens can not be shared among them even if the customer is the same. If you want to use tokens in multiple shops, please contact Barion in the Customer center.&lt;br /&gt;
&lt;br /&gt;
=== 1.1 Preparing the payment===&lt;br /&gt;
&lt;br /&gt;
The token registration is basically a [[Responsive_web_payment|normal payment]] with three extra properties in the [[Payment-Start-v2|Payment/Start]] request:&lt;br /&gt;
* InitiateRecurrence&lt;br /&gt;
* RecurrenceId&lt;br /&gt;
* RecurrenceType&lt;br /&gt;
&lt;br /&gt;
==== InitiateRecurrence====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; is a bool property. If you set it to &#039;&#039;&#039;true&#039;&#039;&#039; then the payment gateway will consider the payment as a token registration. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This happens even if the customer is already has a registered token, so you are able to re-register a funding source or even a customer. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== RecurrenceId ====&lt;br /&gt;
The next required property for a token registration is the token itself. This is generated by the shop and has to be unique for every registration. The token should be specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; property of the [[Payment-Start-v2|Payment/Start]] request. This token must be saved in the webshops database. A &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; token represents the funding source (bank card or Barion balance) of a customer. Since a customer can have multiple cards and accounts as a funding source make sure that in the webshop&#039;s system multiple tokens can belong to a single customer.&lt;br /&gt;
&lt;br /&gt;
==== RecurrenceType ====&lt;br /&gt;
The third required property is the [[RecurrenceType|Recurrence Type]]. This specifies the scenario. In case of Recurring Payment &amp;lt;code&amp;gt;PurchaseInformation.RecurringExpiry&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PurchaseInformation.RecurringFrequency&amp;lt;/code&amp;gt; must also be set.&lt;br /&gt;
&lt;br /&gt;
==== Example JSON request for a Merchant Initiated Payment scenario ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-7&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: true,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;MerchantInitiatedPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subscription fee for the first month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-01&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The response will be the same as to a [[Responsive_web_payment#Processing_the_successful_response|basic &#039;&#039;&#039;Immediate&#039;&#039;&#039; scenario]]. The &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; property at this point is &#039;&#039;&#039;None&#039;&#039;&#039; since the token is not registered to a funding source yet.&lt;br /&gt;
&lt;br /&gt;
==== Example JSON request for a Recurring Payment scenario ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Recurring Payment&#039;&#039;&#039; scenario has some extra restrictions. The merchant has to specify two additional properties in the [[Payment-Start-v2|Payment/Start]] request:&lt;br /&gt;
* &amp;lt;code&amp;gt;RecurringExpiry&amp;lt;/code&amp;gt;: The date after subsequent charges should not be accepted.&lt;br /&gt;
* &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt;: The minimum days the merchant has to wait between payments.&lt;br /&gt;
&lt;br /&gt;
Both properties are located in the [[PurchaseInformation]] property and must be specified if this scenario is selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-7, 30-33&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: true,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;RecurringPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subscription fee for the first month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-01&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;PurchaseInformation&amp;quot;:{&lt;br /&gt;
        &amp;quot;RecurringFrequency&amp;quot;: 10,&lt;br /&gt;
        &amp;quot;RecurringExpiry&amp;quot;: &amp;quot;2022-10-01&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Possible error responses ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| RecurringPaymentNotAllowed || The token payment is not allowed for the shop identified by the &#039;&#039;&#039;POSKey&#039;&#039;&#039;. Contact Barion to request this feature.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 1.2 Redirecting the customer to the Barion Smart Gateway to select a funding source ===&lt;br /&gt;
&lt;br /&gt;
After a successful payment preparation, the customer is redirected to the secure Barion Smart Gateway to choose a funding source. The funding source the customer selects will be registered to the token. The funding source can either be a Barion e-money balance or a bank card. This means that even though the customer may own multiple cards only the one that was registered to the token can be used for future token payments. To change the funding source attached to the token a new registration should be requested.&lt;br /&gt;
&lt;br /&gt;
=== 1.3 Processing the callback and requesting information about the result of the payment ===&lt;br /&gt;
&lt;br /&gt;
When the payment is completed (either successfully or unsuccessfully) a callback message is sent to the merchant&#039;s system. Once received a [[Payment-GetPaymentState-v2|GetPaymentState]] request must be sent to the Barion API. On how to implement this please read the article about the  [[Callback_mechanism|Callback mechanism]].&lt;br /&gt;
&lt;br /&gt;
The full response of the GetPaymentState request depends on the payment scenario and the structure of the payment. When it comes to token payment there are several properties to look out for. &lt;br /&gt;
* In case the &amp;lt;code&amp;gt;Status&amp;lt;/code&amp;gt; is &#039;&#039;&#039;Succeeded&#039;&#039;&#039; the funding source token is registered and ready to use.&lt;br /&gt;
* The &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; contains the ID of the token process. This specifies the nature of the token payment. &lt;br /&gt;
&lt;br /&gt;
==== TraceId ====&lt;br /&gt;
&lt;br /&gt;
In case of Recurring payment or Merchant initiated payment scenarios the [[Payment-GetPaymentState-v2|GetPaymentState]] response returns an additional field called &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;. The value of this property is generated by the card issuer and is up to a 100 characters, and should be left intact (whitespaces and 0s can&#039;t be trimmed). The merchant has to save it and submit it in all subsequent Recurring or Merchant initiated payments of the same type, otherwise, the payments can be declined by the issuer. The &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; represents the first, customer-present payment and helps the issuer to connect subsequent payments to this initial payment.&lt;br /&gt;
&lt;br /&gt;
====Example GetPaymentState response====&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;8, 11-12&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;2a9f3260bc2feb118bc3001dd8b71cc4&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;OrderNumber&amp;quot;: null,&lt;br /&gt;
    &amp;quot;POSId&amp;quot;: &amp;quot;[[SHOPS_PUBLIC_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;POSName&amp;quot;: &amp;quot;[[MERCHANTS_BARION_SHOPNAME]]&amp;quot;,&lt;br /&gt;
    &amp;quot;POSOwnerEmail&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSource&amp;quot;: &amp;quot;BankCard&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;MerchantInitiatedPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;FGTRR55322843442124780&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingInformation&amp;quot;: {&lt;br /&gt;
        &amp;quot;BankCard&amp;quot;: {&lt;br /&gt;
            &amp;quot;MaskedPan&amp;quot;: &amp;quot;0425&amp;quot;,&lt;br /&gt;
            &amp;quot;BankCardType&amp;quot;: &amp;quot;Visa&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruYear&amp;quot;: &amp;quot;2020&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruMonth&amp;quot;: &amp;quot;12&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;AuthorizationCode&amp;quot;: &amp;quot;512244&amp;quot;,&lt;br /&gt;
        &amp;quot;ProcessResult&amp;quot;: &amp;quot;Successful&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;AllowedFundingSources&amp;quot;: [&lt;br /&gt;
        &amp;quot;All&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;GuestCheckout&amp;quot;: true,&lt;br /&gt;
    &amp;quot;CreatedAt&amp;quot;: &amp;quot;2020-11-26T07:52:48.9Z&amp;quot;,&lt;br /&gt;
    &amp;quot;ValidUntil&amp;quot;: &amp;quot;2020-11-26T08:22:48.9Z&amp;quot;,&lt;br /&gt;
    &amp;quot;CompletedAt&amp;quot;: &amp;quot;2020-11-26T08:11:54.118Z&amp;quot;,&lt;br /&gt;
    &amp;quot;ReservedUntil&amp;quot;: null,&lt;br /&gt;
    &amp;quot;DelayedCaptureUntil&amp;quot;: null,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
           ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;Total&amp;quot;: 25.20,&lt;br /&gt;
    &amp;quot;SuggestedLocale&amp;quot;: &amp;quot;hu-HU&amp;quot;,&lt;br /&gt;
    &amp;quot;FraudRiskScore&amp;quot;: null,&lt;br /&gt;
    &amp;quot;RedirectUrl&amp;quot;: &amp;quot;https://merchanturl/Redirect?paymentId=2a9f3260bc2feb118bc3001dd8b71cc4&amp;quot;,&lt;br /&gt;
    &amp;quot;CallbackUrl&amp;quot;: &amp;quot;https://merchanturl/Callback?paymentId=2a9f3260bc2feb118bc3001dd8b71cc4&amp;quot;,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Displaying the funding source in a GUI ====&lt;br /&gt;
We strongly advise saving the complete response for future reference. The &amp;lt;code&amp;gt;FundingSource&amp;lt;/code&amp;gt; field tells if the funding source is a Barion balance or a card. If it is a card, it is useful to save [[FundingInformation]] for displaying it for the user, when requesting future payments. The usual way to display funding sources is to show the last 4 digits of the card, with 4 stars, eg: *** 1234. The card used can be obtained from FundingInformation&#039;s [[BankCard]] field. The [[CardType]] field can be used to display the appropriate card logo. You can even show, if the card is expired, and offer to register another one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; FundingInformation part of the GetPaymentState response &#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=json&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
    &amp;quot;FundingInformation&amp;quot;: {&lt;br /&gt;
        &amp;quot;BankCard&amp;quot;: {&lt;br /&gt;
            &amp;quot;MaskedPan&amp;quot;: &amp;quot;0425&amp;quot;,&lt;br /&gt;
            &amp;quot;BankCardType&amp;quot;: &amp;quot;Visa&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruYear&amp;quot;: &amp;quot;2020&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruMonth&amp;quot;: &amp;quot;12&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;AuthorizationCode&amp;quot;: &amp;quot;512244&amp;quot;,&lt;br /&gt;
        &amp;quot;ProcessResult&amp;quot;: &amp;quot;Successful&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be displayed for example as &amp;lt;code&amp;gt;VISA **** 0425 (12/20)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a request-response diagram of the token registration process:&lt;br /&gt;
 &lt;br /&gt;
[[File:Token_payment_initiation.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Step 2: Using the token =&lt;br /&gt;
&lt;br /&gt;
To use an already registered token for a payment, you have to use the same [[Payment-Start-v2|/Payment/Start]] API endpoint but the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; should be set to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;. This tells the Barion API to use the token for payment instead of only registering it. The token should be specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; property. To be able to use a token, the initial payment must be in a successful state.&lt;br /&gt;
&lt;br /&gt;
At this point, the merchant has to decide whether this subsequent payment is used for the same token payment scenario or something changed. This is important because the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; can only be used for the same scenario, otherwise, the card issuer will decline the charge.&lt;br /&gt;
A &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; can only be used again if:&lt;br /&gt;
* the funding source is the same (technically the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; is the same)&lt;br /&gt;
* the token payment scenario is the same (technically the &amp;lt;code&amp;gt;RecurrenceType&amp;lt;/code&amp;gt; is the same)&lt;br /&gt;
* this subsequent request complies with the scenario restrictions (eg: in case of recurring payment the amount of the subsequent payment does not exceed the initial amount)&lt;br /&gt;
&lt;br /&gt;
If the funding source changes, new &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; must be requested. The process to do that is [[#Changing the funding source|described in detail here]]. If the funding source stays the same but the scenario changes or the restrictions are no longer met new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; must be requested. The process to do that is [[#Changing the token payment scenario with an existing token|described here]].&lt;br /&gt;
&lt;br /&gt;
== Subsequent payments in case of Recurring payment scenario ==&lt;br /&gt;
&lt;br /&gt;
In this case, three extra conditions must be met:&lt;br /&gt;
* the amount of the subsequent payment must not be higher than the initial amount&lt;br /&gt;
* at least that much days must be spent as defined in the initial &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt; property&lt;br /&gt;
* the date of the payment must not exceed the day specified in the initial &amp;lt;code&amp;gt;RecurringExpiry&amp;lt;/code&amp;gt; property&lt;br /&gt;
&lt;br /&gt;
Please be aware that in case any of these are no longer valid the merchant has to request a new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; as [[#Changing the token payment scenario with an existing token|described here]]. &lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=These conditions are not enforced by the Barion system so the violation of them will result in a declined charge.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
Payment/start must not include the &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RecurringExpiry&amp;lt;/code&amp;gt; properties (since they are already fixed during the initial payment).&lt;br /&gt;
&lt;br /&gt;
==== Example payment/start of a subsequent Recurring payment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-8&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: false,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;RecurringPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;FGTRR55322843442124780&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subscription fee for the second month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-02&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example response to this request ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;4,8,11&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;fb582913dc2feb11a49f309c23734b1c&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;RecurrenceResult&amp;quot;: &amp;quot;Successful&amp;quot;,&lt;br /&gt;
    &amp;quot;ThreeDSAuthClientData&amp;quot;: null,&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;FGTRR55322843442124780&amp;quot;,&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The structure of the response is the same as the normal &amp;lt;tt&amp;gt;/Payment/Start&amp;lt;/tt&amp;gt; response just the statuses will be different. In this case&lt;br /&gt;
* the payment level &amp;lt;code&amp;gt;Status&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Succeeded&#039;&#039;&#039; instead of &#039;&#039;&#039;Prepared&#039;&#039;&#039;&lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Successful&#039;&#039;&#039; (or &#039;&#039;&#039;Failed&#039;&#039;&#039;) instead of &#039;&#039;&#039;None&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The value of the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; will be the same as in the request.&lt;br /&gt;
&lt;br /&gt;
== Subsequent payments in case of Merchant Initiated Payment scenario ==&lt;br /&gt;
&lt;br /&gt;
In this scenario there are no restrictions.&lt;br /&gt;
&lt;br /&gt;
==== Example payment/start of a subsequent Merchant Initiated Payment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-8&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: false,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;MerchantInitiatedPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;KBYRR55322844552124780&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 75,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Usage fee for 2020/12&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Phone bill&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Usage fee for 2020/12&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 75,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 75,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-02&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example response to this request ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;4,8,11&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;fb582913dc2feb11a49f309c23734b1c&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;RecurrenceResult&amp;quot;: &amp;quot;Successful&amp;quot;,&lt;br /&gt;
    &amp;quot;ThreeDSAuthClientData&amp;quot;: null,&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;KBYRR55322844552124780&amp;quot;,&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The structure of the response is the same as the normal &amp;lt;tt&amp;gt;/Payment/Start&amp;lt;/tt&amp;gt; response just the statuses will be different. In this case&lt;br /&gt;
* the payment level &amp;lt;code&amp;gt;Status&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Succeeded&#039;&#039;&#039; instead of &#039;&#039;&#039;Prepared&#039;&#039;&#039;&lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Successful&#039;&#039;&#039; (or &#039;&#039;&#039;Failed&#039;&#039;&#039;) instead of &#039;&#039;&#039;None&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The value of the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; will be the same as in the request.&lt;br /&gt;
&lt;br /&gt;
== Subsequent payments in case of OneClick Payment scenario ==&lt;br /&gt;
&lt;br /&gt;
In this scenario, the merchant has to prepare to perform the [[#Off-site 3DS v2 authentication|off-site 3DS v2 authentication]] of the payer. 3DS authentication is not required in the following cases:&lt;br /&gt;
* the token (&amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt;) was requested before 3DS came into effect,&lt;br /&gt;
* the original payment was not initialized by bank card,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; is not used in this scenario since the payer is present during the transaction. &lt;br /&gt;
&lt;br /&gt;
==== Example payment/start of a subsequent OneClick Payment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-7&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: false,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;OneClickPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 17,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Book: How to shop online&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;How to shop online&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Book about shopping online&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;piece&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 17,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 17,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-02&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example response to this request ====&lt;br /&gt;
&lt;br /&gt;
In this scenario, the response contains the &amp;lt;code&amp;gt;ThreeDSAuthClientData&amp;lt;/code&amp;gt; property that is used to perform an [[#Off-site 3DS v2 authentication|off-site 3DS v2 authentication]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;4,8-9&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;fb582913dc2feb11a49f309c23734b1c&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;RecurrenceResult&amp;quot;: &amp;quot;Successful&amp;quot;,&lt;br /&gt;
    &amp;quot;ThreeDSAuthClientData&amp;quot;: &amp;quot;ewoJIkNhcmRQdWJs...WZXJzaW9uIjogIjIuMS4wIgp9Cg==&amp;quot;,&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Possible error responses for the subsequent payment requests ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| InvalidRecurrenceId|| The token specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; is invalid. Check if the token registration was successful.&lt;br /&gt;
|-&lt;br /&gt;
| RecurringPaymentDenied|| Something happened to the user since the token registration, either deleted, suspended, or blocked. The payment s not allowed in these cases.&lt;br /&gt;
|-&lt;br /&gt;
| InsufficientFunds|| If the original payment was with an e-money wallet and the customer doesn&#039;t have enough money to fulfill this charge this error happens.&lt;br /&gt;
|-&lt;br /&gt;
| OriginalPaymentWasntSuccessful || This means that the token belongs to an originally unsuccessful payment so this token can not be used anymore. This could only happen if the original payment was financed with a credit card.&lt;br /&gt;
|-&lt;br /&gt;
|InvalidCurrency || If the original payment was paid with e-money and the current token payment is in a currency that the wallet does not have an account in this error happens.&lt;br /&gt;
|-&lt;br /&gt;
|CardExpired || The card that was used to fulfill the initial payment is no longer valid. The &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; has to be re-initialized.&lt;br /&gt;
|-&lt;br /&gt;
|TopUpFailed || The attempt to charge the card that was use to fulfill the initial payment was unsuccessful. Often accompanied by other more specific errors.&lt;br /&gt;
|-&lt;br /&gt;
|ThreeDsNotEnabled || The card issuer rejected the card due to lack of Strong Customer Authentication. Check whether the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; is specified correctly (in case the scenario requires it).&lt;br /&gt;
|-&lt;br /&gt;
|InvalidUser || The payee defined in the transaction is not a valid Barion wallet. Either does not exist or not fully activated.&lt;br /&gt;
|-&lt;br /&gt;
|UserCantMakeOutgoingTransaction || The payee specified in the transaction is not allowed to make payeetransactions since the wallet is suspended or does not exist.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is the request-response diagram of the subsequent payments:&lt;br /&gt;
&lt;br /&gt;
[[File:Token_payment_2.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; when requesting Transaction Risk Analysis (TRA) during a subsequent payment, and all conditions have been met, challenge is not shown to the user.&lt;br /&gt;
&lt;br /&gt;
== RecurrenceResult: ThreeDSAuthenticationRequired ==&lt;br /&gt;
&lt;br /&gt;
In response to a subsequent payment, this RecurrenceResult can be received. This means that the payment can not be processed due to the lack of 3DS v2 information. &lt;br /&gt;
&lt;br /&gt;
This can happen if the initial payment was successfully authenticated via 3DS v2 but the subsequent payment does not refer to the original authentication with the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To fix this, request and store the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; of the initial payment and then specify it in the subsequent [[Payment-Start-v2]].&lt;br /&gt;
&lt;br /&gt;
To learn the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; of a previous payment just simply request the payment information via the [[Payment-GetPaymentState-v2]] endpoint.&lt;br /&gt;
&lt;br /&gt;
= Changing funding source or token scenarios =&lt;br /&gt;
&lt;br /&gt;
==Changing the funding source==&lt;br /&gt;
&lt;br /&gt;
This could happen if the funding source becomes invalid for some reason (card gets deleted or expires) or the merchant decides to use that token for another payer. In this case, the merchant has to register the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; again. &lt;br /&gt;
To do this a new payment must be started and in the [[Payment-Start-v2|Payment/Start]] request the following setup should be specified:&lt;br /&gt;
* the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; field has to be set to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; &lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; has to be specified.&lt;br /&gt;
* and the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; should not be specified.&lt;br /&gt;
&lt;br /&gt;
[[File:Funding-source-change.png|1500px]]&lt;br /&gt;
&lt;br /&gt;
Since the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; is bound to the payer and the process if the funding source changes new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; will be generated. This new ID must be saved to this payment and must be used from this moment on for subsequent payments.&lt;br /&gt;
&lt;br /&gt;
==Changing the token payment scenario with an existing token==&lt;br /&gt;
&lt;br /&gt;
This could occur when the merchant wants to get authorization from the payer to a new token scenario for the already registered funding source. To be able to do this the merchant has to have a valid and registered &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt;.&lt;br /&gt;
Let&#039;s see some examples when this may be necessary:&lt;br /&gt;
* The payer subscribed to the merchant&#039;s service beforehand and the merchant decided to use the recurring payment token scenario. The payer wants to subscribe to another service and this requires a different payment schedule. This means that the &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt; that was specified initially can not be maintained so it is required to acquire a new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;&lt;br /&gt;
* The payer bought something on the merchant&#039;s website and uses the one-click feature for subsequent fast non-redirect payments. After a while, the payer decides to subscribe to a service provided by this same merchant. This means that the merchant has to create a new token scenario (not a one-click payment but a recurring payment). For this, the merchant has to acquire a new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;. This can be done without redirecting the payer to Barion using the existing &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; and performing a 3DS authentication on the merchant&#039;s website.&lt;br /&gt;
&lt;br /&gt;
To do these a new payment must be started and in the [[Payment-Start-v2|Payment/Start]] request the following setup should be specified:&lt;br /&gt;
* the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; field has to be set to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; &lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; has to be specified.&lt;br /&gt;
* and the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; should not be specified.&lt;br /&gt;
&lt;br /&gt;
After this, a 3DS authentication has to be completed to acquire a new trace ID. This can be done on the merchant&#039;s site if the merchant implements the barion.offsitegw.js for off-site 3DS authentication.&lt;br /&gt;
&lt;br /&gt;
This means that it can be achieved to acquire different Trace IDs for different scenarios with only one &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is basically categorizing the different token scenarios as opposed to using every subsequent payment as an unmarked charge.&lt;br /&gt;
&lt;br /&gt;
[[File:Mutiple-traceid.png|1500px]]&lt;br /&gt;
&lt;br /&gt;
= Off-site 3DS v2 authentication =&lt;br /&gt;
&lt;br /&gt;
In certain scenarios, the payer has to be authenticated to lower the risk of the card transaction. This can be either performed &lt;br /&gt;
* on the Barion Smart Gateway (on-site) by redirecting the customer to Barion &lt;br /&gt;
* or on the merchant&#039;s website (off-site) by integrating the Barion Off-site client library.&lt;br /&gt;
&lt;br /&gt;
This section describes how to integrate the Barion off-site authentication library into the merchant&#039;s site.&lt;br /&gt;
&lt;br /&gt;
== Step 1 : Initialize the off-site authentication library  ==&lt;br /&gt;
You have to include the following css and javascript files in the code of your site. &lt;br /&gt;
&amp;lt;source lang=html&amp;gt;&lt;br /&gt;
&amp;lt;link href=&amp;quot;https://secure.barion.com/static/barion.offsitegw.min.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;https://secure.barion.com/static/barion.offsitegw.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
These files include all the necessary javascript code and styling to handle the 3DS authentication and display the challenge if necessary.&lt;br /&gt;
&lt;br /&gt;
Then you have to initialize the Barion javascript client. To do that, you have to define a configuration object that specifies your functions that handle the off-site authentication events. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Authentication events&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;onAuthenticationSucceeded&amp;lt;/code&amp;gt;: the 3DS v2 authentication successfully completed&lt;br /&gt;
* &amp;lt;code&amp;gt;onAuthenticationFailed&amp;lt;/code&amp;gt;:  the 3DS v2 authentication failed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
const configuration = {&lt;br /&gt;
    onAuthenticationSucceeded: function () {&lt;br /&gt;
        // handle successful authentication by calling the Barion API via merchant&#039;s backend&lt;br /&gt;
        // Call the v2/payment/complete endpoint&lt;br /&gt;
    },&lt;br /&gt;
    onAuthenticationFailed: function () {&lt;br /&gt;
        // Handle unsuccessful authentication result, no charge was made.&lt;br /&gt;
        // The payment might be still valid only the authentication failed&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you have to pass this config object to the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
const gw = new Barion.OffsiteGw(configuration);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the DOM is loaded you have to initialize the library:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
document.addEventListener(&amp;quot;DOMContentLoaded&amp;quot;, function () {&lt;br /&gt;
    // Initiate the Barion Offiste GW library&lt;br /&gt;
    gw.init();&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 2: Start the authentication process ==&lt;br /&gt;
Once the &amp;lt;code&amp;gt;ThreeDSAuthClientData&amp;lt;/code&amp;gt; is acquired from the payment/start you can start the authentication process by calling the &amp;lt;code&amp;gt;authenticate()&amp;lt;/code&amp;gt; method of the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
gw.authenticate(threeDsClientData);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will start the authentication process and present the challenge if needed. Visually this will create a modal window over the merchant&#039;s site and show the payer every necessary information.&lt;br /&gt;
Once the authentication process finished (either with or without a challenge) the appropriate event will be fired.&lt;br /&gt;
&lt;br /&gt;
== Step 3: Completing the payment ==&lt;br /&gt;
&lt;br /&gt;
In case of successful authentication, you have to call our [[Payment-Complete-v3|/Payment/Complete]] endpoint, where the actual charge will happen.&lt;br /&gt;
&lt;br /&gt;
=== Possible error responses for the subsequent payment requests ===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
== Suggested implementation flow for off-site authentication ==&lt;br /&gt;
&lt;br /&gt;
Ideally, an off-site authentication should be part of a client-side experience without any postbacks or page reloads. This is our recommendation to achieve this:&lt;br /&gt;
&lt;br /&gt;
# After the customer clicks on the &amp;quot;Pay&amp;quot; button make an AJAX call from your client-side code to your back-end. &lt;br /&gt;
# Have your backend make a request to our payment/start endpoint (with the appropriate settings for the desired token scenario)&lt;br /&gt;
# Have your backend process the response and pass the value of the &amp;lt;code&amp;gt;ThreeDSAuthClientData&amp;lt;/code&amp;gt; property to your client-side code.&lt;br /&gt;
# Use the Barion off-site library to perform the authentication&lt;br /&gt;
# Once the authentication succeeds send another AJAX request from your client-side code to your back-end.&lt;br /&gt;
# Have your back-end code call our [[Payment-Complete-v3|/Payment/Complete]]&lt;br /&gt;
# Have your backend process the response and pass the result to your client-side code.&lt;br /&gt;
# Display the result for the customer&lt;br /&gt;
&lt;br /&gt;
= Testing the integration =&lt;br /&gt;
&lt;br /&gt;
3D Secure has no environment for end-to-end testing, therefore merchants have to split their testings into two parts: Testing the payment flow with and without challenge. Getting a challenge is only possible with real-life cards, merchants have to use their own (there will be no real charging at the end on the Sandbox of the Payment Gateway, but using a real card will result initiating a real 3DS authentication).&lt;br /&gt;
&lt;br /&gt;
== Testing the whole payment flow, without challenge ==&lt;br /&gt;
&lt;br /&gt;
Use the [[https://docs.barion.com/Sandbox#Test_cards Barion test cards]], they will always get a &amp;quot;frictionless&amp;quot; flow, where the 3DS process is presented on the UI, but you will never see a challenge screen. &lt;br /&gt;
&lt;br /&gt;
This is good for testing your integration itself because it will lead to a successful charge, and you will get a TraceId as well.&lt;br /&gt;
&lt;br /&gt;
== Testing the challenge itself ==&lt;br /&gt;
&lt;br /&gt;
Use your own card, and let the card issuer decide whether your payment will get a challenge or not during the 3DS authentication procedure. Your payment will fail at the end, and you won&#039;t get the TraceId. &lt;br /&gt;
&lt;br /&gt;
This is good to test, how the challenge screens look like in your shop - especially when you integrated OneClick payment directly to your shop. You might also check how your customers see your checkout flow on popular devices.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Payment-Start-v2&amp;diff=3029</id>
		<title>Payment-Start-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Payment-Start-v2&amp;diff=3029"/>
		<updated>2021-07-12T14:57:51Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Output properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Initialize a new payment}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Payment/Start&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/payment/start&amp;lt;/code&amp;gt; API endpoint is used to create a new payment in the Barion system.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Creating_a_shop|Creating a shop in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Use cases ==&lt;br /&gt;
&lt;br /&gt;
This API endpoint is designed to be used in the following scenarios:&lt;br /&gt;
* [[Responsive_web_payment|Responsive Web Payment]]&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|{{3dsfield}} || 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.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; if the merchant does not provide 3DS-related properties, it doesn&#039;t mean that the payment will fail. It means that the payer will have a higher chance of getting a challenge during payment.&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| POSKey || Guid || &lt;br /&gt;
* Required&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PaymentType || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;Immediate&amp;quot;&lt;br /&gt;
** &amp;quot;Reservation&amp;quot;&lt;br /&gt;
** &amp;quot;DelayedCapture&amp;quot; &lt;br /&gt;
|| 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. &lt;br /&gt;
Click here to learn more about reservation payments: [[Reservation_payment|Reservation payments]], and delayed capture: [[Delayed_Capture|Delayed capture]].&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ReservationPeriod || TimeSpan (d.hh:mm:ss) || &lt;br /&gt;
* Required only if PaymentType is &amp;quot;Reservation&amp;quot;&lt;br /&gt;
* Minimum value: one minute&lt;br /&gt;
* Maximum value: one year&lt;br /&gt;
* Default value: 30 minutes&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| DelayedCapturePeriod || TimeSpan (d.hh:mm:ss) || &lt;br /&gt;
* Required only if PaymentType is &amp;quot;DelayedCapture&amp;quot;&lt;br /&gt;
* Minimum value: one minute&lt;br /&gt;
* Maximum value: 7 days (21 days in case of a Hungarian shop)&lt;br /&gt;
* Default value: seven days&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PaymentWindow || TimeSpan (d.hh:mm:ss) || &lt;br /&gt;
* Optional&lt;br /&gt;
* Minimum value: one minute&lt;br /&gt;
* Maximum value: one week&lt;br /&gt;
* Default value: 30 minutes&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| GuestCheckOut || bool || &lt;br /&gt;
* Required&lt;br /&gt;
* Value must be &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot;, integer evaluation is not supported&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| InitiateRecurrence || bool || &lt;br /&gt;
* Optional&lt;br /&gt;
|| 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. &lt;br /&gt;
Click here to learn more about token payments: [[Token_payment]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecurrenceId || string || &lt;br /&gt;
* Required when executing token payments&lt;br /&gt;
* Maximum length: 100 characters&lt;br /&gt;
* Must be unique per shop and per user&lt;br /&gt;
* [https://docs.barion.com/Token_payment#Creating_the_token Generated by the shop]&lt;br /&gt;
|| A string used to identify a given token payment. Its purpose is determined by the value of the &#039;&#039;&#039;InitiateRecurrence&#039;&#039;&#039; property.&lt;br /&gt;
* If &#039;&#039;&#039;InitiateRecurrence&#039;&#039;&#039; is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, this property must contain a &amp;lt;u&amp;gt;new&amp;lt;/u&amp;gt; desired identifier for a new token payment. This should be generated and stored by the shop before calling the API. Also, the shop must ensure that this is unique per user in its own system.&lt;br /&gt;
* If &#039;&#039;&#039;InitiateRecurrence&#039;&#039;&#039; is &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, this property must contain an &amp;lt;u&amp;gt;existing&amp;lt;/u&amp;gt; identifier for a token payment. This should be used to charge a payer&#039;s funding source (either bank card or Barion wallet) that was already used successfully for a payment in the shop.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| FundingSources || string[] || &lt;br /&gt;
* Required&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;All&amp;quot;&lt;br /&gt;
** &amp;quot;Balance&amp;quot;&lt;br /&gt;
|| An array of strings containing the allowed funding sources that can be used to complete the payment. &amp;quot;Balance&amp;quot; means that the payer can only use their Barion wallet balance, while &amp;quot;All&amp;quot; means the payment can be completed with either a Barion wallet or a bank card.&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; There is no option to disallow payment by balance since that would deny Barion Wallet users with a balance the ability to pay. There is an option to exclude cards, but not balance.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; this must be supplied as an array because more funding source types are planned in the future.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PaymentRequestId || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Maximum length: 100 characters&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| PayerHint || string || &lt;br /&gt;
* Required for {{3dsfield}}&lt;br /&gt;
* Optional, but recommended&lt;br /&gt;
* Maximum length: 256 characters&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| CardHolderNameHint || string || &lt;br /&gt;
* Required for {{3dsfield}}&lt;br /&gt;
* Optional, but recommended&lt;br /&gt;
* Between 2 and 45 characters&lt;br /&gt;
|| The shop can provide a hint for the customer&#039;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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecurrenceType || [[RecurrenceType]] || &lt;br /&gt;
* Required for {{3dsfield}}, when executing token payments&lt;br /&gt;
|| Describes the nature of the token payment.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TraceId || string || &lt;br /&gt;
* Required for {{3dsfield}}, when executing token payments&lt;br /&gt;
* Maximum length: 100 characters&lt;br /&gt;
|| Identifies the nature of the token payment. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RedirectUrl || string || &lt;br /&gt;
* Required &lt;br /&gt;
* Maximum length: 2000 characters&lt;br /&gt;
|| 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 &amp;lt;code&amp;gt;paymentId&amp;lt;/code&amp;gt; parameter. If not provided, the system will use the redirect URL assigned to the shop that started the payment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| CallbackUrl || string || &lt;br /&gt;
* Required &lt;br /&gt;
* Maximum length: 2000 characters&lt;br /&gt;
|| 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 &amp;lt;code&amp;gt;paymentId&amp;lt;/code&amp;gt; parameter. Click here to learn more about the callback mechanism: [[Callback_mechanism|Payment callback mechanism (IPN)]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Transactions || [[PaymentTransaction]][] || &lt;br /&gt;
* Required&lt;br /&gt;
|| 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.&lt;br /&gt;
Defining multiple transactions allow the payment initiator to distribute the payment amount between multiple shops. See the following page to learn more: [[Facilitated payments]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| OrderNumber || string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 100 characters&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ShippingAddress || [[ShippingAddress]] || &lt;br /&gt;
* Required for {{3dsfield}}&lt;br /&gt;
|| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Locale || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Maximum length: 10 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;cs-CZ&amp;quot; (Czech)&lt;br /&gt;
** &amp;quot;de-DE&amp;quot; (German)&lt;br /&gt;
** &amp;quot;en-US&amp;quot; (English)&lt;br /&gt;
** &amp;quot;es-ES&amp;quot; (Spanish)&lt;br /&gt;
** &amp;quot;fr-FR&amp;quot; (French)&lt;br /&gt;
** &amp;quot;hu-HU&amp;quot; (Hungarian)&lt;br /&gt;
** &amp;quot;sk-SK&amp;quot; (Slovak)&lt;br /&gt;
** &amp;quot;sl-SI&amp;quot; (Slovenian)&lt;br /&gt;
|| This indicates in which language the Barion Smart Gateway should display for the payer upon redirect. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
Accepted values: &lt;br /&gt;
{{CurrencyList}}&lt;br /&gt;
|| 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.&lt;br /&gt;
|-&lt;br /&gt;
| PayerPhoneNumber || string || &lt;br /&gt;
* Required for {{3dsfield}}&lt;br /&gt;
* Max length: 30 characters&lt;br /&gt;
* Expected format: 36701231234 (where 36 is the country code)&lt;br /&gt;
* Required for using payment buttons&lt;br /&gt;
|| The &#039;&#039;&#039;mobile&#039;&#039;&#039; phone number of the payer. Must be set to enable [[Payment_Buttons|payment buttons]]. The number must be sent in the expected format, without + sign or leading zero(s).&lt;br /&gt;
|-&lt;br /&gt;
| PayerWorkPhoneNumber || string || &lt;br /&gt;
* Required for {{3dsfield}}&lt;br /&gt;
* Max length: 30 characters&lt;br /&gt;
* Expected format: 36701231234 (where 36 is the country code)&lt;br /&gt;
|| The work phone of the payer. The number must be sent in the expected format, without + sign or leading zero(s).&lt;br /&gt;
|-&lt;br /&gt;
| PayerHomeNumber || string || &lt;br /&gt;
* Required for {{3dsfield}}&lt;br /&gt;
* Max length: 30 characters&lt;br /&gt;
* Expected format: 36701231234 (where 36 is the country code)&lt;br /&gt;
|| The home phone number of the payer. The number must be sent in the expected format, without + sign or leading zero(s).&lt;br /&gt;
|-&lt;br /&gt;
| BillingAddress || [[BillingAddress]] || &lt;br /&gt;
* Required for {{3dsfield}}&lt;br /&gt;
|| The billing address associated with the payment, if applicable.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PayerAccount || [[PayerAccountInformation]] || &lt;br /&gt;
* Required for {{3dsfield}}&lt;br /&gt;
|| Information about the account of the payer in the merchant&#039;s system.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PurchaseInformation|| [[PurchaseInformation]] || &lt;br /&gt;
* Required for {{3dsfield}}&lt;br /&gt;
|| Information about current purchase.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ChallengePreference || [[ChallengePreference]] || &lt;br /&gt;
* Required for {{3dsfield}}&lt;br /&gt;
|| The merchant&#039;s preference of the 3DS challenge. Here you can specify what 3DS authentication should be utilized.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| PaymentId || Guid || The identifier of the newly initialized payment, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| PaymentRequestId || string || The payment identifier supplied by the API caller in the request.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Status || [[PaymentStatus]]|| The status of the payment in the Barion system. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| RecurrenceResult || RecurrenceResult || Indicates the result of an authorized payment scenario. The result depends on the values of the &#039;&#039;&#039;InitiateRecurrence&#039;&#039;&#039; and &#039;&#039;&#039;RecurrenceId&#039;&#039;&#039; properties supplied in the request.&lt;br /&gt;
&lt;br /&gt;
* If &#039;&#039;&#039;InitiateRecurrence&#039;&#039;&#039; was &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, and a new authorized payment was successfully created, this will be &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt; (because no actual token charge took place yet)&lt;br /&gt;
&lt;br /&gt;
* If &#039;&#039;&#039;InitiateRecurrence&#039;&#039;&#039; was &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, but a previously authorized payment identifier was supplied in &#039;&#039;&#039;RecurrenceId&#039;&#039;&#039;, the system will try to charge the funding source associated with the authorized payment. If this charge is successful, the result is &amp;lt;code&amp;gt;Successful&amp;lt;/code&amp;gt;. If the system could not charge the funding source, the result is &amp;lt;code&amp;gt;Failed&amp;lt;/code&amp;gt;. If the given identifier is invalid or does not exist, the result is &amp;lt;code&amp;gt;NotFound&amp;lt;/code&amp;gt;. In case the payment can not be processed due to lack of 3DS v2 information &amp;lt;code&amp;gt;ThreeDSAuthenticationRequired&amp;lt;/code&amp;gt; is returned. In this case, either offsite 3DS v2 authentication should be performed or the TraceId of the initial payment should be sent as well.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| GatewayUrl || string || The URL of the Barion Smart Gateway (including the payment identifier), where the API caller should redirect the payer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ThreeDsClientAuthData || 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.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TraceId || string || A unique value generated by the card issuer to track a chain of [[Token_payment_3D_Secure|recurring or token payments that require 3D Secure authentication]]. This shall be used in such scenarios, otherwise it can be ignored.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Token_payment_3D_Secure&amp;diff=3020</id>
		<title>Token payment 3D Secure</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Token_payment_3D_Secure&amp;diff=3020"/>
		<updated>2021-06-30T07:43:11Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* 3DS authentication of the payer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Token Payment with 3D Secure}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This payment scenario allows the integrator shop to register a token for a customer (and a funding source) in the Barion system and then, later on, using this token, charge the customer without redirecting her to the Barion Smart Gateway UI. The user may be present at the site of the merchant or she can be off-session as well, so the merchant can charge her e.g. for subscriptions. This means that the customer authorizes the shop to charge her card or Barion balance without typing in the card information or Barion login again.&lt;br /&gt;
&lt;br /&gt;
[[File:3ds-recurring.png|1500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=Premium feature|text=This scenario is not allowed automatically for every approved shop and should be requested from Barion!|color=#1993c7}}&lt;br /&gt;
&lt;br /&gt;
= Token payment scenarios =&lt;br /&gt;
Token payment can be used in three use cases: &lt;br /&gt;
* &#039;&#039;&#039;Customer Initiated Payments&#039;&#039;&#039;: when the user is present on the website of the merchant and she decides to pay :&lt;br /&gt;
** &#039;&#039;&#039;OneClick payment&#039;&#039;&#039;: the user is charged upon her request initiated on the website of the merchant. Subsequent payments are subject to PSD2 SCA and as the user is present, she has to go through the authentication process.&lt;br /&gt;
* &#039;&#039;&#039;Merchant Initiated Payments&#039;&#039;&#039;: when the merchant initiates the payment without the user being present. It has two subtypes:&lt;br /&gt;
** &#039;&#039;&#039;Recurring payment&#039;&#039;&#039;: the user is charged with the same amount on a regular basis, typically in case of subscriptions. Subsequent payments are exempted from PSD2 SCA, but liability still shifts to the card issuer.&lt;br /&gt;
** &#039;&#039;&#039;MIT (merchant initiated transaction)&#039;&#039;&#039;: the user is charged on an irregular basis and/or with a different amount. Subsequent payments of this type are excluded from PSD2 SCA, the liability is on the merchant.&lt;br /&gt;
&lt;br /&gt;
== Customer participation ==&lt;br /&gt;
&lt;br /&gt;
Since the token scenario is suitable for both customer and merchant initiated payments here is a comparison about who starts the payment. This includes the regular, non-tokenized payment scenario as well:&lt;br /&gt;
&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | Scenario&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Initial payment&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Subsequent payments&lt;br /&gt;
|-&lt;br /&gt;
! Customer present&lt;br /&gt;
! Customer at Barion Smart GW &lt;br /&gt;
! Customer present&lt;br /&gt;
! Customer at Barion Smart GW&lt;br /&gt;
|-&lt;br /&gt;
| Non token (regular) payment || YES || YES || YES || YES &lt;br /&gt;
|-&lt;br /&gt;
| OneClick payment || YES || YES/NO&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; || YES || style=&amp;quot;background:#FFE2C4&amp;quot; | NO &lt;br /&gt;
|-&lt;br /&gt;
| Recurring payment || YES || YES/NO&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; || style=&amp;quot;background:#FFE2C4&amp;quot; | NO || style=&amp;quot;background:#FFE2C4&amp;quot; | NO &lt;br /&gt;
|-&lt;br /&gt;
| MIT || YES || YES/NO&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; || style=&amp;quot;background:#FFE2C4&amp;quot; | NO || style=&amp;quot;background:#FFE2C4&amp;quot; | NO &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #aaa; background-color:#eee; font-size: 0.8em; padding:5px 10px; display:inline-block;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; Token payment scenarios can be initiated with already registered &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; as well, in this case the customer may remain on the merchant&#039;s site. &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements for the scenarios ==&lt;br /&gt;
&lt;br /&gt;
These token payment scenarios have different requirements, this table below summarizes the key differences.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
! Payment amount&lt;br /&gt;
! Payment frequency&lt;br /&gt;
! Liability in case of fraud&lt;br /&gt;
|-&lt;br /&gt;
| OneClick payment || Various || Various || Card issuer&lt;br /&gt;
|-&lt;br /&gt;
| Recurring payment || Subsequent amounts must be equal or less than the initial amount  || Initial payment must define a minimum amount of days to wait between charges || Card issuer &lt;br /&gt;
|-&lt;br /&gt;
| Merchant initiated payment || Various  || Various || Merchant&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== 3DS authentication of the payer ==&lt;br /&gt;
&lt;br /&gt;
The new more secure 3DS v2 authentication must be performed for every online card payment. These token payment scenarios also have to use this new secure way of authentication. &lt;br /&gt;
The initial payment of a token scenario must be authenticated every time although the subsequent payments may be exempted in certain cases. &lt;br /&gt;
&lt;br /&gt;
Here is a table to compare the 3DS authentication requirements:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
! Initial payment&lt;br /&gt;
! Subsequent payments&lt;br /&gt;
|-&lt;br /&gt;
| One-click payment || ✔️ || ✔️&lt;br /&gt;
|-&lt;br /&gt;
| Recurring payment || ✔️ || &lt;br /&gt;
|-&lt;br /&gt;
| Merchant initiated payment || ✔️ || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;IMPORTANT:&#039;&#039; when performing subsequent One-click payments with the &amp;lt;code&amp;gt;ChallengePreference&amp;lt;/code&amp;gt; parameter set to &amp;lt;code&amp;gt;NoChallengeNeeded&amp;lt;/code&amp;gt; (indicating a request for Transaction Risk Analysis), only a fraud analysis will be performed, and the customer is not required to undergo a 3DS challenge.&lt;br /&gt;
&lt;br /&gt;
== Real life examples ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Phone bill&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Payer has a usage-based phone subscription that wants to pay without being present for every charge. She authorizes the phone company to charge her card every month.&lt;br /&gt;
* Scenario: Merchant Initiated Transaction&lt;br /&gt;
* Explanation: Despite the frequency of the charges is monthly, the amount of the subsequent payments may exceed the initial payment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TV subscription&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Payer subscribes to online streaming of a television channel. She authorizes the tv company to charge her card every month. The subscription fee is the same for every month.&lt;br /&gt;
* Scenario: Recurring payment&lt;br /&gt;
* Explanation: The amount of the subsequent payments will not exceed the initial payment and the charge is regularly monthly-based.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bookclub with &amp;quot;free first month&amp;quot; bonus&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Payer subscribes to a book renting service. he authorizes the book club to charge her card for a selection of books each month. The subscription fee is the same for every month however, the first month is free. To ensure the subscription the service requires her to register her card details.&lt;br /&gt;
* Scenario: Merchant Initiated Transaction&lt;br /&gt;
* Explanation: Despite the frequency of the charges is monthly, and the fee will stay the same, the initial payment is zero. So the amount of the next payment will exceed the initial payment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Online food delivery service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The food delivery company wants to provide a quick and easy experience for its customer. They decide that the order will be quicker if the customers don&#039;t leave the website to pay for the goods.&lt;br /&gt;
* Scenario: OneClick payment&lt;br /&gt;
* Explanation: The customer will always be there so the other two scenarios are not available.&lt;br /&gt;
&lt;br /&gt;
== How to decide ==&lt;br /&gt;
&lt;br /&gt;
To help you decide on a suitable scenario, please use the decision graph below:&lt;br /&gt;
&lt;br /&gt;
[[File:3ds-recurrencetype-decision.png|520px]]&lt;br /&gt;
&lt;br /&gt;
= Prerequisites =&lt;br /&gt;
To be able to integrate your webshop with the Barion Payment Gateway: &lt;br /&gt;
* You must [[Creating_an_account|register a Barion wallet]] at the Barion website or in the Sandbox environment. Learn more about the Sandbox environment [[Sandbox|here]].&lt;br /&gt;
* For this wallet you have to [[Creating_a_shop|create a shop]] which should be approved by Barion.&lt;br /&gt;
* For every currency you plan to conduct payments in you have to make sure there is an account created in your Barion wallet. This means that if you plan to have USD payments then there should be a USD account created in your wallet.&lt;br /&gt;
* To make sure every corner case scenario works for your webshop it is best to top up that account with a small amount (approx. 5-10EUR or your choice of currency around the same value).&lt;br /&gt;
* For the technical communication guide please read this: [[Calling_the_API|Calling the API]]&lt;br /&gt;
&lt;br /&gt;
= The payment process =&lt;br /&gt;
&lt;br /&gt;
The process is divided into two major steps:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;[[#Step 1:  Creating the funding source token|Creating the token]] that represents one of the customer&#039;s funding sources (credit card or e-money wallet)&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
         &amp;lt;li&amp;gt;Preparing the payment via the Barion API&amp;lt;/li&amp;gt;&lt;br /&gt;
         &amp;lt;li&amp;gt;Redirecting the customer to the Barion Smart Gateway to select a funding source&amp;lt;/li&amp;gt;&lt;br /&gt;
         &amp;lt;li&amp;gt;Processing the callback and requesting information about the result of the payment&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
   &amp;lt;/li&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;[[#Step 2: Using the token|Using the registered token]] to charge the customer&amp;lt;/li&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 1:  Creating the funding source token ==&lt;br /&gt;
To be able to use a token payment scenario first the merchant has to register the token with Barion. The merchant has to make sure that the customer is well aware of the fact that they are giving consent to a tokenized payment. The Barion Smart Gateway UI does not indicate in any way that the payment is a token payment.&lt;br /&gt;
&lt;br /&gt;
The token is registered to the shop and not to the merchant&#039;s Barion account. So if the merchant has multiple shops in its Barion account, the registered tokens can not be shared among them even if the customer is the same. If you want to use tokens in multiple shops, please contact Barion in the Customer center.&lt;br /&gt;
&lt;br /&gt;
=== 1.1 Preparing the payment===&lt;br /&gt;
&lt;br /&gt;
The token registration is basically a [[Responsive_web_payment|normal payment]] with three extra properties in the [[Payment-Start-v2|Payment/Start]] request:&lt;br /&gt;
* InitiateRecurrence&lt;br /&gt;
* RecurrenceId&lt;br /&gt;
* RecurrenceType&lt;br /&gt;
&lt;br /&gt;
==== InitiateRecurrence====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; is a bool property. If you set it to &#039;&#039;&#039;true&#039;&#039;&#039; then the payment gateway will consider the payment as a token registration. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This happens even if the customer is already has a registered token, so you are able to re-register a funding source or even a customer. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== RecurrenceId ====&lt;br /&gt;
The next required property for a token registration is the token itself. This is generated by the shop and has to be unique for every registration. The token should be specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; property of the [[Payment-Start-v2|Payment/Start]] request. This token must be saved in the webshops database. A &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; token represents the funding source (bank card or Barion balance) of a customer. Since a customer can have multiple cards and accounts as a funding source make sure that in the webshop&#039;s system multiple tokens can belong to a single customer.&lt;br /&gt;
&lt;br /&gt;
==== RecurrenceType ====&lt;br /&gt;
The third required property is the [[RecurrenceType|Recurrence Type]]. This specifies the scenario. In case of Recurring Payment &amp;lt;code&amp;gt;PurchaseInformation.RecurringExpiry&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PurchaseInformation.RecurringFrequency&amp;lt;/code&amp;gt; must also be set.&lt;br /&gt;
&lt;br /&gt;
==== Example JSON request for a Merchant Initiated Payment scenario ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-7&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: true,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;MerchantInitiatedPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subscription fee for the first month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-01&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The response will be the same as to a [[Responsive_web_payment#Processing_the_successful_response|basic &#039;&#039;&#039;Immediate&#039;&#039;&#039; scenario]]. The &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; property at this point is &#039;&#039;&#039;None&#039;&#039;&#039; since the token is not registered to a funding source yet.&lt;br /&gt;
&lt;br /&gt;
==== Example JSON request for a Recurring Payment scenario ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Recurring Payment&#039;&#039;&#039; scenario has some extra restrictions. The merchant has to specify two additional properties in the [[Payment-Start-v2|Payment/Start]] request:&lt;br /&gt;
* &amp;lt;code&amp;gt;RecurringExpiry&amp;lt;/code&amp;gt;: The date after subsequent charges should not be accepted.&lt;br /&gt;
* &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt;: The minimum days the merchant has to wait between payments.&lt;br /&gt;
&lt;br /&gt;
Both properties are located in the [[PurchaseInformation]] property and must be specified if this scenario is selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-7, 30-33&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: true,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;RecurringPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subscription fee for the first month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-01&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;PurchaseInformation&amp;quot;:{&lt;br /&gt;
        &amp;quot;RecurringFrequency&amp;quot;: 10,&lt;br /&gt;
        &amp;quot;RecurringExpiry&amp;quot;: &amp;quot;2022-10-01&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Possible error responses ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| RecurringPaymentNotAllowed || The token payment is not allowed for the shop identified by the &#039;&#039;&#039;POSKey&#039;&#039;&#039;. Contact Barion to request this feature.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 1.2 Redirecting the customer to the Barion Smart Gateway to select a funding source ===&lt;br /&gt;
&lt;br /&gt;
After a successful payment preparation, the customer is redirected to the secure Barion Smart Gateway to choose a funding source. The funding source the customer selects will be registered to the token. The funding source can either be a Barion e-money balance or a bank card. This means that even though the customer may own multiple cards only the one that was registered to the token can be used for future token payments. To change the funding source attached to the token a new registration should be requested.&lt;br /&gt;
&lt;br /&gt;
=== 1.3 Processing the callback and requesting information about the result of the payment ===&lt;br /&gt;
&lt;br /&gt;
When the payment is completed (either successfully or unsuccessfully) a callback message is sent to the merchant&#039;s system. Once received a [[Payment-GetPaymentState-v2|GetPaymentState]] request must be sent to the Barion API. On how to implement this please read the article about the  [[Callback_mechanism|Callback mechanism]].&lt;br /&gt;
&lt;br /&gt;
The full response of the GetPaymentState request depends on the payment scenario and the structure of the payment. When it comes to token payment there are several properties to look out for. &lt;br /&gt;
* In case the &amp;lt;code&amp;gt;Status&amp;lt;/code&amp;gt; is &#039;&#039;&#039;Succeeded&#039;&#039;&#039; the funding source token is registered and ready to use.&lt;br /&gt;
* The &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; contains the ID of the token process. This specifies the nature of the token payment. &lt;br /&gt;
&lt;br /&gt;
==== TraceId ====&lt;br /&gt;
&lt;br /&gt;
In case of Recurring payment or Merchant initiated payment scenarios the [[Payment-GetPaymentState-v2|GetPaymentState]] response returns an additional field called &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;. The value of this property is generated by the card issuer and is up to a 100 characters, and should be left intact (whitespaces and 0s can&#039;t be trimmed). The merchant has to save it and submit it in all subsequent Recurring or Merchant initiated payments of the same type, otherwise, the payments can be declined by the issuer. The &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; represents the first, customer-present payment and helps the issuer to connect subsequent payments to this initial payment.&lt;br /&gt;
&lt;br /&gt;
====Example GetPaymentState response====&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;8, 11-12&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;2a9f3260bc2feb118bc3001dd8b71cc4&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;OrderNumber&amp;quot;: null,&lt;br /&gt;
    &amp;quot;POSId&amp;quot;: &amp;quot;[[SHOPS_PUBLIC_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;POSName&amp;quot;: &amp;quot;[[MERCHANTS_BARION_SHOPNAME]]&amp;quot;,&lt;br /&gt;
    &amp;quot;POSOwnerEmail&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSource&amp;quot;: &amp;quot;BankCard&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;MerchantInitiatedPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;FGTRR55322843442124780&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingInformation&amp;quot;: {&lt;br /&gt;
        &amp;quot;BankCard&amp;quot;: {&lt;br /&gt;
            &amp;quot;MaskedPan&amp;quot;: &amp;quot;0425&amp;quot;,&lt;br /&gt;
            &amp;quot;BankCardType&amp;quot;: &amp;quot;Visa&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruYear&amp;quot;: &amp;quot;2020&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruMonth&amp;quot;: &amp;quot;12&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;AuthorizationCode&amp;quot;: &amp;quot;512244&amp;quot;,&lt;br /&gt;
        &amp;quot;ProcessResult&amp;quot;: &amp;quot;Successful&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;AllowedFundingSources&amp;quot;: [&lt;br /&gt;
        &amp;quot;All&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;GuestCheckout&amp;quot;: true,&lt;br /&gt;
    &amp;quot;CreatedAt&amp;quot;: &amp;quot;2020-11-26T07:52:48.9Z&amp;quot;,&lt;br /&gt;
    &amp;quot;ValidUntil&amp;quot;: &amp;quot;2020-11-26T08:22:48.9Z&amp;quot;,&lt;br /&gt;
    &amp;quot;CompletedAt&amp;quot;: &amp;quot;2020-11-26T08:11:54.118Z&amp;quot;,&lt;br /&gt;
    &amp;quot;ReservedUntil&amp;quot;: null,&lt;br /&gt;
    &amp;quot;DelayedCaptureUntil&amp;quot;: null,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
           ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;Total&amp;quot;: 25.20,&lt;br /&gt;
    &amp;quot;SuggestedLocale&amp;quot;: &amp;quot;hu-HU&amp;quot;,&lt;br /&gt;
    &amp;quot;FraudRiskScore&amp;quot;: null,&lt;br /&gt;
    &amp;quot;RedirectUrl&amp;quot;: &amp;quot;https://merchanturl/Redirect?paymentId=2a9f3260bc2feb118bc3001dd8b71cc4&amp;quot;,&lt;br /&gt;
    &amp;quot;CallbackUrl&amp;quot;: &amp;quot;https://merchanturl/Callback?paymentId=2a9f3260bc2feb118bc3001dd8b71cc4&amp;quot;,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Displaying the funding source in a GUI ====&lt;br /&gt;
We strongly advise saving the complete response for future reference. The &amp;lt;code&amp;gt;FundingSource&amp;lt;/code&amp;gt; field tells if the funding source is a Barion balance or a card. If it is a card, it is useful to save [[FundingInformation]] for displaying it for the user, when requesting future payments. The usual way to display funding sources is to show the last 4 digits of the card, with 4 stars, eg: *** 1234. The card used can be obtained from FundingInformation&#039;s [[BankCard]] field. The [[CardType]] field can be used to display the appropriate card logo. You can even show, if the card is expired, and offer to register another one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; FundingInformation part of the GetPaymentState response &#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=json&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
    &amp;quot;FundingInformation&amp;quot;: {&lt;br /&gt;
        &amp;quot;BankCard&amp;quot;: {&lt;br /&gt;
            &amp;quot;MaskedPan&amp;quot;: &amp;quot;0425&amp;quot;,&lt;br /&gt;
            &amp;quot;BankCardType&amp;quot;: &amp;quot;Visa&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruYear&amp;quot;: &amp;quot;2020&amp;quot;,&lt;br /&gt;
            &amp;quot;ValidThruMonth&amp;quot;: &amp;quot;12&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;AuthorizationCode&amp;quot;: &amp;quot;512244&amp;quot;,&lt;br /&gt;
        &amp;quot;ProcessResult&amp;quot;: &amp;quot;Successful&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be displayed for example as &amp;lt;code&amp;gt;VISA **** 0425 (12/20)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a request-response diagram of the token registration process:&lt;br /&gt;
 &lt;br /&gt;
[[File:Token_payment_initiation.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Step 2: Using the token =&lt;br /&gt;
&lt;br /&gt;
To use an already registered token for a payment, you have to use the same [[Payment-Start-v2|/Payment/Start]] API endpoint but the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; should be set to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;. This tells the Barion API to use the token for payment instead of only registering it. The token should be specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; property. To be able to use a token, the initial payment must be in a successful state.&lt;br /&gt;
&lt;br /&gt;
At this point, the merchant has to decide whether this subsequent payment is used for the same token payment scenario or something changed. This is important because the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; can only be used for the same scenario, otherwise, the card issuer will decline the charge.&lt;br /&gt;
A &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; can only be used again if:&lt;br /&gt;
* the funding source is the same (technically the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; is the same)&lt;br /&gt;
* the token payment scenario is the same (technically the &amp;lt;code&amp;gt;RecurrenceType&amp;lt;/code&amp;gt; is the same)&lt;br /&gt;
* this subsequent request complies with the scenario restrictions (eg: in case of recurring payment the amount of the subsequent payment does not exceed the initial amount)&lt;br /&gt;
&lt;br /&gt;
If the funding source changes, new &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; must be requested. The process to do that is [[#Changing the funding source|described in detail here]]. If the funding source stays the same but the scenario changes or the restrictions are no longer met new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; must be requested. The process to do that is [[#Changing the token payment scenario with an existing token|described here]].&lt;br /&gt;
&lt;br /&gt;
== Subsequent payments in case of Recurring payment scenario ==&lt;br /&gt;
&lt;br /&gt;
In this case, three extra conditions must be met:&lt;br /&gt;
* the amount of the subsequent payment must not be higher than the initial amount&lt;br /&gt;
* at least that much days must be spent as defined in the initial &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt; property&lt;br /&gt;
* the date of the payment must not exceed the day specified in the initial &amp;lt;code&amp;gt;RecurringExpiry&amp;lt;/code&amp;gt; property&lt;br /&gt;
&lt;br /&gt;
Please be aware that in case any of these are no longer valid the merchant has to request a new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; as [[#Changing the token payment scenario with an existing token|described here]]. &lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=These conditions are not enforced by the Barion system so the violation of them will result in a declined charge.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
Payment/start must not include the &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RecurringExpiry&amp;lt;/code&amp;gt; properties (since they are already fixed during the initial payment).&lt;br /&gt;
&lt;br /&gt;
==== Example payment/start of a subsequent Recurring payment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-8&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: false,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;RecurringPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;FGTRR55322843442124780&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subscription fee for the second month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-02&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example response to this request ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;4,8,11&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;fb582913dc2feb11a49f309c23734b1c&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;RecurrenceResult&amp;quot;: &amp;quot;Successful&amp;quot;,&lt;br /&gt;
    &amp;quot;ThreeDSAuthClientData&amp;quot;: null,&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;FGTRR55322843442124780&amp;quot;,&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The structure of the response is the same as the normal &amp;lt;tt&amp;gt;/Payment/Start&amp;lt;/tt&amp;gt; response just the statuses will be different. In this case&lt;br /&gt;
* the payment level &amp;lt;code&amp;gt;Status&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Succeeded&#039;&#039;&#039; instead of &#039;&#039;&#039;Prepared&#039;&#039;&#039;&lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Successful&#039;&#039;&#039; (or &#039;&#039;&#039;Failed&#039;&#039;&#039;) instead of &#039;&#039;&#039;None&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The value of the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; will be the same as in the request.&lt;br /&gt;
&lt;br /&gt;
== Subsequent payments in case of Merchant Initiated Payment scenario ==&lt;br /&gt;
&lt;br /&gt;
In this scenario there are no restrictions.&lt;br /&gt;
&lt;br /&gt;
==== Example payment/start of a subsequent Merchant Initiated Payment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-8&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: false,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;MerchantInitiatedPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;KBYRR55322844552124780&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 75,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Usage fee for 2020/12&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Phone bill&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Usage fee for 2020/12&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 75,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 75,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-02&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example response to this request ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;4,8,11&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;fb582913dc2feb11a49f309c23734b1c&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;RecurrenceResult&amp;quot;: &amp;quot;Successful&amp;quot;,&lt;br /&gt;
    &amp;quot;ThreeDSAuthClientData&amp;quot;: null,&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;quot;TraceId&amp;quot;: &amp;quot;KBYRR55322844552124780&amp;quot;,&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The structure of the response is the same as the normal &amp;lt;tt&amp;gt;/Payment/Start&amp;lt;/tt&amp;gt; response just the statuses will be different. In this case&lt;br /&gt;
* the payment level &amp;lt;code&amp;gt;Status&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Succeeded&#039;&#039;&#039; instead of &#039;&#039;&#039;Prepared&#039;&#039;&#039;&lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; will be &#039;&#039;&#039;Successful&#039;&#039;&#039; (or &#039;&#039;&#039;Failed&#039;&#039;&#039;) instead of &#039;&#039;&#039;None&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The value of the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; will be the same as in the request.&lt;br /&gt;
&lt;br /&gt;
== Subsequent payments in case of OneClick Payment scenario ==&lt;br /&gt;
&lt;br /&gt;
In this scenario, the merchant has to prepare to perform the [[#Off-site 3DS v2 authentication|off-site 3DS v2 authentication]] of the payer. 3DS authentication is not required in the following cases:&lt;br /&gt;
* the token (&amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt;) was requested before 3DS came into effect,&lt;br /&gt;
* the original payment was not initialized by bank card,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; is not used in this scenario since the payer is present during the transaction. &lt;br /&gt;
&lt;br /&gt;
==== Example payment/start of a subsequent OneClick Payment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;5-7&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;[[SECRET_POS_KEY]]&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: false,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;RecurrenceType&amp;quot;: &amp;quot;OneClickPayment&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;GuestCheckOut&amp;quot; : true,&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;[[MERCHANTS_BARION_EMAIL]]&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 17,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Book: How to shop online&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;How to shop online&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Book about shopping online&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;piece&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 17,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 17,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-02&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example response to this request ====&lt;br /&gt;
&lt;br /&gt;
In this scenario, the response contains the &amp;lt;code&amp;gt;ThreeDSAuthClientData&amp;lt;/code&amp;gt; property that is used to perform an [[#Off-site 3DS v2 authentication|off-site 3DS v2 authentication]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=json line highlight=&amp;quot;4,8-9&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;PaymentId&amp;quot;: &amp;quot;fb582913dc2feb11a49f309c23734b1c&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-002&amp;quot;,&lt;br /&gt;
    &amp;quot;Status&amp;quot;: &amp;quot;Succeeded&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        ...&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;RecurrenceResult&amp;quot;: &amp;quot;Successful&amp;quot;,&lt;br /&gt;
    &amp;quot;ThreeDSAuthClientData&amp;quot;: &amp;quot;ewoJIkNhcmRQdWJs...WZXJzaW9uIjogIjIuMS4wIgp9Cg==&amp;quot;,&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;quot;Errors&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Possible error responses for the subsequent payment requests ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| InvalidRecurrenceId|| The token specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; is invalid. Check if the token registration was successful.&lt;br /&gt;
|-&lt;br /&gt;
| RecurringPaymentDenied|| Something happened to the user since the token registration, either deleted, suspended, or blocked. The payment s not allowed in these cases.&lt;br /&gt;
|-&lt;br /&gt;
| InsufficientFunds|| If the original payment was with an e-money wallet and the customer doesn&#039;t have enough money to fulfill this charge this error happens.&lt;br /&gt;
|-&lt;br /&gt;
| OriginalPaymentWasntSuccessful || This means that the token belongs to an originally unsuccessful payment so this token can not be used anymore. This could only happen if the original payment was financed with a credit card.&lt;br /&gt;
|-&lt;br /&gt;
|InvalidCurrency || If the original payment was paid with e-money and the current token payment is in a currency that the wallet does not have an account in this error happens.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the request-response diagram of the subsequent payments:&lt;br /&gt;
&lt;br /&gt;
[[File:Token_payment_2.png]]&lt;br /&gt;
&lt;br /&gt;
== RecurrenceResult: ThreeDSAuthenticationRequired ==&lt;br /&gt;
&lt;br /&gt;
In response to a subsequent payment, this RecurrenceResult can be received. This means that the payment can not be processed due to the lack of 3DS v2 information. &lt;br /&gt;
&lt;br /&gt;
This can happen if the initial payment was successfully authenticated via 3DS v2 but the subsequent payment does not refer to the original authentication with the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To fix this, request and store the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; of the initial payment and then specify it in the subsequent [[Payment-Start-v2]].&lt;br /&gt;
&lt;br /&gt;
To learn the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; of a previous payment just simply request the payment information via the [[Payment-GetPaymentState-v2]] endpoint.&lt;br /&gt;
&lt;br /&gt;
= Changing funding source or token scenarios =&lt;br /&gt;
&lt;br /&gt;
==Changing the funding source==&lt;br /&gt;
&lt;br /&gt;
This could happen if the funding source becomes invalid for some reason (card gets deleted or expires) or the merchant decides to use that token for another payer. In this case, the merchant has to register the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; again. &lt;br /&gt;
To do this a new payment must be started and in the [[Payment-Start-v2|Payment/Start]] request the following setup should be specified:&lt;br /&gt;
* the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; field has to be set to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; &lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; has to be specified.&lt;br /&gt;
* and the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; should not be specified.&lt;br /&gt;
&lt;br /&gt;
[[File:Funding-source-change.png|1500px]]&lt;br /&gt;
&lt;br /&gt;
Since the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; is bound to the payer and the process if the funding source changes new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; will be generated. This new ID must be saved to this payment and must be used from this moment on for subsequent payments.&lt;br /&gt;
&lt;br /&gt;
==Changing the token payment scenario with an existing token==&lt;br /&gt;
&lt;br /&gt;
This could occur when the merchant wants to get authorization from the payer to a new token scenario for the already registered funding source. To be able to do this the merchant has to have a valid and registered &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt;.&lt;br /&gt;
Let&#039;s see some examples when this may be necessary:&lt;br /&gt;
* The payer subscribed to the merchant&#039;s service beforehand and the merchant decided to use the recurring payment token scenario. The payer wants to subscribe to another service and this requires a different payment schedule. This means that the &amp;lt;code&amp;gt;RecurringFrequency&amp;lt;/code&amp;gt; that was specified initially can not be maintained so it is required to acquire a new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;&lt;br /&gt;
* The payer bought something on the merchant&#039;s website and uses the one-click feature for subsequent fast non-redirect payments. After a while, the payer decides to subscribe to a service provided by this same merchant. This means that the merchant has to create a new token scenario (not a one-click payment but a recurring payment). For this, the merchant has to acquire a new &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt;. This can be done without redirecting the payer to Barion using the existing &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; and performing a 3DS authentication on the merchant&#039;s website.&lt;br /&gt;
&lt;br /&gt;
To do these a new payment must be started and in the [[Payment-Start-v2|Payment/Start]] request the following setup should be specified:&lt;br /&gt;
* the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; field has to be set to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; &lt;br /&gt;
* the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; has to be specified.&lt;br /&gt;
* and the &amp;lt;code&amp;gt;TraceId&amp;lt;/code&amp;gt; should not be specified.&lt;br /&gt;
&lt;br /&gt;
After this, a 3DS authentication has to be completed to acquire a new trace ID. This can be done on the merchant&#039;s site if the merchant implements the barion.offsitegw.js for off-site 3DS authentication.&lt;br /&gt;
&lt;br /&gt;
This means that it can be achieved to acquire different Trace IDs for different scenarios with only one &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is basically categorizing the different token scenarios as opposed to using every subsequent payment as an unmarked charge.&lt;br /&gt;
&lt;br /&gt;
[[File:Mutiple-traceid.png|1500px]]&lt;br /&gt;
&lt;br /&gt;
= Off-site 3DS v2 authentication =&lt;br /&gt;
&lt;br /&gt;
In certain scenarios, the payer has to be authenticated to lower the risk of the card transaction. This can be either performed &lt;br /&gt;
* on the Barion Smart Gateway (on-site) by redirecting the customer to Barion &lt;br /&gt;
* or on the merchant&#039;s website (off-site) by integrating the Barion Off-site client library.&lt;br /&gt;
&lt;br /&gt;
This section describes how to integrate the Barion off-site authentication library into the merchant&#039;s site.&lt;br /&gt;
&lt;br /&gt;
== Step 1 : Initialize the off-site authentication library  ==&lt;br /&gt;
You have to include the following css and javascript files in the code of your site. &lt;br /&gt;
&amp;lt;source lang=html&amp;gt;&lt;br /&gt;
&amp;lt;link href=&amp;quot;https://secure.barion.com/static/barion.offsitegw.min.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;https://secure.barion.com/static/barion.offsitegw.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
These files include all the necessary javascript code and styling to handle the 3DS authentication and display the challenge if necessary.&lt;br /&gt;
&lt;br /&gt;
Then you have to initialize the Barion javascript client. To do that, you have to define a configuration object that specifies your functions that handle the off-site authentication events. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Authentication events&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;onAuthenticationSucceeded&amp;lt;/code&amp;gt;: the 3DS v2 authentication successfully completed&lt;br /&gt;
* &amp;lt;code&amp;gt;onAuthenticationFailed&amp;lt;/code&amp;gt;:  the 3DS v2 authentication failed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
const configuration = {&lt;br /&gt;
    onAuthenticationSucceeded: function () {&lt;br /&gt;
        // handle successful authentication by calling the Barion API via merchant&#039;s backend&lt;br /&gt;
        // Call the v2/payment/complete endpoint&lt;br /&gt;
    },&lt;br /&gt;
    onAuthenticationFailed: function () {&lt;br /&gt;
        // Handle unsuccessful authentication result, no charge was made.&lt;br /&gt;
        // The payment might be still valid only the authentication failed&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you have to pass this config object to the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
const gw = new Barion.OffsiteGw(configuration);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the DOM is loaded you have to initialize the library:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
document.addEventListener(&amp;quot;DOMContentLoaded&amp;quot;, function () {&lt;br /&gt;
    // Initiate the Barion Offiste GW library&lt;br /&gt;
    gw.init();&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 2: Start the authentication process ==&lt;br /&gt;
Once the &amp;lt;code&amp;gt;ThreeDSAuthClientData&amp;lt;/code&amp;gt; is acquired from the payment/start you can start the authentication process by calling the &amp;lt;code&amp;gt;authenticate()&amp;lt;/code&amp;gt; method of the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
gw.authenticate(threeDsClientData);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will start the authentication process and present the challenge if needed. Visually this will create a modal window over the merchant&#039;s site and show the payer every necessary information.&lt;br /&gt;
Once the authentication process finished (either with or without a challenge) the appropriate event will be fired.&lt;br /&gt;
&lt;br /&gt;
== Step 3: Completing the payment ==&lt;br /&gt;
&lt;br /&gt;
In case of successful authentication, you have to call our [[Payment-Complete-v3|/Payment/Complete]] endpoint, where the actual charge will happen.&lt;br /&gt;
&lt;br /&gt;
=== Possible error responses for the subsequent payment requests ===&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
== Suggested implementation flow for off-site authentication ==&lt;br /&gt;
&lt;br /&gt;
Ideally, an off-site authentication should be part of a client-side experience without any postbacks or page reloads. This is our recommendation to achieve this:&lt;br /&gt;
&lt;br /&gt;
# After the customer clicks on the &amp;quot;Pay&amp;quot; button make an AJAX call from your client-side code to your back-end. &lt;br /&gt;
# Have your backend make a request to our payment/start endpoint (with the appropriate settings for the desired token scenario)&lt;br /&gt;
# Have your backend process the response and pass the value of the &amp;lt;code&amp;gt;ThreeDSAuthClientData&amp;lt;/code&amp;gt; property to your client-side code.&lt;br /&gt;
# Use the Barion off-site library to perform the authentication&lt;br /&gt;
# Once the authentication succeeds send another AJAX request from your client-side code to your back-end.&lt;br /&gt;
# Have your back-end code call our [[Payment-Complete-v3|/Payment/Complete]]&lt;br /&gt;
# Have your backend process the response and pass the result to your client-side code.&lt;br /&gt;
# Display the result for the customer&lt;br /&gt;
&lt;br /&gt;
= Testing the integration =&lt;br /&gt;
&lt;br /&gt;
3D Secure has no environment for end-to-end testing, therefore merchants have to split their testings into two parts: Testing the payment flow with and without challenge. Getting a challenge is only possible with real-life cards, merchants have to use their own (there will be no real charging at the end on the Sandbox of the Payment Gateway, but using a real card will result initiating a real 3DS authentication).&lt;br /&gt;
&lt;br /&gt;
== Testing the whole payment flow, without challenge ==&lt;br /&gt;
&lt;br /&gt;
Use the [[https://docs.barion.com/Sandbox#Test_cards Barion test cards]], they will always get a &amp;quot;frictionless&amp;quot; flow, where the 3DS process is presented on the UI, but you will never see a challenge screen. &lt;br /&gt;
&lt;br /&gt;
This is good for testing your integration itself because it will lead to a successful charge, and you will get a TraceId as well.&lt;br /&gt;
&lt;br /&gt;
== Testing the challenge itself ==&lt;br /&gt;
&lt;br /&gt;
Use your own card, and let the card issuer decide whether your payment will get a challenge or not during the 3DS authentication procedure. Your payment will fail at the end, and you won&#039;t get the TraceId. &lt;br /&gt;
&lt;br /&gt;
This is good to test, how the challenge screens look like in your shop - especially when you integrated OneClick payment directly to your shop. You might also check how your customers see your checkout flow on popular devices.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Sample-electronicsshop&amp;diff=3013</id>
		<title>Sample-electronicsshop</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Sample-electronicsshop&amp;diff=3013"/>
		<updated>2021-05-17T09:06:53Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{PageTitle|title=Electronics shop - traditional e-shop sample}}&lt;br /&gt;
&lt;br /&gt;
This example is the input of &amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; [[Payment-Start-v2|/Payment/Start]] API call for an online shop selling electronics. This is the simplest transaction type where the customer pays to the merchant.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API Input JSON&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    POSKey: &amp;quot;999FFDDA-04FF-333F-CCCC-345FCB555FFC&amp;quot;,&lt;br /&gt;
    PaymentType: &amp;quot;Immediate&amp;quot;,             &lt;br /&gt;
    PaymentWindow: &amp;quot;00:30:00&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
    GuestCheckout : &amp;quot;True&amp;quot;,&lt;br /&gt;
    FundingSources: [ &amp;quot;All&amp;quot; ],    &lt;br /&gt;
&lt;br /&gt;
    PaymentRequestId: &amp;quot;payment-25&amp;quot;,&lt;br /&gt;
    OrderNumber: &amp;quot;order-25&amp;quot;,&lt;br /&gt;
    PayerHint: &amp;quot;joseph-schmidt@example.com&amp;quot;,&lt;br /&gt;
    ShippingAddress:  {&lt;br /&gt;
        Country: &amp;quot;AT&amp;quot;,&lt;br /&gt;
        City: &amp;quot;Vienna&amp;quot;,&lt;br /&gt;
        Region: &amp;quot;&amp;quot;,&lt;br /&gt;
        Zip: &amp;quot;1234&amp;quot;,&lt;br /&gt;
        Street: &amp;quot;13 Etwas Strasse&amp;quot;,&lt;br /&gt;
        Street2: &amp;quot;&amp;quot;,&lt;br /&gt;
        FullName: &amp;quot;Joseph Schmidt&amp;quot;,&lt;br /&gt;
        Phone: &amp;quot;43259123456789&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
&lt;br /&gt;
    RedirectUrl: &amp;quot;http://shop.example.com/danke-fur-den-kauf&amp;quot;,&lt;br /&gt;
    CallbackUrl: &amp;quot;http://shop.example.com/api/callback&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
    Locale: &amp;quot;de-AT&amp;quot;,&lt;br /&gt;
    Currency: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &lt;br /&gt;
    Transactions: [&lt;br /&gt;
        {&lt;br /&gt;
            POSTransactionId: &amp;quot;tr-25&amp;quot;,&lt;br /&gt;
            Payee: &amp;quot;eshop@example.com&amp;quot;,&lt;br /&gt;
            Total: 400,&lt;br /&gt;
            Items: [&lt;br /&gt;
                {&lt;br /&gt;
                    Name: &amp;quot;Digital Camera&amp;quot;,&lt;br /&gt;
                    Description: &amp;quot;Canon D500&amp;quot;,&lt;br /&gt;
                    Quantity: 1,&lt;br /&gt;
                    Unit: &amp;quot;pcs&amp;quot;,&lt;br /&gt;
                    UnitPrice: 300,&lt;br /&gt;
                    ItemTotal: 300,&lt;br /&gt;
                    SKU: &amp;quot;cn-d500-fxc3&amp;quot;&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                    Name: &amp;quot;SD Card&amp;quot;,&lt;br /&gt;
                    Description: &amp;quot;SanDisk SD mini 512GB - 3 year garantee&amp;quot;,&lt;br /&gt;
                    Quantity: 2,&lt;br /&gt;
                    Unit: &amp;quot;pcs&amp;quot;,&lt;br /&gt;
                    UnitPrice: 50,&lt;br /&gt;
                    ItemTotal: 100,&lt;br /&gt;
                    SKU: &amp;quot;snd-sd-500gm&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[CodeSamples|More Code Samples]]&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Security_Measures&amp;diff=2495</id>
		<title>Security Measures</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Security_Measures&amp;diff=2495"/>
		<updated>2020-07-09T11:23:26Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Callback */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{PageTitle|title= Security Measures}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This page lists different measures we take to maintain security and service levels. Please read carefully and follow the instructions, especially where changes may happen any time. If you do not update your settings when a change occurs, you might risk your Barion implementation&#039;s ability to work properly or at all.&lt;br /&gt;
&lt;br /&gt;
=Callback=&lt;br /&gt;
It makes sense to limit the range of IP addresses where the merchant&#039;s server accepts callback requests from, although you must be aware that the IP addresses can change.&lt;br /&gt;
&lt;br /&gt;
The callback request currently originate from the following IP addresses: &lt;br /&gt;
* 13.79.241.141&lt;br /&gt;
* 40.69.88.149&lt;br /&gt;
* 40.69.88.240&lt;br /&gt;
* 52.164.220.205&lt;br /&gt;
* 52.169.80.55&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=The IP address of the callback request may change any time for security reasons.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
If the IP address changes, we publish the list of new IP addresses here and notify our developers and merchants in the Facebook group (See: [[Support|Getting support]]) and in a newsletter, sent to the merchant&#039;s e-mail used at registration.&lt;br /&gt;
&lt;br /&gt;
=Barion API Calls=&lt;br /&gt;
We recommend that you use Domain Name Service (DNS) results to determine the IP addresses of our API servers. We may change records we do not provide notification of changes.&lt;br /&gt;
&lt;br /&gt;
=Encryption=&lt;br /&gt;
All communication with the Barion system must be done using TLS v1.1 and above - former encryption standards (SSLv3, TLS1.0 etc.) are not supported. &lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=All communication must be done over HTTPS. The Barion system only supports TLS v1.1 and above|color=#FF7A3D}}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Token_payment&amp;diff=2487</id>
		<title>Token payment</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Token_payment&amp;diff=2487"/>
		<updated>2020-06-22T18:06:10Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Exmaple JSON request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{PageTitle|title=Token Payment}}&lt;br /&gt;
&lt;br /&gt;
This payment scenario allows the integrator shop to register a customer (and a funding source) in the Barion system and then later on charge the customer without redirecting her to the Barion Payment Gateway UI. This means that the customer authorizes the shop to charge her card or Barion balance without typing in the card information or Barion login again.&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=Premium feature|text=This scenario is not allowed automatically for every approved shop and should be requested from Barion!|color=#1993c7}}&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
To be able to integrate your webshop with the Barion Payment Gateway: &lt;br /&gt;
* You must [[Creating_an_account|register a Barion wallet]] at the Barion website or in the Sandbox environment. Learn more about the Sandbox environment [[Sandbox|here]].&lt;br /&gt;
* For this wallet you have to [[Creating_a_shop|create a shop]] which should be approved by Barion.&lt;br /&gt;
* For every currency you plan to conduct payments in you have to make sure there is an account created in your Barion wallet. This means that if you plan to have USD payments then there should be an USD account created in your wallet.&lt;br /&gt;
* To make sure every corner case scenario works for your webshop it is best to topup that account with a small amount (aprrox. 5-10EUR or your choice of currency around the same value).&lt;br /&gt;
* For the technical communication guide please read the this: [[Calling_the_API|Calling the API]]&lt;br /&gt;
&lt;br /&gt;
== The payment process == &lt;br /&gt;
The process is divided into two major steps:&lt;br /&gt;
# [[#Creating the token|Creating the token]] that represents one of the customer&#039;s funding sources (credit card or e-money wallet)&lt;br /&gt;
# [[#Using the token|Using the registered token]] to charge the customer&lt;br /&gt;
&lt;br /&gt;
[[File:Recurring.png]]&lt;br /&gt;
&lt;br /&gt;
== Creating the token ==&lt;br /&gt;
To be able to use a token payment scenario first we have to register the token with Barion. The token registration is basically a [[Responsive_web_payment|normal payment]] with two new properties in the [[Payment-Start-v2|Payment/Start]] request. This means that we have to make sure that the customer is well aware of the fact that they are giving consent to a tokenized payment. The Barion payment does not indicate in any way that the payment is a token payment.&lt;br /&gt;
&lt;br /&gt;
The token is registered to the shop and not to the wallet. So if the Barion wallet has multiple shops registered the token can not be shared among them even if the customer is the same.&lt;br /&gt;
&lt;br /&gt;
One of the properties is the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; property. This is a bool property, if you set it to &#039;&#039;&#039;true&#039;&#039;&#039; then the payment gateway will consider the request as a token registration. This happens even if the customer is already has a registered token, so you are able to re-register a customer. &lt;br /&gt;
&lt;br /&gt;
The other required property for a token registration is the token itself. This is generated by the shop and has to be unique for every registration. The token should be specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; property of the [[Payment-Start-v2|Payment/Start]] request. This token should be stored in the webshop database. Make sure that multiple tokens can belong to a single customer because the token is only unique for a specific shop, customer, funding source combination.&lt;br /&gt;
&lt;br /&gt;
An already used &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; can be used for re-registration, in this case the new funding source will be registered for the token.&lt;br /&gt;
&lt;br /&gt;
=== Example JSON request ===&lt;br /&gt;
&amp;lt;source lang=json&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;E31EC263-01DC-40BD-BDF1-38FC7A332434&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: true,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;webshop@example.com&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subsription fee for the first month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-01&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Customer selects funding source ===&lt;br /&gt;
After the proper payment preparation the customer is redirected to the secure Barion gateway to choose between funding sources. The funding source the customer selects will be registered to the token. The funding source can either be an e-money wallet or a bank card. This means that even though the customer may own multiple cards only the one that was registered to the token can be used for future token payments. To change the funding source attached to the token a new registration should be requested.&lt;br /&gt;
&lt;br /&gt;
=== Processing the response ===&lt;br /&gt;
The response is almost the same as to a [[Responsive_web_payment#Processing_the_successful_response|basic &#039;&#039;&#039;Immediate&#039;&#039;&#039; scenario]]. The only difference is that there is the &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; property that tells the result of the token registration. This could be either&lt;br /&gt;
* &#039;&#039;&#039;Successful&#039;&#039;&#039;: the token is registered and live, can be used for payment&lt;br /&gt;
* &#039;&#039;&#039;Failed&#039;&#039;&#039;: the token registration was not successful, the token can not be used &lt;br /&gt;
* &#039;&#039;&#039;None&#039;&#039;&#039;: this could only happen if no token payment was requested&lt;br /&gt;
&lt;br /&gt;
=== Displaying the funding source in a GUI ===&lt;br /&gt;
We strongly advise to save the complete response for future reference. The FundingSource field tells if the funding source is a Barion balance or a card. If it is a card, it is useful to save [[FundingInformation]] for displaying it for the user, when requesting future payments. The usual way to display funding sources is to show the last 4 digits of the card, with the rest represented by stars, eg: **** **** **** 1234. The card used can be obtained from FundingInformation&#039;s [[BankCard]] field. The [[CardType]] field can be used to display the appropriate card logo. You can even show, if the card is expired, and offer to register another one.&lt;br /&gt;
&lt;br /&gt;
=== Possible error responses ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| RecurringPaymentNotAllowed || The token payment is not allowed for the shop identified by the &#039;&#039;&#039;POSKey&#039;&#039;&#039;. Contact Barion to request this feature.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using the token ==&lt;br /&gt;
You can use the token for one-click payment in a shop (like on Amazon or in Uber) or to automatically charge the user (e.g. in case of a subscription).&lt;br /&gt;
To use an already registered token for a payment, you have to use the same [[Payment-Start-v2|/Payment/Start]] API endpoint but the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; should be set to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;. This tells the Barion API to use the token for payment instead of only registering it. The token should be specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; property.&lt;br /&gt;
&lt;br /&gt;
There is no amount limitation for the token payment and the payment scenarios could be changed as well for the token charge. This means that the token payment can be reservation even if the original payment was an immediate scenario.&lt;br /&gt;
&lt;br /&gt;
=== Processing the response ===&lt;br /&gt;
&lt;br /&gt;
The structure of the response is the same as the normal &amp;lt;tt&amp;gt;/Payment/Start&amp;lt;/tt&amp;gt; response just the statuses will be different. In this case&lt;br /&gt;
* the payment level &#039;&#039;&#039;Status&#039;&#039;&#039; will be &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;Prepared&amp;lt;/code&amp;gt;&lt;br /&gt;
* the transaction level &#039;&#039;&#039;Status&#039;&#039;&#039; will be &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;Prepared&amp;lt;/code&amp;gt;&lt;br /&gt;
* the &#039;&#039;&#039;RecurrenceResult&#039;&#039;&#039; will be &amp;lt;code&amp;gt;Successful&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although this is an immediate response that indicates a successful charge the [[Callback_mechanism|callback mechanism]] still will be in motion as well.&lt;br /&gt;
&lt;br /&gt;
=== Possible error responses ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| InvalidRecurrenceId|| The token specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; is invalid. Check if the token registration was successful.&lt;br /&gt;
|-&lt;br /&gt;
| RecurringPaymentDenied|| Something happened to the user since the token registration, either deleted, suspended or blocked. The payment s not allowed in these cases.&lt;br /&gt;
|-&lt;br /&gt;
| InsufficientFunds|| If the original payment was with e-money wallet and the customer doesn&#039;t have enough money to fulfill this charge this error happens.&lt;br /&gt;
|-&lt;br /&gt;
| OriginalPaymentWasntSuccessful || This means that the token belongs to an originally unsuccessful payment so this token can not be used anymore. This could only happen if the original payment was financed with a credit card.&lt;br /&gt;
|-&lt;br /&gt;
|InvalidCurrency || If the original payment was paid with e-money and the current token payment is in a currency that the wallet does not have an account in this error happens.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Token_payment&amp;diff=2486</id>
		<title>Token payment</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Token_payment&amp;diff=2486"/>
		<updated>2020-06-22T18:05:27Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Creating the token */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{PageTitle|title=Token Payment}}&lt;br /&gt;
&lt;br /&gt;
This payment scenario allows the integrator shop to register a customer (and a funding source) in the Barion system and then later on charge the customer without redirecting her to the Barion Payment Gateway UI. This means that the customer authorizes the shop to charge her card or Barion balance without typing in the card information or Barion login again.&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=Premium feature|text=This scenario is not allowed automatically for every approved shop and should be requested from Barion!|color=#1993c7}}&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
To be able to integrate your webshop with the Barion Payment Gateway: &lt;br /&gt;
* You must [[Creating_an_account|register a Barion wallet]] at the Barion website or in the Sandbox environment. Learn more about the Sandbox environment [[Sandbox|here]].&lt;br /&gt;
* For this wallet you have to [[Creating_a_shop|create a shop]] which should be approved by Barion.&lt;br /&gt;
* For every currency you plan to conduct payments in you have to make sure there is an account created in your Barion wallet. This means that if you plan to have USD payments then there should be an USD account created in your wallet.&lt;br /&gt;
* To make sure every corner case scenario works for your webshop it is best to topup that account with a small amount (aprrox. 5-10EUR or your choice of currency around the same value).&lt;br /&gt;
* For the technical communication guide please read the this: [[Calling_the_API|Calling the API]]&lt;br /&gt;
&lt;br /&gt;
== The payment process == &lt;br /&gt;
The process is divided into two major steps:&lt;br /&gt;
# [[#Creating the token|Creating the token]] that represents one of the customer&#039;s funding sources (credit card or e-money wallet)&lt;br /&gt;
# [[#Using the token|Using the registered token]] to charge the customer&lt;br /&gt;
&lt;br /&gt;
[[File:Recurring.png]]&lt;br /&gt;
&lt;br /&gt;
== Creating the token ==&lt;br /&gt;
To be able to use a token payment scenario first we have to register the token with Barion. The token registration is basically a [[Responsive_web_payment|normal payment]] with two new properties in the [[Payment-Start-v2|Payment/Start]] request. This means that we have to make sure that the customer is well aware of the fact that they are giving consent to a tokenized payment. The Barion payment does not indicate in any way that the payment is a token payment.&lt;br /&gt;
&lt;br /&gt;
The token is registered to the shop and not to the wallet. So if the Barion wallet has multiple shops registered the token can not be shared among them even if the customer is the same.&lt;br /&gt;
&lt;br /&gt;
One of the properties is the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; property. This is a bool property, if you set it to &#039;&#039;&#039;true&#039;&#039;&#039; then the payment gateway will consider the request as a token registration. This happens even if the customer is already has a registered token, so you are able to re-register a customer. &lt;br /&gt;
&lt;br /&gt;
The other required property for a token registration is the token itself. This is generated by the shop and has to be unique for every registration. The token should be specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; property of the [[Payment-Start-v2|Payment/Start]] request. This token should be stored in the webshop database. Make sure that multiple tokens can belong to a single customer because the token is only unique for a specific shop, customer, funding source combination.&lt;br /&gt;
&lt;br /&gt;
An already used &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; can be used for re-registration, in this case the new funding source will be registered for the token.&lt;br /&gt;
&lt;br /&gt;
=== Exmaple JSON request ===&lt;br /&gt;
&amp;lt;source lang=json&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;POSKey&amp;quot;: &amp;quot;E31EC263-01DC-40BD-BDF1-38FC7A332434&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentType&amp;quot;: &amp;quot;Immediate&amp;quot;,&lt;br /&gt;
    &amp;quot;PaymentRequestId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001&amp;quot;,&lt;br /&gt;
    &amp;quot;InitiateRecurrence&amp;quot;: true,&lt;br /&gt;
    &amp;quot;RecurrenceId&amp;quot;: &amp;quot;SHOP-XMLP-TOKEN-ABC-123&amp;quot;,&lt;br /&gt;
    &amp;quot;FundingSources&amp;quot;: [&amp;quot;All&amp;quot;],&lt;br /&gt;
    &amp;quot;Currency&amp;quot;: &amp;quot;EUR&amp;quot;,&lt;br /&gt;
    &amp;quot;Transactions&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;POSTransactionId&amp;quot;: &amp;quot;EXMPLSHOP-PM-001/TR001&amp;quot;,&lt;br /&gt;
            &amp;quot;Payee&amp;quot;: &amp;quot;webshop@example.com&amp;quot;,&lt;br /&gt;
            &amp;quot;Total&amp;quot;: 25.2,&lt;br /&gt;
            &amp;quot;Comment&amp;quot;: &amp;quot;Subsription fee for the first month&amp;quot;,&lt;br /&gt;
            &amp;quot;Items&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;Name&amp;quot;: &amp;quot;Website subscription&amp;quot;,&lt;br /&gt;
                    &amp;quot;Description&amp;quot;: &amp;quot;Website subscription for one month&amp;quot;,&lt;br /&gt;
                    &amp;quot;Quantity&amp;quot;: 1,&lt;br /&gt;
                    &amp;quot;Unit&amp;quot;: &amp;quot;month&amp;quot;,&lt;br /&gt;
                    &amp;quot;UnitPrice&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;ItemTotal&amp;quot;: 25.2,&lt;br /&gt;
                    &amp;quot;SKU&amp;quot;: &amp;quot;EXMPLSHOP/SKU/PHC-01&amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Customer selects funding source ===&lt;br /&gt;
After the proper payment preparation the customer is redirected to the secure Barion gateway to choose between funding sources. The funding source the customer selects will be registered to the token. The funding source can either be an e-money wallet or a bank card. This means that even though the customer may own multiple cards only the one that was registered to the token can be used for future token payments. To change the funding source attached to the token a new registration should be requested.&lt;br /&gt;
&lt;br /&gt;
=== Processing the response ===&lt;br /&gt;
The response is almost the same as to a [[Responsive_web_payment#Processing_the_successful_response|basic &#039;&#039;&#039;Immediate&#039;&#039;&#039; scenario]]. The only difference is that there is the &amp;lt;code&amp;gt;RecurrenceResult&amp;lt;/code&amp;gt; property that tells the result of the token registration. This could be either&lt;br /&gt;
* &#039;&#039;&#039;Successful&#039;&#039;&#039;: the token is registered and live, can be used for payment&lt;br /&gt;
* &#039;&#039;&#039;Failed&#039;&#039;&#039;: the token registration was not successful, the token can not be used &lt;br /&gt;
* &#039;&#039;&#039;None&#039;&#039;&#039;: this could only happen if no token payment was requested&lt;br /&gt;
&lt;br /&gt;
=== Displaying the funding source in a GUI ===&lt;br /&gt;
We strongly advise to save the complete response for future reference. The FundingSource field tells if the funding source is a Barion balance or a card. If it is a card, it is useful to save [[FundingInformation]] for displaying it for the user, when requesting future payments. The usual way to display funding sources is to show the last 4 digits of the card, with the rest represented by stars, eg: **** **** **** 1234. The card used can be obtained from FundingInformation&#039;s [[BankCard]] field. The [[CardType]] field can be used to display the appropriate card logo. You can even show, if the card is expired, and offer to register another one.&lt;br /&gt;
&lt;br /&gt;
=== Possible error responses ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| RecurringPaymentNotAllowed || The token payment is not allowed for the shop identified by the &#039;&#039;&#039;POSKey&#039;&#039;&#039;. Contact Barion to request this feature.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using the token ==&lt;br /&gt;
You can use the token for one-click payment in a shop (like on Amazon or in Uber) or to automatically charge the user (e.g. in case of a subscription).&lt;br /&gt;
To use an already registered token for a payment, you have to use the same [[Payment-Start-v2|/Payment/Start]] API endpoint but the &amp;lt;code&amp;gt;InitiateRecurrence&amp;lt;/code&amp;gt; should be set to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;. This tells the Barion API to use the token for payment instead of only registering it. The token should be specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; property.&lt;br /&gt;
&lt;br /&gt;
There is no amount limitation for the token payment and the payment scenarios could be changed as well for the token charge. This means that the token payment can be reservation even if the original payment was an immediate scenario.&lt;br /&gt;
&lt;br /&gt;
=== Processing the response ===&lt;br /&gt;
&lt;br /&gt;
The structure of the response is the same as the normal &amp;lt;tt&amp;gt;/Payment/Start&amp;lt;/tt&amp;gt; response just the statuses will be different. In this case&lt;br /&gt;
* the payment level &#039;&#039;&#039;Status&#039;&#039;&#039; will be &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;Prepared&amp;lt;/code&amp;gt;&lt;br /&gt;
* the transaction level &#039;&#039;&#039;Status&#039;&#039;&#039; will be &amp;lt;code&amp;gt;Succeeded&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;Prepared&amp;lt;/code&amp;gt;&lt;br /&gt;
* the &#039;&#039;&#039;RecurrenceResult&#039;&#039;&#039; will be &amp;lt;code&amp;gt;Successful&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although this is an immediate response that indicates a successful charge the [[Callback_mechanism|callback mechanism]] still will be in motion as well.&lt;br /&gt;
&lt;br /&gt;
=== Possible error responses ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable api-table&amp;quot;&lt;br /&gt;
! Error code || Description&lt;br /&gt;
|-&lt;br /&gt;
| InvalidRecurrenceId|| The token specified in the &amp;lt;code&amp;gt;RecurrenceId&amp;lt;/code&amp;gt; is invalid. Check if the token registration was successful.&lt;br /&gt;
|-&lt;br /&gt;
| RecurringPaymentDenied|| Something happened to the user since the token registration, either deleted, suspended or blocked. The payment s not allowed in these cases.&lt;br /&gt;
|-&lt;br /&gt;
| InsufficientFunds|| If the original payment was with e-money wallet and the customer doesn&#039;t have enough money to fulfill this charge this error happens.&lt;br /&gt;
|-&lt;br /&gt;
| OriginalPaymentWasntSuccessful || This means that the token belongs to an originally unsuccessful payment so this token can not be used anymore. This could only happen if the original payment was financed with a credit card.&lt;br /&gt;
|-&lt;br /&gt;
|InvalidCurrency || If the original payment was paid with e-money and the current token payment is in a currency that the wallet does not have an account in this error happens.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=TransactionToFinish&amp;diff=2456</id>
		<title>TransactionToFinish</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=TransactionToFinish&amp;diff=2456"/>
		<updated>2020-06-09T12:46:37Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Property list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Payment transaction structure when finishing reservations or delayed captures}}&lt;br /&gt;
&lt;br /&gt;
This structure represents a [[PaymentTransaction|payment transaction]] related to a payment, when used for finishing pending reservations or delayed captures.&lt;br /&gt;
&lt;br /&gt;
== API usage == &lt;br /&gt;
&lt;br /&gt;
This structure is used by the following API endpoints:&lt;br /&gt;
* [[Payment-FinishReservation-v2]]&lt;br /&gt;
* [[Payment-Capture-v2]]&lt;br /&gt;
&lt;br /&gt;
== Property list ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| TransactionId || guid || &lt;br /&gt;
* Required&lt;br /&gt;
|| The unique identifier of the transaction in the Barion system.&lt;br /&gt;
|-&lt;br /&gt;
| Total || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than or equal to zero&lt;br /&gt;
* Decimal precision depends on payment curreny&lt;br /&gt;
|| The total amount of the transaction. This is the amount that is charged towards the payer when completing the payment. The final amount of the transactiom. This will overwrite the original amount. &lt;br /&gt;
The allowed number of decimal digits depends on the currency of the payment containing this transaction:&lt;br /&gt;
* CZK: two digits&lt;br /&gt;
* EUR: two digits&lt;br /&gt;
* HUF: zero digits&lt;br /&gt;
* USD: two digits&lt;br /&gt;
|-&lt;br /&gt;
| Comment || string || &lt;br /&gt;
* Optional &lt;br /&gt;
|| A comment associated with the transaction. This is NOT shown to the payer. Description of the transaction, this will overwrite the original description&lt;br /&gt;
|-&lt;br /&gt;
| PayeeTransactions || [[PayeeTransactionToFinish]][] || &lt;br /&gt;
* Optional &lt;br /&gt;
|| An array containing the sub-transactions. You have to add all payee transaction which was in the original payment start request . See the [[PayeeTransactionToFinish]] page for structure and syntax.&lt;br /&gt;
These are NOT shown to the payer.&lt;br /&gt;
|-&lt;br /&gt;
| Items || [[Item]][] || &lt;br /&gt;
* Optional &lt;br /&gt;
|| An array containing the items (products or services) included in the transaction. See the [[Item]] page for structure and syntax. Items of the transaction. These will overwrite the original items&lt;br /&gt;
These are shown to the payer on the Barion Smart Gateway.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Transfer-Send-v1&amp;diff=2160</id>
		<title>Transfer-Send-v1</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Transfer-Send-v1&amp;diff=2160"/>
		<updated>2019-12-23T12:40:49Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: send money instantly}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v1/Transfer/Send&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/transfer/send&amp;lt;/code&amp;gt; API endpoint is used to send e-money between Barion users or outside Barion.&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=WARNING|text=This API endpoint is deprecated.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v1&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v1&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;CZK&amp;quot; (Czech crown)&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the money transfer. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Barion does not do currency rate conversion. The caller must have an active account with the selected currency. If the recipient does not have an active account with the selected currecy, the system automatically creates one for them.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Recipient || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The e-mail address of the recipient of the transfer. If they are an active Barion user, they receive the money instantly. If the e-mail address is not registered in Barion, they must register in 7 days in order to claim the money. If the money is not claimed, it gets transferred back to the sender.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 1000 characters&lt;br /&gt;
|| The comment of the money transfer.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionId || Guid || The unique identifier of the transfer, generated by the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Currency || string || The currency of the money transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || decimal || The total amount transferred.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| FromBalance || decimal || The remaining balance of the sender.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| FromName || string || The name of the sender of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ToName || string || The name of the recipient of the transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || The comment of the bank transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TransactionType || [[TransactionType]] || The type of the transaction in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Direction || int || The direction of the transfer.&lt;br /&gt;
* 1 = incoming&lt;br /&gt;
* 0 = outgoing&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=List_of_API_endpoints&amp;diff=2159</id>
		<title>List of API endpoints</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=List_of_API_endpoints&amp;diff=2159"/>
		<updated>2019-12-23T12:40:05Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: /* Endpoint list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{PageTitle|title=List of Barion API endpoints}}&lt;br /&gt;
&lt;br /&gt;
On this page you can find the currently available API endpoints in the Barion system. If you are new here, first please read the [[Getting_started|Getting started]] page.&lt;br /&gt;
&lt;br /&gt;
==API base URL==&lt;br /&gt;
&lt;br /&gt;
Base URL for API requests in the &#039;&#039;&#039;Live (production)&#039;&#039;&#039; environment: &amp;lt;code&amp;gt;https://api.barion.com&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Base URL for API requests in the &#039;&#039;&#039;Sandbox (test)&#039;&#039;&#039; environment: &amp;lt;code&amp;gt;https://api.test.barion.com&amp;lt;/code&amp;gt; (learn more about the Sandbox environment [[Sandbox|here]])&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=Always double check that you are connecting to the proper environment to avoid unnecessary troubleshooting!|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
==Endpoint list==&lt;br /&gt;
&lt;br /&gt;
Currently the following endpoints are available in the Barion API.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; [[Payment-Start-v2|/Payment/Start]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; [[Payment-GetPaymentState-v2|/Payment/GetPaymentState]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; [[Payment-FinishReservation-v2|/Payment/FinishReservation]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; [[Payment-Capture-v2|/Payment/Capture]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; [[Payment-CancelAuthorization-v2|/Payment/CancelAuthorization]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; [[Payment-Refund-v2|/Payment/Refund]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; [[Withdraw-BankTransfer-v2|/Withdraw/BankTransfer]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; [[Accounts-Get-v2|/Accounts/Get]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; [[Transfer-Email-v2|/Transfer/Email]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v1&amp;lt;/span&amp;gt; [[Transfer-Send-v1|/Transfer/Send]] (deprecated)&lt;br /&gt;
&lt;br /&gt;
{{NotificationBox|title=IMPORTANT|text=Endpoints must be prefixed with the corresponding API version.|color=#FF7A3D}}&lt;br /&gt;
&lt;br /&gt;
==Other interfaces==&lt;br /&gt;
[[Callback_mechanism|Barion callback mechanism - how to properly get notified about successful payments]]&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Balance&amp;diff=2158</id>
		<title>Balance</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Balance&amp;diff=2158"/>
		<updated>2019-12-23T12:38:58Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: Created page with &amp;quot;{{PageTitle|title=Balance structure}}  The &amp;#039;&amp;#039;&amp;#039;Balance&amp;#039;&amp;#039;&amp;#039; structure indicates the balance of a selected account in a Barion wallet.  = API usage =  This structure is used by th...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Balance structure}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Balance&#039;&#039;&#039; structure indicates the balance of a selected account in a Barion wallet.&lt;br /&gt;
&lt;br /&gt;
= API usage =&lt;br /&gt;
&lt;br /&gt;
This structure is used by the following API endpoints:&lt;br /&gt;
* [[Accounts-Get-v2]]&lt;br /&gt;
&lt;br /&gt;
= Properties =&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| Available || decimal || &lt;br /&gt;
* greater than or equal to zero&lt;br /&gt;
|| The currently available amount in the account, in the account&#039;s currency.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Blocked || decimal || &lt;br /&gt;
* greater than or equal to zero&lt;br /&gt;
|| The currently blocked amount in the account, in the account&#039;s currency.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Accounts-Get-v2&amp;diff=2157</id>
		<title>Accounts-Get-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Accounts-Get-v2&amp;diff=2157"/>
		<updated>2019-12-23T12:37:05Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: Created page with &amp;quot;{{PageTitle|title=Barion API: Get existing accounts of the user}}  {| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot; | __TOC__ |}  {{api_callmethod |method=GET |uri=/v2/Accounts/Get }...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: Get existing accounts of the user}}&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin-left:2em;&amp;quot; align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=GET&lt;br /&gt;
|uri=/v2/Accounts/Get&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/accounts/get&amp;lt;/code&amp;gt; API endpoint is used to query the existing accounts of the calling user.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
* API: [[Transfer-Email-v2 | /Transfer/Email]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| Accounts || [[Account]][] || The list of accounts in the user&#039;s Barion wallet&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Account&amp;diff=2156</id>
		<title>Account</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Account&amp;diff=2156"/>
		<updated>2019-12-23T12:36:54Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: Created page with &amp;quot;{{PageTitle|title=Account structure}}  The &amp;#039;&amp;#039;&amp;#039;Account&amp;#039;&amp;#039;&amp;#039; structure represents an account in a Barion wallet.  = API usage =  This structure is used by the following API endpoi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Account structure}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Account&#039;&#039;&#039; structure represents an account in a Barion wallet.&lt;br /&gt;
&lt;br /&gt;
= API usage =&lt;br /&gt;
&lt;br /&gt;
This structure is used by the following API endpoints:&lt;br /&gt;
* [[Accounts-Get-v2]]&lt;br /&gt;
&lt;br /&gt;
= Properties =&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| AccountId || Guid || &lt;br /&gt;
|| The unique identifier of the account&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Balance || [[Balance]] || &lt;br /&gt;
|| The current balance of the account&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Currency || string || &lt;br /&gt;
|| The currency of the account in 3-letter ISO country code format&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Transfer-Email-v2&amp;diff=2155</id>
		<title>Transfer-Email-v2</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Transfer-Email-v2&amp;diff=2155"/>
		<updated>2019-12-23T12:32:40Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: Created page with &amp;quot;{{PageTitle|title=Barion API: send money to an e-mail address}}  {{TableOfContents}}  {{api_callmethod |method=POST |uri=/v2/Transfer/Email }}  The &amp;lt;code&amp;gt;/transfer/email&amp;lt;/code...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Barion API: send money to an e-mail address}}&lt;br /&gt;
&lt;br /&gt;
{{TableOfContents}}&lt;br /&gt;
&lt;br /&gt;
{{api_callmethod&lt;br /&gt;
|method=POST&lt;br /&gt;
|uri=/v2/Transfer/Email&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/transfer/email&amp;lt;/code&amp;gt; API endpoint is used to send e-money to a given e-mail address.&lt;br /&gt;
&lt;br /&gt;
Prerequisites before use:&lt;br /&gt;
* [[Creating_an_account|Creating an account in Barion]]&lt;br /&gt;
* [[Calling_the_API|Calling the Barion API]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;api-ver&amp;quot;&amp;gt;v2&amp;lt;/span&amp;gt; This API endpoint is available in &#039;&#039;&#039;API v2&#039;&#039;&#039; only.&lt;br /&gt;
&lt;br /&gt;
== Input properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| UserName || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your e-mail address in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Password || string || &lt;br /&gt;
* Required&lt;br /&gt;
|| Your password in the Barion system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| SourceAccountId || GUID || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be an account of the authenticating user, in the same currency as the transfer itself&lt;br /&gt;
|| The identifier of the Barion wallet. This can be determined using the [[Accounts-Get-v2]] API endpoint.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Amount || [[Money]] || &lt;br /&gt;
* Required&lt;br /&gt;
* Must be greater than zero&lt;br /&gt;
|| The total amount to transfer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| TargetEmail|| string || &lt;br /&gt;
* Required&lt;br /&gt;
|| The e-mail address of the recipient of the transfer. If they are an active Barion user, they receive the money instantly. If the e-mail address is not registered in Barion, they must register in 7 days in order to claim the money. If the money is not claimed, it gets transferred back to the sender.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Comment || string || &lt;br /&gt;
* Optional&lt;br /&gt;
* Maximum length: 1000 characters&lt;br /&gt;
|| The comment of the money transfer.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output properties ==&lt;br /&gt;
&lt;br /&gt;
{{api_output_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| IsTransferSuccessful || bool || Indicates wether the e-money transfer was successfuly finished.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Money&amp;diff=2154</id>
		<title>Money</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Money&amp;diff=2154"/>
		<updated>2019-12-23T12:31:44Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: Created page with &amp;quot;{{PageTitle|title=Money structure}}  The &amp;#039;&amp;#039;&amp;#039;Money&amp;#039;&amp;#039;&amp;#039; structure represents an amount of money in the Barion system.  = API usage =  This structure is used by the following API...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageTitle|title=Money structure}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Money&#039;&#039;&#039; structure represents an amount of money in the Barion system.&lt;br /&gt;
&lt;br /&gt;
= API usage =&lt;br /&gt;
&lt;br /&gt;
This structure is used by the following API endpoints:&lt;br /&gt;
* [[Transfer-Email-v2]]&lt;br /&gt;
&lt;br /&gt;
= Properties =&lt;br /&gt;
&lt;br /&gt;
{{api_input_table_header}}&lt;br /&gt;
|-&lt;br /&gt;
| Currency || string || &lt;br /&gt;
* Required&lt;br /&gt;
* Required length: 3 characters&lt;br /&gt;
* Accepted values: &lt;br /&gt;
** &amp;quot;CZK&amp;quot; (Czech crown)&lt;br /&gt;
** &amp;quot;EUR&amp;quot; (Euro)&lt;br /&gt;
** &amp;quot;HUF&amp;quot; (Hungarian forint)&lt;br /&gt;
** &amp;quot;USD&amp;quot; (U.S. dollar)&lt;br /&gt;
|| The currency of the money &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Value || decimal || &lt;br /&gt;
* Required&lt;br /&gt;
|| The total amount of money in the currency set above.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Basic_authentication&amp;diff=2150</id>
		<title>Basic authentication</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Basic_authentication&amp;diff=2150"/>
		<updated>2019-12-03T13:15:04Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{PageTitle|title=Basic Authentication}}&lt;br /&gt;
&lt;br /&gt;
If a client wants to authenticate itself with the server during an API call can do so by using a standard HTTP Basic Auth request header with the necessary credentials. This eliminates the need for supplying a username and password combination in the query string, which is a far less secure method.&lt;br /&gt;
&lt;br /&gt;
== Usage == &lt;br /&gt;
&lt;br /&gt;
In case of a &#039;&#039;&#039;Basic&#039;&#039;&#039; authentication, communication must take place over an HTTPS (TLS) connection. The username and password are passed over the network as strings separated by a semicolon (&amp;quot;:&amp;quot;), then converted into a base64 string. &lt;br /&gt;
&lt;br /&gt;
Example authentication data:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;MyUser:MY_Str0ng_P455w0Rd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example HTTP header:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;Authorization: Basic TXlVc2VyOk1ZX1N0cjBuZ19QNDU1dzBSZA==&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Detailed information about basic authentication can be found in RFC 7617:&lt;br /&gt;
https://tools.ietf.org/html/rfc7617&lt;br /&gt;
&lt;br /&gt;
== Server response ==&lt;br /&gt;
If the &#039;&#039;&#039;Authorization&#039;&#039;&#039; header is present, username and password will be fetched form the header. In this case, any authentication data passed in the query string will be ignored. &lt;br /&gt;
* If the authentication data could not be decoded from the header, or the authentication type is not &#039;&#039;Basic&#039;&#039; the response will be &amp;lt;code&amp;gt;HTTP 401 Unathorized&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If the username/password combination is invalid, the response will be &amp;lt;code&amp;gt;HTTP 400 Bad Request&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If the &#039;&#039;&#039;Authorization&#039;&#039;&#039; header is not present, credentials will be retrieved from the query string, and if incorrect, the response will be a JSON output describing the authentication error.&lt;br /&gt;
&lt;br /&gt;
== Allowed authentication data ==&lt;br /&gt;
At the moment, only endpoints authenticated with &#039;&#039;&#039;username&#039;&#039;&#039; and &#039;&#039;&#039;password&#039;&#039;&#039; can be used with HTTP Basic Auth. Every other authentication parameters (e.g. &#039;&#039;&#039;POSKey&#039;&#039;&#039;) should be sent in the query string when executing &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; requests.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
	<entry>
		<id>https://docs.barion.com/index.php?title=Basic_authentication&amp;diff=2149</id>
		<title>Basic authentication</title>
		<link rel="alternate" type="text/html" href="https://docs.barion.com/index.php?title=Basic_authentication&amp;diff=2149"/>
		<updated>2019-12-03T13:09:01Z</updated>

		<summary type="html">&lt;p&gt;Vinczei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{PageTitle|title=Basic Authentication}}&lt;br /&gt;
&lt;br /&gt;
If a client wants to authenticate itself with the server during an API call can now do so by using a standard HTTP Basic Auth request header with the necessary credentials. This eliminates the need for supplying a username and password combination in the query string, which is a far less secure method.&lt;br /&gt;
&lt;br /&gt;
== Usage == &lt;br /&gt;
&lt;br /&gt;
In case of a &#039;&#039;&#039;Basic&#039;&#039;&#039; authentication, communication must take place over an HTTPS (TLS) connection. The username and password are passed over the network as strings separated by a semicolon (&amp;quot;:&amp;quot;), then converted into a base64 string. &lt;br /&gt;
&lt;br /&gt;
Example authentication data:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;MyUser:MY_Str0ng_P455w0Rd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example HTTP header:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;Authorization: Basic TXlVc2VyOk1ZX1N0cjBuZ19QNDU1dzBSZA==&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Detailed information about basic authentication can be found in RFC 7617:&lt;br /&gt;
https://tools.ietf.org/html/rfc7617&lt;br /&gt;
&lt;br /&gt;
== Server response ==&lt;br /&gt;
If the &#039;&#039;&#039;Authorization&#039;&#039;&#039; header is present, username and password will be fetched form the header. In this case, any authentication data passed in the query string will be ignored. &lt;br /&gt;
* If the authentication data could not be decoded from the header, or the authentication type is not &#039;&#039;Basic&#039;&#039; the response will be &amp;lt;code&amp;gt;HTTP 401 Unathorized&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If the username/password combination is invalid, the response will be &amp;lt;code&amp;gt;HTTP 400 Bad Request&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If the &#039;&#039;&#039;Authorization&#039;&#039;&#039; header is not present, credentials will be retrieved from the query string, and if incorrect, the response will be a JSON output describing the authentication error.&lt;br /&gt;
&lt;br /&gt;
== Allowed authentication data ==&lt;br /&gt;
At the moment, only endpoints authenticated with &#039;&#039;&#039;username&#039;&#039;&#039; and &#039;&#039;&#039;password&#039;&#039;&#039; can be used with HTTP Basic Auth. Every other authentication parameters (e.g. &#039;&#039;&#039;POSKey&#039;&#039;&#039;) should be sent in the query string when executing &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; requests.&lt;/div&gt;</summary>
		<author><name>Vinczei</name></author>
	</entry>
</feed>