#Aye-checkout
1 messages · Page 1 of 1 (latest)
Hi, @uncut zealot may I know how did you make the checkout session creation API call?
@uncut zealot please remove your secret key, it's a public channel.
I've deleted the message, can you paste the code again without the secret key?
const stripeCheckout = (<any>window).StripeCheckout.configure({
key: '',
locale: 'auto',
source: (stripeToken: any) => {
console.log(stripeToken);
if (stripeToken.id != null) {
this.t = true;
this.payment_method = 'Stripe';
this.payment_status = 'COMPLETED';
this.payment_reference = stripeToken.id;
this.saveDonation(this.payment_method, this.payment_reference, this.payment_status);
}
},
closed: () => {
console.log('closed');
if (this.t == false) {
this.payment_method = 'Stripe';
console.log(this.payment_method, this.payment_status);
this.payment_status = 'INCOMPLETED';
this.openCancelDialog();
}
},
});
stripeCheckout.open({
name: 'Donation',
description: 'Payment',
//amount: amount * 100,
amount: this.totalAmount * 100,
currency : this.cur,
});
And which integration is it? React Native?
OK, and in which line do you see currency and amount = null ?
{
"id": "src_1KGHgoCk5zSHv2TOX3ZjxXPd",
"object": "source",
"amount": null,
"card": {
"exp_month": 10,
"exp_year": 2025,
"last4": "1706",
"country": "MM",
"brand": "Visa",
"cvc_check": "unchecked",
"funding": "credit",
"three_d_secure": "optional",
"name": null,
"address_line1_check": null,
"address_zip_check": null,
"tokenization_method": null,
"dynamic_last4": null
},
"client_secret": "src_client_secret_4zNYj7RpfhhxoY45HSnoTkAK",
"created": 1641797350,
"currency": null,
"flow": "none",
"livemode": true,
"owner": {
"address": null,
"email": "psmung2012@gmail.com",
"name": "psmung2012@gmail.com",
"phone": null,
"verified_address": null,
"verified_email": null,
"verified_name": null,
"verified_phone": null
},
"statement_descriptor": null,
"status": "chargeable",
"type": "card",
"usage": "reusable"
}
in the log message
Got it, amount and currency are required if you are creating a single-use source. Since this source is reusable, these two fields can be null.
how can i solve to get money in stripe this amount and currency.
Do you have a payment intent ID or charge ID for this transaction ?
You can visit your Dashboard -> payments
Can we use only source Id and token Id to get the money in Stripe?
Which Stripe-angular library do you use?
I use like this.
I see, this tutorial is quite old and it's 3rd-party, maybe you want to use the latest guide from Stripe webpage? https://stripe.com/docs/payments/accept-a-payment