#rups

1 messages ยท Page 1 of 1 (latest)

dull prismBOT
hushed lark
#

Hello

rare laurel
#

hi

#

I need support on stripe integration

hushed lark
#

Sure, what's your question?

rare laurel
#

hi

#

anyone here to help me out?

hushed lark
#

Not sure what you're showing me

rare laurel
#

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

hushed lark
#

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

rare laurel
#

checkout session is not outdate right?

hushed lark
rare laurel
#

does 3d secure works in above with checkout session?

hushed lark
#

Yup, it supports 3DS by default

rare laurel
#

can you pass me exact step?

hushed lark
rare laurel
#

so my question is when to use checkout session?

hushed lark
#

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

rare laurel
#

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.

hushed lark
#

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

dull prismBOT
rare laurel
#

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?

restive heron
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

rare laurel
#

ok

restive heron
rare laurel
#

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?

restive heron
#

would you mind sharing the request ID that failed?

rare laurel
#

req_JzzE6yjcXQuHnq

restive heron
#

taking a look

rare laurel
#

ok

restive heron
#

in items you need to pass in the recurring price