#Little_seven

1 messages · Page 1 of 1 (latest)

lyric hearthBOT
keen drum
#

In step 7 of this doc, it mentioned how payment methods of a customer can be retrieved and used for other payments

dark raven
#

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?

keen drum
#

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?

dark raven
#

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

  1. they click "buy" button, dialog box will appear and list of customer available payment methods as dropdown.

  2. 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

keen drum
#

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

dark raven
#

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.

keen drum
#

PaymentIntent API charge the amount directly and doesn't support products

dark raven
#

is there any api available that captures payment with parameters paymethodId and productId?

keen drum
dark raven
#

okay will check it, thank you!

keen drum
#

No problem!