#harshil-ahir_code
1 messages ¡ Page 1 of 1 (latest)
đ 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.
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.
- harshil-ahir_code, 5 days ago, 29 messages
You can only have the receipt, if that's what you are looking for
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i want to show the user its payment details like a reciept in pdf format how can i get this with my code
Yeah you have the URL above, in the Charge object inside the PaymentIntent object
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
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
its not my key its they key which shown in stripe documentation
Okay and with that charge object which method will i call to get my reciept url which was in pdf form
It's your key indeed. The Doc prefill it for you. Please edit your message above to remove it
You can call Retrieve Charge API, pass in the Charge Id you got inside the PaymentIntent object
Then look at its receipt_url
Done
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
i have collected the payment and hold it for 30 days https://docs.stripe.com/payments/extended-authorization while at the time of capturing it the error is coming
How did you collect it? I don't see a confirmation call
You only created it and then captured
i have collected payment through card
Yeah by which request? There isn't a confirmation request for pi_3Pl3YLFkorCYEiZC1If1jRX1