#Mytras
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
It depends, could you please share a subscription ID sub_xxx so I could take a closer look
I see collection_method: "send_invoice", in this case yes, an invoice will be sent.
However, this means that the customer will not be automatically charged.
does that mean that everymonth the customer will receive an invoice?
or that only for the first invoice?
Yes, every cycle, in your case, every month.
so every month they will receive an invoice to pay
mmhh
that is not what i wanted
for subs i wanted the customer to be automatically charged after the first payment
I would I do that?
Then you need to set collection_method: "charge_automatically" when creating a Subscription: https://stripe.com/docs/api/subscriptions/object#subscription_object-collection_method
i thought about that, but how the first payment will be done?
most of our customers will be new on the Stripe database
so there will not be a registered payment method
that is why i thought to use collection_method: "send_invoice"
You can follow this guide to collect to build a basic subscription integration, it will take you through creating a subscription for a customer and collecting and saving a payment method, you can either use Stripe Checkout (a hosted page), or use Payment Element on your own website: https://stripe.com/docs/billing/subscriptions/build-subscriptions
is there a way to do through API since I am creating everything via zpaier`?
with everything i mean the whole automated flow
zapier*
You can create a Checkout Session via API from this step: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=checkout#create-session
You can then grab the Checkout Session URL from the response and send it to the customer via email, for example: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-url
to create the check out session should I follow the step 3 and 4?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
if i follow the link I sent you, am I supposed to also setup the parameter collection_method?
also in the "create session" API is mentioned the paramenter "customer_creation", I create a customer in stripe in the moment that they are registered in our website
following the link I sent you, will I double the customer?
No, you can pass the your existing customer ID
also the Company I am setting up this for does not have a success_url or cancel_url, since they do not sell on their websites
How would that work in my case? does Stripe have hostes success and canel urls?
charge_automatically is set by default
hosted* cancel*
No, you will have to point it to something else.
mmh
is there another way to do this?
because the company wanted something fast and easy
If you are looking for a no-code solution, you can use Payment Links, this is like Checkout Sessions but one link for everyone: https://stripe.com/docs/no-code/payment-links
- No code
- Hosted success page
- A customer is newly create every time
i thought so
that was my first approach to it
one question
if I send a customer an invoice for the first cycle of the sub can I store the payment method and later on charged them automatically on the payment method stored?
What you can do, you can create a subscription with send_invoice, and then update the subscription with charge_automatically. You need to set "payment_settings.save_default_payment_method": "on_subscription": https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_settings-save_default_payment_method
You can listen to invoice_paid event to know when to trigger the update: https://stripe.com/docs/api/events/types#event_types-invoice.paid
give me a moment to read this
In order:
- Create a subscription with
collection_method: "send_invoice"andpayment_settings.save_default_payment_method: "on_subscription". - The customer gets an email and pays the first invoice. The payment method gets saved.
invoice.paidevents is sent.- You update the subscription with
collection_method: "send_invoice". - The customer is charged automatically on next cycles with saved payment method.
once I update the subscription will the customer be notified?
No
so it will be better to specify in the payment description that from the next payment on it will be automatically
Yes, it's good to be transparent with the customer
Tips and tricks: You can use Test Clocks to test your subscription integration over time:
https://stripe.com/docs/billing/testing/test-clocks
Happy to help. Let me know if you have any other questions.