#akshit_quizizz

1 messages ยท Page 1 of 1 (latest)

stray solarBOT
uneven spear
#

Hi! Let me help you with this.

#

Could you please share the invoice where you don't see the currency?

hollow axle
#

I'm sorry... essentially want to show a custom field on the invoice . Like we have created a price for a specific country... so we want to show that country specifically on the invoice.

Is that possible?

uneven spear
hollow axle
#

no, but how can I set custom fields for invoice while creating checkout session?
Coz in this case, we'll be having dynamic value for the custom field depending on the price/product

bronze relic
#

๐Ÿ‘‹ stepping in

#

Hmm don't believe this is possible

#

Let me double check

#

Ah I'm wrong!

hollow axle
#

cool... let me try it

#

not working ๐Ÿ˜ฆ
The mode that we're using in our use case is subscription.

And it is not allowing me to enable invoice_creation for that.

Throwing error:

    route: "/payment/create-session"
    type: "StripeInvalidRequestError"
    message: "Unkown error"
    cause: "Error: You can only enable invoice creation when `mode` is set to `payment`. Invoices are created automatically when `mode` is set to `subscription`, and are unsupported when set to `setup`. To learn more visit https://stripe.com/docs/payments/checkout/post-payment-invoices.\n    at Function.generate (/Users/akshit/ui_repos/quizizz/node_modules/stripe/lib/Error.js:39:16)\n    at IncomingMessage.<anonymous> (/Users/akshit/ui_repos/quizizz/node_modules/stripe/lib/StripeResource.js:175:33)\n    at Object.onceWrapper (events.js:519:28)\n    at IncomingMessage.emit (events.js:412:35)\n    at IncomingMessage.emit (domain.js:475:12)\n    at endReadableNT (internal/streams/readable.js:1333:12)\n    at processTicksAndRejections (internal/process/task_queues.js:82:21)"```
bronze relic
#

Ah didn't realize this was for Subscription mode. custom_fields aren't supported on Subscriptions at all.

#

They are only supported for one-off Invoices

hollow axle
#

Any other workaround for it?

Our requirement is to display a certain text on the invoice saying "Country of product": "some_country".

This country is dynamic. For few cases it will be something, and for other it will be something else.

How can this be achieved?

bronze relic
#

When starting a Subscription via Checkout this isn't really possible at the moment. Like you can update the Invoices individually based on a Webhook after the first Invoice since there will be an hour until they finalize. But the initial Invoice finalizes immediately so you can't set a custom field on that first Invoice

hollow axle
#

ok. thanks for your help!