Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow a Stripe Connect account id to be passed during initialization for ApplePay

See original GitHub issue

Currently when creating initializing the plugin I pass the Stripe public key.

import {
  Stripe as StripeCapacitor,
} from '@capacitor-community/stripe';
await StripeCapacitor.setPublishableKey('pk_test_....');

The initialization succeeds. However requests to charge the payment intent on behalf of connected accounts will fail.

The stripe package is missing the ‘Stripe-Account’ header. The platform cannot charge payment intents with an application fee without the header.

The fix would be to add the ‘Stripe-Account’ header to requests as per the Stripe documentation

Essentially updating the initialization options interface to pass in the Stripe connect account id so that requests can be made on their behalf:

 this.stripe = Stripe(environment.stripeMyPublicKey, {
          stripeAccount: connectedStripeAccountId,

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

rdlabocommented, Jul 3, 2022

@yllaw I’m glad you got it sorted out!

Did you use this plugin for production? If yes, please tell us what app. This help development this plugin.



yllawcommented, Jun 13, 2022

@rdlabo Thank you for this!

Apple pay works as intended.

I have not been able to test Google pay yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apple Pay | Stripe Documentation
Allow customers to securely make payments using Apple Pay on their iPhone, iPad, and Apple Watch.
Read more >
Allow a Stripe Connect account id to be passed #70 - GitHub
I have the connectedAccountId for these accounts but not the public Stripe key stored. Is it possible to initialize the Stripe plugin with...
Read more >
Accept an Apple Pay payment with Stripe.js - YouTube
Learn the front end steps for accepting a payment with Apple Pay from your customers using a custom form in HTML and JavaScript....
Read more >
Apple Pay on the Web | Apple Developer Forums
Connect with fellow developers and Apple experts as you give and receive help on Apple Pay ... Hello, I am using Apple Pay...
Read more >
Stripe - WooCommerce
The WooCommerce Stripe payment gateway lets you accept payments directly onsite ... Platform through Stripe Connect, it is possible for the account to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found