ApplePay-StartPaymentWithAppleToken: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
Line 31: Line 31:
* Maximum length: 2000 characters
* Maximum length: 2000 characters
|| 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 <code>paymentId</code> parameter. Click here to learn more about the callback mechanism: [[Callback_mechanism|Payment callback mechanism (IPN)]]
|| 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 <code>paymentId</code> parameter. Click here to learn more about the callback mechanism: [[Callback_mechanism|Payment callback mechanism (IPN)]]
|-
| Transactions || [[PaymentTransaction]][] ||  
| Transactions || [[PaymentTransaction]][] ||  
* Required
* Required

Revision as of 10:08, 2 December 2021

Barion API: Start Payment With Apple token

POST /v2/ApplePay/StartPaymentWithAppleToken

Input properties

Property name Property type Limitations and constraints Description
POSKey Guid * Required 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.
ShippingContact ShippingContact * Required The shipping information of the payer
BillingContact BillingContact * Required The billing information of the payer
Token Token * Required The Token provided by Apple in onpaymentauthorized callback.
PaymentRequestId string
  • Required
  • Maximum length: 100 characters
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.
CallbackUrl string
  • Required
  • Maximum length: 2000 characters
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 paymentId parameter. Click here to learn more about the callback mechanism: Payment callback mechanism (IPN)
Transactions PaymentTransaction[]
  • Required
An array of payment transactions contained in the payment. A payment must contain at least one such transaction. See the PaymentTransaction page for the appropriate structure and syntax.

Defining multiple transactions allow the payment initiator to distribute the payment amount between multiple shops. See the following page to learn more: Facilitated payments

OrderNumber string
  • Optional
  • Maximum length: 100 characters
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.

Output properties

No specific output property is available, besided the generic ones.

Possible error responses

Error code Description
AuthenticationFailed Authentication failed.
ModelValidationError This happens when some of the input properties fail the basic validation. For example the session request url is malformed.
InvalidApplePayToken The provided token is invalid.
InvalidApplePayMessage The provided message is invalid.
ApplePayNotAllowed Apple Pay not allowed for token payments;
NotRegisteredToApple The provided shop url is not registered to Apple.