Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support ephemeral keys for iOS/Android #207

Open
elia opened this issue Mar 7, 2023 · 0 comments
Open

Support ephemeral keys for iOS/Android #207

elia opened this issue Mar 7, 2023 · 0 comments
Milestone

Comments

@elia
Copy link
Member

elia commented Mar 7, 2023

          This might be for another ticket, let me know but when having a customer created and linked to a payment intent, from my understanding of Stripe, iOS and Android clients will also need an ephemeral key as described in the [Stripe documentation ](https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet#add-server-endpoint)

Something like:

ephemeral_key = Stripe::EphemeralKey.create({
  customer: customer['id'],
}, { stripe_version: Stripe.api_version})

and then the PaymentIntentController#create will respond with all the info need o that any kind of api client can handle it

render json: { 
  client_secret: intent.client_secret,
  ephemeral_key: ephemeral_key['secret'],
  customer: customer['id'],
}

Originally posted by @loicginoux in #164 (comment)

@elia elia added this to the v5 milestone Mar 8, 2023
@elia elia modified the milestones: v5, v5.1 Apr 27, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant