Saturday, 17 April 2021

How to complete a payment from ApplePay with Stripe

I am developping an app on Ionic 5 Cordova,

I already implemented the Stripe payment with the SetupIntent and the PaymentIntent API and everything work fine. Now, I try to add ApplePay (I used the nativ pluggin) and I successfully configured everything to get to the makePaymentRequest response :

{
    "shippingAddressState": "London",
    "shippingCountry": "United Kingdom",
    "shippingISOCountryCode": "gb",
    "billingAddressCity": "London",
    "billingISOCountryCode": "gb",
    "shippingNameLast": "Name",
    "paymentData": "<BASE64 ENCODED TOKEN WILL APPEAR HERE>",
    "stripeToken": "<STRIPE TOKEN>",
    "shippingNameFirst": "First",
    "billingAddressState": "London",
    "billingAddressStreet": "Street 1\n",
    "billingNameFirst": "First",
    "billingPostalCode": "POST CODE",
    "shippingPostalCode": "POST CODE",
    "shippingAddressStreet": "Street Line 1\nStreet Line 2",
    "billingNameLast": "NAME",
    "billingSupplementarySubLocality": "",
    "billingCountry": "United Kingdom",
    "shippingAddressCity": "London",
    "shippingSupplementarySubLocality": "",
    "transactionIdentifier": "Simulated Identifier"
}

What I DO NOT KNOW is what to do in order to complet the payment on Stripe. Every documentations only say

this is what you'll need to pass along to your payment processor

But I didn't find anywhere (even on Stripe Documentation) how to do so. I believe there is something to do with the line : "paymentData": "<BASE64 ENCODED TOKEN WILL APPEAR HERE>",.

Can anybody help me on how to finish the transaction with stripe from the makePaymentRequest's response since I believe I am really close.



from How to complete a payment from ApplePay with Stripe

No comments:

Post a Comment