Creating a transaction with Apple Pay at API E-commerce Cielo
Authorization with the Apple Pay token works like a credit card authorization, but instead of providing the card details, you must provide the data received from Apple Pay in the fields Payment.Wallet.WalletKey
and Payment.Wallet.AdditionalData.EphemeralPublicKey
, as shown in the example:
Example of transaction with e-wallet fields
{
"MerchantOrderId": "2017051002",
"Customer": {
(…)
},
"Payment": {
"Type": "CreditCard",
"Amount": 1000,
"Installments": 1,
"Currency": "BRL",
"Wallet": {
"Type": "ApplePay",
"WalletKey":"['paymentData.data']",
"AdditionalData": {
"EphemeralPublicKey": "['ephemeralPublicKey.header.EphemeralPublicKey']"
}
}
}
}
Parameter | Description | Type and Size |
---|---|---|
Payment.Wallet.Type | Name of payment method provider. For Apple Pay transactions, use "ApplePay". | String (15) |
Payment.Wallet.WalletKey | Fill with the paymentData.data parameter value returned by Apple Pay. | String |
Payment.Wallet.AdditionalData.EphemeralPublicKey | Fill with the ephemeralPublicKey.header.EphemeralPublicKey parameter value returned by Apple Pay. | String |
Please refer to the API Reference for the full request and response examples.
Updated 2 days ago