Creating a transaction with Apple Pay at Gateway de Pagamento
Authorization with the Apple Pay token happens in the same way as standard credit card authorization. However, instead of providing card details openly, the token received by Apple Pay must be provided, as in the example below:
Request
{
"MerchantOrderId": "2017051002",
"Customer": {
(…)
},
"Payment": {
"Type": "CreditCard",
"Amount": 1000,
"Installments": 1,
"Currency": "BRL",
"Wallet": {
"Type": "ApplePay",
"WalletKey":"['paymentData.data']",
"AdditionalData": {
"EphemeralPublicKey": "['ephemeralPublicKey.header.EphemeralPublicKey']"
}
}
}
}| Header Parameters | Description | Type and Size |
|---|---|---|
MerchantId | Store ID in Gateway de Pagamento | GUID (36) |
MerchantKey | API key in Gateway de Pagamento. | String (24) |
Parameter | Description | Type and Size |
|---|---|---|
| Order ID number. | String (50) |
| Node with customer's data. | Refer to API Reference. |
| Payment method type. Possibilities: "CreditCard" / "DebitCard". | String (100) |
| Order amount in cents. | Number (15) |
| Number of installments. | Number (2) |
| Name of payment method provider. For Apple Pay transactions, use "ApplePay". | String (15) |
| Fill with the | String |
| Fill with the | String |
Response
{
"MerchantOrderId": "2017051002",
"Customer": {(…)
},
"Payment": {
(…)
"CreditCard": {
(…)
},
(…)
"Wallet": {
"Type": "ApplePay",
"WalletKey": "as01vRj+n9crY2vome7zc+u7Tz0+qg2La/8IUHpJIjFN6ThhUqLnSrskQHTrEbcYPiMksFK0+ddo9sZu70uJQJH1I+44N6PrVhilNDem97vOXq2VYDXiVJ27F/Q9wGQDgZBeGcZ6Pml9SIelHqUauBcQoOatrlnWPUL8kbdpT8WqgzXyaCh7oeTz=z6++rp/ofjvSjnGtOqAUsnrzvw4uzkcyKUSsfROdJ6B/Xzgu/T9fMIr5UxXD2DPF1SNh3ydEJABKz4HFjDW7ObvbQeua4GYxJdpQLpI3NgUbJy91E/LOyb/+PcCtO+0=a41tBrfnTTF9qsPuCIw8HWIEEKSRofn27NTofxev/i+nHEfqEtqNrN/epIvhzceD/gDiGetfiLKMzf94ARmpWUAMC==",
"AdditionalData": {
"EphemeralPublicKey": "MFkwEwZJKoZIzj0CAQYIKo12zj0DAQcDQgAEo+ReGClSmQ4hDJD1yh9nci3V4l7kPm2AQtKZMMvuNS0iK5sn/1A9l3kw1B1xCqOycZmnPSng7p5hpTvrei1BCA=="
}
},
(…)
"Links": [
(…)
]
}
}The wallet authorization response will have the same fields presented in API Reference, however with the addition of the Payment.Wallet node repeating the same fields used in the authorization, as described above.
Updated about 1 month ago