question-mark
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.

The PaymentIntent object

See original GitHub issue

Hello, I m trying to get into your Stripe project but have problems with some inconsistencies.

When creating a payment intent the method Stripe.createPaymentSheet expects three variables (paymentIntent, ephemeralKey, customer):

    const { paymentIntent, ephemeralKey, customer } = await this.http.post<{
    paymentIntent: string;
    ephemeralKey: string;
    customer: string;
  }>(environment.api + 'intent', {}).pipe(first()).toPromise(Promise);

Compared to the expected response found at https://stripe.com/docs/api/payment_intents/object I can not find all appropriate variables.

“id”: “pi_1JKS5a2Tb35ankTn5AFisSig”, “object”: “payment_intent”, “customer”: null, ???

<?php […] \Stripe\Stripe::setApiKey(‘sk_test_…’);

$intent = \Stripe\PaymentIntent::create([ ‘amount’ => 1099, ‘currency’ => ‘eur’, ‘payment_method_types’ => [‘card’], ]);

echo json_encode(array(‘client_secret’ => $intent->client_secret)); ?> ` Which object variables do I have to put into the array for json_encode?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Th-Barthcommented, Aug 5, 2022

You re right, sorry. In the meantime I got some help from Stripe und I was able to implement stripe-elements into my project.

0reactions
rdlabocommented, Aug 5, 2022

@Th-Barth No worries. 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.

👉 https://github.com/capacitor-community/stripe/issues/145

Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The PaymentIntent object – curl - Stripe API reference
Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., ...
Read more >
PaymentIntent (stripe-java 10.2.0 API) - Javadoc.io
A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method , requires_capture , requires_confirmation , requires_action ...
Read more >
Stripe.PaymentIntent — Striped v0.5.0 - HexDocs
A PaymentIntent guides you through the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for...
Read more >
How to get product purchased from Stripe PaymentIntent object?
To go from Payment Intent ID to product is several API calls. You can get the invoice from the PI: stripe.com/docs/api/payment_intents/…. Then ...
Read more >
Net::API::Stripe::Payment::Intent - The PaymentIntent object
A PaymentIntent guides you through the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found