#zuberpatel
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- zuberpatel, 22 hours ago, 3 messages
- zuberpatel, 1 day ago, 5 messages
hi! not sure what your specific question is, could you elaborate?
I have created setup checkout for customer and using that customer creating an subscription from admin
don't do that, just create amode:subscriptionCheckout instead ๐
I can't my requirement is store user payment details and once admin approve then it will start subscription
is the customer present at the time when you create the subscription, are they on your website?
Yes So customer will register for product with all required details.
With that information we create customer on stripe and take payment details using checkut API with mode=setup to store payment information.
After that it will notify admin and admin will login to system and approve or reject.
If approved then it will start subscription.
???
hmm. And where is the customer when the admin is checking this? What if it takes the Admin hours to check, or the user signs up at night and the Admin checks 8 hours later?
Ultimately here is your answer:
- if the customer is not present on your site at the time you create the Subscription, you can pass
'off_session'=>'true'https://stripe.com/docs/api/subscriptions/create#create_subscription-off_session and that might exempt the payment from 3D Secure. - if the customer is present, then the code you showed is correct, and you need to handle 3D Secure on that initial subscription payment so the subscription moves from incomplete to active. https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
@vagrant locust do not post "???" like that please and have patience and respect.
Yes customer wouldn't be present at the time of admin approval?
This customer has no attached payment source or default payment method. Please consider adding a default payment method. For more information, visit https://stripe.com/docs/billing/subscriptions/payment-methods-setting#payment-method-priority.
can I help you with a specific question?
$subscription = $stripe->subscriptions->create([
'customer' => $custmerData['customer'],
'items' => [[
'price' => $productPriceId->price_id,
]],
'off_session' => 'true',
]);
When I tried to start subscription with off session it gives me above error.
the error explains the solution I think โ you need to provide a payment method to charge. Did you read the link in the error message? ๐
Yes I did but I am afraid I didnt get that
what specifically can I clarify?
how can I add a default payment method.