#rups
1 messages ยท Page 1 of 1 (latest)
Hello
Sure, what's your question?
Not sure what you're showing me
user can buy both plan at a one place. one is subscription plan and other one is one time pay.
I need to understand, how I will handle this.
for individual - one time payment
as if I create payment intent and got client secret key, and pass to confirmpayment + get 3d secure and payment success
but what about subscription and individual both are there
You can add an item to the initial invoice that is generated by the subscription to account for the one-time payment
Otherwise, just use Checkout which handles this automatically
checkout session is not outdate right?
does 3d secure works in above with checkout session?
Yup, it supports 3DS by default
can you pass me exact step?
so my question is when to use checkout session?
You'd use Checkout instead of the direct API calls to the Subscription/Payment Intents endpoints
So have some UI in your app that allows users to select the items they want to puchase recurring/one-time items, then create a session with line items that represent that
im repeating what i understand here is
if my requirement is subscription + one time payment case in such case I should use checkout session
right?
so checkout session give me both option with single payment.
It's the simplest integration for that kind of payment flow, yes. Otherwise as I explained you can use the Subscriptions API directly with your recurring items, and then add an item to the initial invoice generated by the subscription for any one-time payments
It's the simplest integration for that kind of payment flow, yes. Otherwise as I explained you can use the Subscriptions API directly with your recurring items, and then add an item to the initial invoice generated by the subscription for any one-time payments
=> any link to use this?
๐ taking over for my colleague. Let me catch up.
ok
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 need to add one time payment product to subscription
$stripe->subscriptions->create([
'customer' => '{{CUSTOMER_ID}}',
'items' => [['price' => '{{RECURRING_PRICE_ID}}']],
'add_invoice_items' => [['price' => '{{PRICE_ID}}']],
'payment_behavior' => 'default_incomplete',
]);
this command give me error
"The price specified is set to type=one_time but this field only accepts prices with type=recurring."
it give me above error
customer id = cus_OiiXGFFscV3PKc
are you there?
would you mind sharing the request ID that failed?
req_JzzE6yjcXQuHnq
taking a look
ok
in items you need to pass in the recurring price