#espagnol01 - subscription zapier
1 messages · Page 1 of 1 (latest)
With that being said:
Case 1: 1 time payment (old solution)
If initial price = 0 And monthly price after initial term is > 0
Create a customer in Stripe (Zapier Native Integration)
a. Name:
b. Email:
c. Description:
d. Billing Address:
e. Billing City:
f. Billing State:
g. Billing ZIP:
h. Billing Country:
i. Language: en
j. Credit Balance: “initial price”
(This is pretty straight forward)Create Product in Stripe (Zapier Native Integration)
a. Name: “Internal Campaign Name”
b. Description: “Name BB”
c. Tax Code: “txcd_10010001”
(Do we need to create a product every time? Does this means that we are going to end up with the same amount of products as the amount of customers in our database? Should we add a “find product” step in between? How many products can we have in our database? In reality, we have around 21 products in our database. This number may increase to around 40)Create Price in Stripe (Zapier Native Integration)
a. Product: “output_id from step 2”
b. Price: “initial price”
c. Currency: “GBP”
d. Recurring or One Time: One Time
e. Tax Behavior: Inclusive
(Is there another way to do this? Usually the prices are always the same.Create an Invoice (API)
a. Collection_method: “send_invoice”
b. Customer: “output_id from step 1”
c. Days_until_due: “30”
d. Description: “Service Campaign Name”
e. Pending_invoice_items_behavior: “exclude”
f.Create an Invoice Item (API)
a. Customer: “output_id from step 1”
b. Description: “1 time payment”
c. Invoice: “output_id from step 4”
d. Price: “output_id from step 3”
e. Currency: “GBP”
f. Quantity: 1Finalize Invoice (send to customer)
a. POST to https://api.stripe.com/v1/(output_id from step 4)/finalize
Quoting here for context. That's a lot of text
so, I found this link https://support.stripe.com/questions/add-a-one-time-fee-or-discount-with-a-new-subscription-plan
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
and basically, I need some help figuring out how can I achieve this
is it possible to share my zap with you guys so that you can double check it? Because, for example, I am not receiving the invoice, I need to save the payment information, and overall I am adding parameters that may be duplicated but I dont really understand how the whole thing works
I'm sorry this is a lot of information. Give me a minute to read through it
Okay so my first question is, are you writing code and/or hitting Stripe APIs directly?
for the first part (create customer, create product, create price) i am using Stripe Native integration for Zapier
for creating an invoice, invoice item and finalize I am using Zapier Webhooks that can do POST
I'm not familiar with any Zapier integrations. If you aren't writing your own code to perform these actions I may not be able to offer much advice. I am still trying to understand what your question is though
i believe that in the background, the stripe integration is using Python to create the customer, product and price
I have 2 questions
No Stripe isn't using Python
The Zapier integration may be but my advice would have to do with writing that Python code
- For some reason, the invoice is not being sent automatically
- My subscription is not being send to the customer and it gets cancelled automatically
Do you have an invoice number I can examine?
yes
it'll start with inv_
I have created 2 customers with my own information
an ID, I should say
pi_3M9dbCKavdtumQQG0UfGMby6
that is the subscription that i created
using this flow:
That isn't a subscription. It's a payment intent
i did it using the stripe integration and it says subscription, but I understand that maybe it is doing something else.
Taking a look at it
ah you are right. maybe I copied it wrong
would it be this one? in_1M9dbhKavdtumQQG3TRRdpUS
Okay that's an invoice so we are getting closer
can I give you my customer id instead?
so that you can see the invoices attach to it?
cus_MtQKM3U26iKty5
this is the customer that was created based on the subscription flow
This invoice was set to be manually captured. It hasn't been attempted because you need to manually trigger it to send the invoice to the customer
That may be something the Zapier integration is supposed to do but it does not appear to be triggered
can I do an api call to send it?
Yes we have an API for that here: https://stripe.com/docs/api/invoices/send
Wait, that invoice is in a Draft state
I don't think your integration is properly moving the invoice along
maybe I am doing something wrong
You can review the statuses the invoice is supposed to move through here: https://stripe.com/docs/invoicing/overview
This may be a good place to start
i have been all over this
I tried to do as much as I could by myself
i am creating the customer without a problem
then I am creating a product
then the price
and finally, the subscription
i am going to delete the customers and run it again
Here is the request that creates the subscription: https://dashboard.stripe.com/logs/req_2vkJnPHg6MVBYY
to see exactly what is going on
can I test it from scratch? so that you can see a clear log?
I don't know that it will help
now
there should be a new customer
cus_MtRTAxMETh3hdq
a new product: prod_MtRTto7zNk9Imc
a new price: price_1M9eb8KavdtumQQGMLi94LWd
is this correct?
None of those are the issue here. I am trying to understand why we don't send the invoice
I'm sorry to say I don't know whether that is correct or not. I have never used that interface.
espagnol01 - subscription zapier
Wait....
In this case the invoice will remain in a draft state for 1 hour to allow you to make changes. It will transition and send after that time is up
So I think you just need to wait in order to test this
We don't keep threads open but you can come back and ask a new question and we'll be happy to help
and 1 quick question before you go. Once the customer pays, will it save the payments details so that the next invoices get pay automatically?
or do I need to pass a parameter to store the payment details? or does it depends on the customer if he wants to store his details?
👋 Taking over this thread, catching up now
If payment_settings.save_default_payment_method [0] is set to on_subscription, the collected payment methods will be set as default payment method for the subscription and charged automatically for future invoices for this subscription.
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, this is something that i need to specify when I create the subscription right?
another question: when creating a subscription, is it expecting the price_item as the item? or is it the product?
so, this is something that i need to specify when I create the subscription right?
Yes
another question: when creating a subscription, is it expecting the price_item as the item? or is it the product?
It's expecting a price. You may refer to the subscription integration doc here:
- Subscription integration guide: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
- Pricing model: https://stripe.com/docs/products-prices/pricing-models
do you know if I can pass the parameter as metadata?
If the parameter is for your own internal reference, it can be set as a metadata. If it's for functional usage in Stripe such as saving a payment method on a subscription, it can't be set as a metadata
I understand. Thank you.
No problem! Happy to help 😄
i need to enable bacs. Do I need to pass this on the invoice creation and subscription creation?
hi @willow briar. I followed your advise and I created an API call instead to create an invoice
this are the parameters:
Do I need to pass this on the invoice creation and subscription creation?
You may serpayment_settings.payment_method_typeswith['bacs_debit']
the invoice is showing as incomplete
the email was not send automatically
si I did another API to send the invoice
but there are no payment methods
no bacs nor card
Could you share the subscription ID?
in_1M9fsxKavdtumQQGyYA7tfHq
and it seems that payment_method_options was not saved
In test mode, email will not be sent. I'm checking why invoice doesn't have any payment methods displayed
I am using the live mode
Oh sorry my bad! Based on the history, the invoice email was sent to the customer's email address on Nov 30th 2022 2:19:38 am UTC
hmm
ok
let me try again
i think it is this one: sub_1M9fsxKavdtumQQGl5hwkfU4
I have a problem with this one
it is not sending the email automatically
i think it works now
but i cannot see the bacs
only card
and gpay
i just created a new one: sub_1M9gKCKavdtumQQG30fsy8NU
no, i dont get the email after creating a subscription
Which subscription should I look into and what the problem it is? Email not sent or BACS not showing?
email not being send after creating the subscription
i can see that bacs is enabled but it does not show for me when I am trying to pay
i believe that it could be related to the location. I am preparing this flow to be deployed in UK but I am currently in Sweden
could that be the reason?
The invoice (in_1M9gKCKavdtumQQGlskM1G5r) of sub_1M9gKCKavdtumQQG30fsy8NU is not sent because it is still in draft status. Email will only sent after the invoice is finalised
do I have to finalize or send?
Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
Ref: https://stripe.com/docs/api/invoices/send
With subscription, invoice will be sent automatically after the invoice is finalized after an hour of invoice creation.
I have a check why BACS is not shown. Your subscription is created via Zapier and Zapier controls the supported payment methods. BACS is not enabled by Zapier.
Yup! Zapier's payment method settings will take precedence over your settings: https://dashboard.stripe.com/settings/payment_methods
Zapier has to enable BACS for your account first, then your payment method settings will work.
Yup! I'd recommend reaching out to Zapier support to enable BACS if you wish to support BACS as part of integration.
No problem! Happy to help 😄
i finally feel like I am getting closer
Yay! Feel free to reach out to us if you have further questions 😄
Have a good night to you as well!