#Abishek
1 messages · Page 1 of 1 (latest)
so, I am building a custom integration and I wanted to see if as a guest user, some one can sign up to a subscription. If they created an account, then I would create them as a Stripe Customer, but if they just signup with just the email, I would still like to sign them up for the subscription
let me know if it makes sense
Hi there. Taking over for bismarck
So you want them to be able to sign up for a subscription even if they don't have an account in your system and all they have provided is their email? Is that correct?
Yeah so you can do that. You'll just need to create a stripe customer object with their email
See customer is required: https://stripe.com/docs/api/subscriptions/create#create_subscription-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So you can create that via the api as well: https://stripe.com/docs/api/customers/create#create_customer-email
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok, so how would it work, if I was using Stripe Link?
because Stripe Link requires only a PaymentIntent
Not sure the question. Can you elaborate on what's confusing?
PaymentIntents are for 1-time payments
On the custom integration, I want make use of Stripe Link to pay for a users subscription. So if they already have a payment method setup on link, they can use that and make the payment for the subscription
So, that brings me to my next question - Can Stripe Link work with Setup Intents
I am using this example https://stripe.com/docs/payments/link/accept-a-payment
Wait you just went from Subscriptions to SetupIntents
Why are you using SetupIntents?
Setup Payment Method (using Stripe Link) -> Setup Customer -> Create Subscription -> Charge Customer for Subscription
But the setupintent is unnecessary. Why not just create the subscription and collect payment method there?
doesn't creating a Subscription require a customer object?
Yeah. You can create a customer object without first collecting any payment or anything though
I am just trying to figure out how to get the guest checkout possible
I understand. But using SetupIntents isn't recommended with Subscriptions
The recommended flow is what I linked above
If you read that doc, you'll understand things better
with the above approach you suggested, can I setup to store the payment method of the customer?
ok and in this flow, can I use Stripe Link?
Yeah
No problem
I was just going through the docs from the above link. There is also the option to create an invoice for the subscription instead of create a customer and use the payment intent from the invoice to process the payment. That would also work for the seamless flow I was talking above right?
Not sure what you mean. The Subscription Invoice's payment intent is what's used to collect payment info in elements
You still need customer object
It requires a customer
You're misinterpreting it
Creating a subscription requires you pass a customer
Marked as required in our api spec: https://stripe.com/docs/api/subscriptions/create#create_subscription-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok, because from the diagram about, it feels like from Subsription, I can go to invoicing, but I understand what you are saying. the good thing about invoice is that I get a receipt PDF, which is great
Read the guide I shared earlier in full. Subscriptions do have invoices