#GRINGO

1 messages · Page 1 of 1 (latest)

worn yarrowBOT
twilit pollen
serene geode
#

this is with subscription

#

isn't*

twilit pollen
#

Why not accept the Shipping address when you accept payment?

serene geode
#

I quote the shipping value in my backend

#

and I have my own address form

#

but I don't know how to add the shipping price

#

to the users subscription

#

this is how I doing that

#

but if the user don't pay the subscription he is creating, it stays active

twilit pollen
#

For context, Subscriptions don't have shipping address on them. Only the Payment Intents and Customers do (both are used with Subscriptions), so if you don't accept it during the payment stage of the process, then you would need to store the address on the Customer object: https://stripe.com/docs/api/customers/create#create_customer-address

serene geode
#

I tried that, but it doesn't work in subscription creation

#

i don't need to store the shipping address, I need to add the shipping price to my subscription invoice

twilit pollen
#

What you're talking about are Shipping Rates. These don't have an address on them, so I can only assume you're talking about something totally different from what you asked in your original question

#

Are you following a guide?

serene geode
#

sorry if I was not clear

#

lets restart

#

my app has stripe payments for one year

#

we are developing it native on iOS and using javascript on the backend

#

but right now we are creating a new subscription

#

that has shipping

#

but we quote the shipping price on the checkout and it is different for every user

#

so I need to add this shipping value to my subscription

#

this is related to what I need

twilit pollen
#

You have to use either Stripe Checkout or Orders to create/use Shipping Rates: https://stripe.com/docs/api/shipping_rates

The solution in the StackOverflow question you mentioned does not use Shipping Rates. You would need to create a separate Invoice Item that represents your shipping costs if you want to have a quote for your client before they pay

serene geode
#

i think that for mobile isn't possible to use Order or Checkout

#

yes, that answer is exactly what I do

#

but my problem is, I was testing this method

#

and I was going to to checkout, and it created the subscription and the invoice item, all right

#

but if I already have a subscription, and didn't finish this flow that created that new invoice item, this invoice item appear on my active subscription

twilit pollen
serene geode
#

yes, but i can't identify that the user didn't finish the subscription :/

#

because he can just kill the app

#

so I don't know when to delete this invoice item

#

I was wondering if there's a way to create a subscription for the user and it create the invoice as draft, so I could add the invoiceItem for this invoice only

twilit pollen
serene geode
#

ok, so that way I need to delete the invoiceItem I created before?

#

would be so much easy if I could create the item after the subscription creation, so I could related them

twilit pollen
#

With Upcoming Invoices, you don't need to delete anything, since it doesn't change anything on the Subscription

serene geode
#

hahaha

#

hmmm, so I don't get what to do

#

ahahahah

twilit pollen
#

So, you said your problem is that your Customer may not approve the new Invoice Item right? So in that case, you need to just create a new Invoice Item to use for the active Subscription, then pass that Invoice Item into the Upcoming Invoice API (https://stripe.com/docs/api/invoices/upcoming#upcoming_invoice-invoice_items), which will give you information about what will happen to the Subscription if you actually add the Invoice Item to the Subscription "for real".

It's the same as creating a fake Invoice to see what the numbers are. If the Customer chooses to add it to the Subscription, then you add the Invoice Item to the Subscription. If the Customer chooses not to, then you do nothing.

serene geode
#

No no

#

thats not my problem

#

I'm a customer, and I subscribe for the Health Insurance for pets, ok?

#

now I'm navigating in the app, and I saw this new subscription, I go to the checkout, to see the price, quote the shipping, and was ready to purchase

#

in the backend, I already created a new subscription and the invoiceItem for the shipping

#

so the user doesn't finish the payment of the new subscription

#

and it canceled automatically in 2 days

#

but this invoice Item stays active and appears on my health insurance subscription

twilit pollen
#

I have no idea what the difference is between what you just asked and what you asked before. I would recommend working with our support folks. They can help you in your specified language and hopefully get to the bottom of what's going wrong: https://support.stripe.com/contact

serene geode
#

haah

#

ok, thanks for trying to understand

#

my main question was replied, theres no official way to add shipping to subscription, so I need to do some extra codes to support it