#Little_seven
1 messages · Page 1 of 1 (latest)
During one-time payment, the payment method should be saved in order to re-use for future payments. You can use this doc to save the payment method during payment: https://stripe.com/docs/payments/save-during-payment
In step 7 of this doc, it mentioned how payment methods of a customer can be retrieved and used for other payments
but is there any api for one-time payment which has a parameter for payment-method card?
like in subscription api.
it has default_payment_method.
btw separate question,
does paying product one-time can only be possible in checkout/session api and payment link.
but not api like create subscription api, which creates subscription sametime pays that specific subscription?
is there any api for one-time payment which has a parameter for payment-method card?
If the payment method is not saved during one-time payment as the doc described, it can't be re-used. Therefore, Stripe doesn't have API for payment methods that are used in one-time payment.
does paying product one-time can only be possible in checkout/session api and payment link.
but not api like create subscription api, which creates subscription sametime pays that specific subscription?
Can you explain what you would like to achieve?
currently,
I have digital product which enables customer to subscribe in my website and avail use of features in the website.
So after they subscribed and logged-in, they can avail additional features by buying in marketplace page in my website which offers one-time payment products.
in that markeyplace page,
i wanted for them like when
-
they click "buy" button, dialog box will appear and list of customer available payment methods as dropdown.
-
after they selected a payment method, they can proceed to payment using api whether using checkout session api or other any available api, providing that selected paymentMethod as parameter also
When the customer is new and doesn't have a payment method stored, you can use PaymentIntent API + Payment Element to collect and store payment method: https://stripe.com/docs/payments/save-during-payment
(This answers question 1 and 2) When the customer has payment methods stored, customer's saved payment methods can be retrieved with PaymentMethods API for customer to choose and use PaymentIntent API to charge as described here: https://stripe.com/docs/payments/save-during-payment?platform=web#charge-saved-payment-method
does paymentIntent API has option parameter productID which is for the id of selected prodct?
sorry i forgot this part,
so parameter should have selected paymentMethod and selected product which will pass the id(s) of it.
PaymentIntent API charge the amount directly and doesn't support products
is there any api available that captures payment with parameters paymethodId and productId?
Another possible way is using invoicing: https://stripe.com/docs/invoicing/integration
And you can set the default_payment_method
on the invoice: https://stripe.com/docs/api/invoices/create#create_invoice-default_payment_method
okay will check it, thank you!
No problem!