#Rahul Maru
1 messages · Page 1 of 1 (latest)
Hi there, can you share with me more about the error?
yes give me one min
can you please check this code snippet
i have described my problem in it
Please remove the secret key from the chat and roll your key asap
Discord is a public place so everyone can see it
that is not the correct one
that is only an example value
can you please check what i am doing wrong to capture the amount
You haven't sent me the request ID
OK. You are passing wrong data to payment_method param
You just pass the payment_method ID (e.g., pm_XXX) when creating a paymentIntent, not the whole payment_method object
let me try
how can i pass payment method id
like
payment_method: {
id: "pm_...."
}
or
payment_method_id: "pm_..."
Just payment_method: "pm..."
ok let me try
i got the success response from paymentIntent create api but still status was not correct
{"id":"pi_3MKGIvFsdWHZFlc30dmxmycW","object":"payment_intent","amount":19900,"amount_capturable":0,"amount_details":{"tip":{}},"amount_received":0,"application":null,"application_fee_amount":null,"automatic_payment_methods":null,"canceled_at":null,"cancellation_reason":null,"capture_method":"automatic","charges":{"object":"list","data":[],"has_more":false,"total_count":0,"url":"/v1/charges?payment_intent=pi_3MKGIvFsdWHZFlc30dmxmycW"},"client_secret":"pi_3MKGIvFsdWHZFlc30dmxmycW_secret_9HyS2UhF1vVKKJ58F21YScyZ4","confirmation_method":"automatic","created":1672298009,"currency":"usd","customer":null,"description":null,"invoice":null,"last_payment_error":null,"livemode":false,"metadata":{},"next_action":null,"on_behalf_of":null,"payment_method":"pm_1MKFJCFsdWHZFlc3illvxonc","payment_method_options":{"card":{"installments":null,"mandate_options":null,"network":null,"request_three_d_secure":"automatic"}},"payment_method_types":["card"],"processing":null,"receipt_email":null,"review":null,"setup_future_usage":null,"shipping":null,"source":null,"statement_descriptor":"Custom descriptor","statement_descriptor_suffix":null,"status":"requires_confirmation","transfer_data":null,"transfer_group":null}
this is the response i got in paymentintent create
requestId:
req_KJ6XVeSomQN1IX
The status is requires_confirmation , and you need to confirm this PaymentIntent https://stripe.com/docs/api/payment_intents/confirm?lang=node#confirm_payment_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok let me try
what is need to pass in payment_method parameter confirm payment intent if it is apple pay
You don't need to pass since you've already specified when creating the paymentIntent
ok let me try
hy can you please check this request id
req_KG2p20MR9GvNaW
that amount is successfully captured or not
You can check the status of the PaymentIntent. It says succeeded which means the payment was successful.
No problem!