Processing Apple / Google Pay with Stripe

Viewed 534

We're adding Stripe as one of the several providers for our payment gateway.

The workflow we currently use for processing Apple / Google / Samsung Pay payments is the following:

  1. Mobile Client generates an encrypted payment token via API provided by the OS
  2. Mobile Client sends a payment request to the Backend (user ID, amount, token).
  3. Backend sends a request to Bank API
  4. Bank API responds to Backend with either success or failure
  5. Backend responds to Mobile Client

However, after reading Stripe's documentation, I haven't found a way to implement the same workflow. Apparently, the interaction is inverted:

  1. Mobile Client requests a "client secret" from Backend
  2. Backend sends a PaymentIntent request to Stripe's API
  3. Backend returns the created PaymentIntent's "client secret" to Mobile Client
  4. Mobile Client executes the payment by directly communicating with Stripe's API using the client SDK

This seems problematic, because it requires a major redesign for both our Mobile Client and Backend applications. Moreover, it makes the abstraction leak, because now the Mobile Client is bound to a particular payment provider.

Is it possible to implement our existing workflow with Stripe's API?

2 Answers

You definitely can obtain ApplePay/GooglePay token directly from Apple/Google, and use it to exchange for a Stripe token to "get into Stripe's world", similar to your original approach. However this approach requires some tweak and you would want to reach out to their Support.

Related