#jointflowsftw-payments
1 messages · Page 1 of 1 (latest)
the customers are given a page (Checkout ?) where they can choose their plan/subscription with monthly or yearly subscriptions
sounds good! Stripe doesn't have a drop in UI for that, it's something you'd build(a flow on your site where you ask the customer what they want to subscribe to, and then you pass the selected details to Checkout for example to start the subscription).
when a customer pays, we just need to update their Client profile in our backend and we were thinking to use a webhook?
sure, you'd usecheckout.session.completed
so far this is just https://stripe.com/docs/billing/quickstart
- do checkout/webhook seem to be the correct path for this implementation?
yes- what events would you use in the webhook to update a customer profile. I need to update the paid_until field
checkout.session.completed, then make some API calls to look at the relatedsubscriptionobject, which has acurrent_period_endfor your "paid until"- how do you 100% match stripe customer with our backend customer? should we create a customer in our backend and then pass Checkout some data ? This is to know in the webhook which backend customer paid. We can also consider creation of backend customer fronm stripe customer on payment but we need some specific information, and we probably can't customize Checkout with form fields?
you can use metadata yes https://stripe.com/docs/api/metadata . Or create a customer object in Stripe and then assign that to the CheckoutSession when created (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer) . There's a few ways. And no you can't customise Checkout to ask for anything extra.- do we need in accounts just our own bank account to receive money ?
as far as I understand your question ,yes
Thank you!!
Not sure how to answer "inline" but:
"sounds good! Stripe doesn't have a drop in UI for that, it's something you'd build(a flow on your site where you ask the customer what they want to subscribe to, and then you pass the selected details to Checkout for example to start the subscription). "
=> what about this? : https://checkout.stripe.dev/configure
-
-
- => great, and thanks for the links! Makes sense so far
"4. do we need in accounts just our own bank account to receive money ?
as far as I understand your question ,yes"
=> this is to understand the data I need to setup in the stripe dashboard to test the whole thing.
Right now testing with the stripe CLI + stripe listen forward localhost + webhook backend + $ ./stripe.exe trigger payment_intent.succeeded --stripe-account acct_1KW0...
That throws an error, because my account is just a test account and isn't activated. But I'll try checkout.session.completed instead or get someone to create the account properly
- => great, and thanks for the links! Makes sense so far
-
=> what about this? : https://checkout.stripe.dev/configure
yep, that's Checkout! it handles the payment, but you have to tell it what to charge for.
so you have to build the page that asks the customer what they're subscribing to and then you call the Checkout API to pass the appropriate references to the pricing plans to use.
That throws an error, because my account is just a test account and isn't activated
what was the exact error message?
you shouldn't need to be activated to test this.
- I see! Thought you could build a landing pages with a few products but the products are sent in the checkout session? Like this? :
https://stripe.com/docs/billing/subscriptions/build-subscription?ui=checkout - "message": "Your account cannot currently make charges. To find out why charge creation is currently disabled, look at the
requirements.disabled_reasonproperty on this account (/v1/accounts/acct_1KW0bRRLRLISxlZz).",
And in the dashboard:
"Activate this account
Add or correct some of their account details so they can use Stripe.
Card payments, payouts and transfers are disabled for this account until a business type is added.
Card payments, payouts and transfers are disabled for this account until missing business information is updated."
yeah that is not related to being activated, even in test mode you have to finish onboarding a Connect account.
so for Express(what that connected account is), the way it works is you would create the account, then redirect to an account link(https://stripe.com/docs/connect/express-accounts#create-link step 3, onwards), and then provide onboarding info in those pages (in test mode you would enter the information from https://stripe.com/docs/connect/testing#identity-and-address-verification- like DOB : 1/1/1901 and address : "address_full_match, London, UK" etc).
so you should focus on that part(creating and onboarding the Stripe Express account first), since you can't do payments with Checkout or anything until you resolve that.
I have to run but my colleague @clear grove can help
thanks Karl
Hey @clear grove ! Do I actually need a connected account for my customers to pay me using subscriptions?