#ferret_paymentintent-integration
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/1306742548559302767
đ 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.
- ferret13_api, 14 hours ago, 9 messages
Hello! Can you give me the request ID showing that error? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_CSJmQuz7HiUbd0
I think the issue is that you're trying to pass the string card into the parameter payment_method, but that parameter takes a Payment Method ID.
Yeah, that's the issue.
You should be supplying a Payment Method ID, like pm_123... there.
Oh, I copy code from Stripe API Doc's.
So when we create setup intent do we need to also save payment method id into our database?
Let's back up a bit. Which code did you copy? Can you link me to it?
Also, can you tell me at a high-level what you're trying to build?
Am looking for code snippet and will respond shortly.
In our client portal we have created a form for clients to setup future payments, so we can automatically process payment without "Stripe Checkout". Within Stripe the customer is create and their card details are saved for future use.
So you're trying to implement the payment part of that, where you create an off-session payment using already-saved payment details?
If so, the instructions to do that are here: https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=stripe-hosted#charge-saved-payment-method
Yes that is correct
Try following the instructions there and let me know if you run into any issues.
Sadly this didn't work neither
request-id: req_nIUKyWGnrMP5mc
You didn't specify the saved Payment Method.
You need to set payment_method to the Payment Method ID you want to use.
Okay, how do I retrieve payment method id from customer when creating new customer future payemts?
CustomerCreateParams params =
CustomerCreateParams.builder()
.setName(debtor.getName())
.setEmail(debtor.getEmail())
.build();
Customer customer = Customer.create(params);
stripeCustomerId = customer.getId();
debtor.setStripeCustomerId(stripeCustomerId);
//debtor.setStripePaymentMethodId(customer.retrievePaymentMethod("card").getId());
You can list the Payment Methods associated with a Customer: https://docs.stripe.com/api/payment_methods/customer_list
Usually, though, you would have already noted the specific Payment Method to use as a result of some prior interaction.
You would need to know, for example, which Payment Method to use if a customer has more than one attached.
I will try this and come back to you shortly
ferret_paymentintent-integration
It's finally working! Many thanks for your kind support and assistance.
Happy to help!
Is it possible to add our invoice number to Payment Intent object? I am adding the description with "Invoice 1234"
You can put it on the description or in metadata
Okay and thanks, we've doing this at the moment with session checkout
Is the invoice key with payment intent object reserved?
yes it's only available if you use our Invoicing product which is separate and unrelated to what you seem to want