#ArunBhat
1 messages · Page 1 of 1 (latest)
Hi there, what do you mean by 2 step payment?
authorization and capture
Yes you can do that https://stripe.com/docs/payments/place-a-hold-on-a-payment-method
By default capture will happen automatically, but we need capture separately once the order is completed
Did you have a chance to read the doc that I sent to you earlier?
yes i am going through that, i think that will work.
thank you for the help
How can i add PaymentIntentService to SessionCreateOptions
I don't understand this question, do you have a code to share?
var options = new SessionCreateOptions
{
LineItems = new List<SessionLineItemOptions>
{
new SessionLineItemOptions
{
// Provide the exact Price ID (for example, pr_1234) of the product you want to sell
Price = intent.Id,
Quantity = 1,
},
},
Mode = "payment",
SuccessUrl = domain + "WebForm1.aspx?test=123",
CancelUrl = domain + "cancel.aspx",
};
i have created the intent service but after that how can i redirect to stripe
Why are you using SessionCreateOptions? I though we are talking about PaymentIntents API?
I'd suggest you to use the example code in the doc I sent to you earlier to get started.
after PaymentIntentService creation what should be the next step
i mean how can i redirect to stipe page?
You don't need to redirect to Stripe page, you can use Stripe.js to render a payment element to collect the payment (https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-collect-payment-details)
Or do you prefer to use Stripe checkout for auth and capture?
we prefer stripe checkout, can we do that?
Sure, you can set the payment_intent_data.capture_method to manual (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-capture_method) when creating a checkout session.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You can then call the PaymentIntents capture API to capture the PaymentIntent that created in the checkout session.