#refikimi_docs
1 messages ¡ Page 1 of 1 (latest)
đ 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/1288786860415385621
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
this is where I want the tax ID to be
Hmm, the customer tax ID should render there automatically? https://docs.stripe.com/invoicing/global-config-guide#key-invoice-fields
I tried adding it to the Address details in the customer settings page but it is between the Address and City name
but it does not
Got an example in_xxx?
in_1Ps0hfHzzIMXxbBCbZRiyU0N
it renders the TAX ID which I added into the address field
To be clear, which tax ID do you want to render? The customer tax ID or your account tax ID?
OK, let me take a look
thank you a lot
Looks like you created the invoice on 2024-08-26 (a month ago), yes? Tax IDs were only added to the customer ~today so it won't reflect on the invoice now as it's finalized
You'd need to create a new invoice and the IDs should appear
ahh I see, thank you
and how can I change the current invoice?
so that when the customer clicks and downloads the PDF he has the TAX ID there
Can I somehow create a new invoice with this TAX ID, without refunding and charging them again?
You can't they're immutable once finalized
You could create a new invoice and mark it paid_out_of_band I guess: https://docs.stripe.com/api/invoices/pay#pay_invoice-paid_out_of_band
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Then no payment is required, but you have a new invoice PDF with the tax ID
So I use the stripe API import stripe
stripe.api_key = "sk_test_51KWNmwHzzIMXxbBCVGtLqIuyKkAiEpcMGw437vMmaf9WMwGFwt9ragbGuEE29TEgXwU0D8bS5l2KfHNTJ2LWb8nr003K52RSVr"
stripe.Invoice.pay("in_1MtGmCLkdIwHu7ix6PgS6g8S")
and give it the invoice_id and I set the paramtere to true
stripe.Invoice.pay("in_1MtGmCLkdIwHu7ix6PgS6g8S", paid_out_f_band=True)
Yep
let me try, thank you, and will the old invoice be deleted?
It will not no
ok just let me test it on our test
I get this error:
stripe._error.InvalidRequestError: Request req_Wrscqd1zP7mjFh: Received unknown parameter: paid_out_f_band. Did you mean paid_out_of_band?
and my command was:
stripe.Invoice.pay("in_1Q3E9wHzzIMXxbBCakTeiCjx", paid_out_f_band=True)
oh I see I made a type
*typo
OK I get an error, that the invoice was already paid:
stripe._error.InvalidRequestError: Request req_C0u6Oah8j54T8I: Invoice is already paid
Yes, because it was generated and paid via a subscription automatically
You'd need to create and finalize the invoice separately: https://docs.stripe.com/api/invoices/create
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 I could create a new invoice in stripe, as a draft, and then use the previous command and mark it as paid, but the customer will have two invoices in the payment history list, right?
Yes, exactly. Unavoidable in this scenario unfortunately
But the 2nd 'paid out of band' woudn't need an actual payment
so basically when I create it in the dashboard:
it gets automatically charged from the test card, and I want to avoid that, so that I could use the API to ping afterwards
or is it possible to create a draft invoice here without it being sent automatically
use the API to ping afterwards
You mean to send it to the customer?
no, use the API to mark it as paid stripe.Invoice.pay("in_1Q3E9wHzzIMXxbBCakTeiCjx", paid_out_of_band=True)
basically I need to add the TAX ID on an invoice that was added later and after the invoice was paid
Normally an Invoice is created in draft state and you need to manually finalize it and then send it/charge customer automatically.
After the Invoice is finalized you can't really modify it.
but when I did it here through the dashboard, it was paid automatically from the test card
If you don't select "Autocharge customer" it shouldn't be paid automatically...
let me try, I think I did that but let me confirm
ok when I pressed on the X, it was in a draft mode
and I sent the request
and it is marked as paid, can I be sure that the customer's credit card won't be charged?
No actions will take place if its mark as paid.
so the customer will not be charged but it will be marked as paid
Correct
thank you Vanya