#maxime_api

1 messages · Page 1 of 1 (latest)

carmine roseBOT
#

đź‘‹ Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1240048364716949585

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

frozen shard
#

Hi there!

#

So just to be clear, you want to set an invoice footer but do so via the API so the footer is "dynamic" per invoice?

plucky hamlet
#

Hi

#

It will be the same footer for all the invoices linked to the subscription

#

But "dynamic" per subscription (based on client type)

#

I was trying to replicate the payload sent by the Stripe's UI

#

But unfortunately the invoice_settings.footer parameter seems to be invalid on my side

#

This is the payload sent by Stripe's UI (req_yJTDfG2b60rzHe) :

{
  "invoice_settings": {
    "footer": "Entreprises hors France : Exonération de TVA en application de l’article 262 I, 1° du CGI"
  },
  "default_payment_method": "pm_1PGJvvKoWdWpF648sQU3PS7L",
  "automatic_tax": {
    "enabled": "true"
  },
  "currency": "eur",
  "customer": "cus_Q6WmjTx3KDyFTd",
  "items": {
    "0": {
      "quantity": "1",
      "price": "price_1PGJlEKoWdWpF648zANGTZSP"
    }
  },
  "enable_incomplete_payments": "false",
  "off_session": "true"
}```

This is the payload sent by me to the API (req_AsdIBTs4Ilg5RK) :

{
"invoice_settings": {
"footer": "Entreprises hors France : Exonération de TVA en application de l’article 262 I, 1° du CGI"
},
"default_tax_rates": {
"0": "txr_1PGKjXKoWdWpF648gUFoAWFz"
},
"default_payment_method": "pm_1PGJvvKoWdWpF648sQU3PS7L",
"automatic_tax": {
"enabled": "false"
},
"currency": "EUR",
"collection_method": "charge_automatically",
"customer": "cus_Q6WmjTx3KDyFTd",
"items": {
"0": {
"quantity": "1",
"price": "price_1PGJlEKoWdWpF64830GZgZ76"
}
}
}````

And in this case I got the error : "Received unknown parameter: invoice_settings[footer]".

frozen shard
#

Gotcha, okay. Not every endpoint used by the Dashboard is available via the API, unfortunately

#

In this case, in order to programmatically set an invoice footer that's separate from the one configured in the Dashboard, you'll need to update footer on an Invoice object directly. It's not possible to do at the Subscription level

plucky hamlet
#

In the context of a monthly subscription, will I have to patch each invoice then?

frozen shard
#

Yes. The first invoice of a subscription is special as this is automatically finalized on subscription creation (unless you use a trial or subscription schedule)

plucky hamlet
#

The main idea of this footer was to add a clarification regarding the VAT applied because we have our own business rules (electric mobility). Since this cannot be done programmatically, I have another question regarding Tax Rates. Should I make a separate request, or can I ask my question here?

frozen shard
#

You can ask here!

plucky hamlet
#

My question concerns the topic "Tax exempt and reverse charge." From what I've read in the documentation (https://docs.stripe.com/billing/taxes/tax-rates#tax-exempt-and-reverse-charge), it seems that this applies directly to the customer and not to a specific invoice.

In our use cases, a customer may be exempt from VAT for a certain type of product but not for another. Therefore, if I apply the exemption globally, it might be wrongly applied to other invoices.

Is it possible to exempt a tax directly at the creation of a subscription for a given user rather than specifying it globally at the user level?

frozen shard
#

Sorry for the delay. I don't think this is possible but give me a few more minutes

plucky hamlet
#

No worries !

frozen shard
#

No, looks like this isn't possible

plucky hamlet
#

Thanks a lot for taking the time to look at and answer all my questions. I really appreciate your help !