#arilks_api
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/1450860695569825948
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Do you have to collect shipping?
I don't quite understand what you mean. The addresses for "Bill to" and "Ship to" were filled in by me through the "Customers -> Create" interface. Can I hide the "Ship to" address?
If you don't collect a shipping address then ship to won't be populated
Otherwise it will
So that's why I asked if you have to collect shipping for your integration
$stripe = new StripeClient(config('services.stripe.secret'));
$invoice = $stripe->invoices->create([
'customer' => 'cus_TcHcznKWD7hQmD',
'collection_method' => 'charge_automatically',
]);
$stripe->invoiceItems->create([
'customer' => 'cus_TcHcznKWD7hQmD',
'invoice' => $invoice->id,
'description' => 'Diamond 服務費 / 年',
'amount' => 128888,
'currency' => 'eur',
]);
$invoice = $stripe->invoices->finalizeInvoice($invoice->id);
$invoice = $stripe->invoices->pay($invoice->id, [
'paid_out_of_band' => true
]);
Can I send you the code?
The issue is you passed a shipping address when creating the customer
So if all you need is billing address, then just populate that
Okay, I'll try handling it in invoiceItems->create.
What do you mean
When creating a user, is it okay to leave the address blank and set it through the /v1/invoices interface?
Yes
The "Ship to" option means the address you filled in will definitely appear on the PDF, right?
If you populate shipping address on either the invoice or the customer, then ship to will always be included on the pdf
However, if you only populate billing address on the customer or invoice, then ship to will not appear
Okay, okay, I understand. The marked address will definitely be displayed after I fill in the address.