#harshil-ahir_code

1 messages ¡ Page 1 of 1 (latest)

prisma hullBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1270616276993314816

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

atomic galleonBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

willow whale
#

You can only have the receipt, if that's what you are looking for

left finch
#

i want to show the user its payment details like a reciept in pdf format how can i get this with my code

willow whale
#

Yeah you have the URL above, in the Charge object inside the PaymentIntent object

left finch
#

but in charge object can i need to set amount and other things again
Stripe.apiKey = "null";

ChargeCreateParams params =
ChargeCreateParams.builder()
.setAmount(1099L)
.setCurrency("usd")
.setSource("tok_visa")
.build();

Charge charge = Charge.create(params);

like this

willow whale
#

Please redact your apiKey

#

You shouldn't share it here. This is a public forum

#

And no you don't create a Charge object. You still create the PaymentIntent object but find the auto generated Charge object inside it

left finch
left finch
willow whale
willow whale
#

Then look at its receipt_url

left finch
#

while capturing the payment also i am getting error like
This PaymentIntent could not be captured because it has a status of requires_payment_method. Only a PaymentIntent with one of the following statuses may be captured: requires_capture.; code: payment_intent_unexpected_state; request-id: req_3TZeWsFBnKNNDP

willow whale
#

Haven't you collect the payment method for it?

#

Which Doc are you following?

left finch
willow whale
#

How did you collect it? I don't see a confirmation call

#

You only created it and then captured

left finch
#

i have collected payment through card

willow whale
#

Yeah by which request? There isn't a confirmation request for pi_3Pl3YLFkorCYEiZC1If1jRX1

prisma hullBOT