#femina-agravat_code
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/1240224432006496316
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Are you looking for this field?
https://docs.stripe.com/api/invoices/object#invoice_object-hosted_invoice_url
Let me check
I have tried to sendInvoice but in test mode we are not receiving an email
In test mode you need to use your stripe account email as a customer email in order to get an email
Can you send me code of SendInvoice
my hosted_invoice_url: null
it is because of status: "draft" ? Do I have to hit "Finalize an invoice" API ?
yes
You need to finalize it
You can follow this guide for creating and sending an invoice using Stripe APIs:
https://docs.stripe.com/invoicing/integration/quickstart
Do you mean stripe account email i.e platform account email ?
And in order to test customer email:
https://docs.stripe.com/billing/revenue-recovery/customer-emails#test-your-configuration
Yes
your email
Or connected account email ?
The account creating the invoice
I am creating an invoice under connected account
$invoice = \Stripe\Invoice::create(['customer' => $cust_id, 'auto_advance' => false, 'collection_method' => 'send_invoice', 'due_date' => strtotime($dueDate), ], ['stripe_account' => $acc_id]);
๐ taking over for my colleague. Let me catch up.
the email of the platform should work
what's the error?
do you happen to have the request ID? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
try {
$invoice = \Stripe\Invoice::finalizeInvoice($invoiceId,['stripe_account' => $acc_id]);
return $invoice;
}
catch(\Throwable $th) {
dump($th);
return $th->getMessage();
}
ERROR is : "Using $this when not in object context"
this request req_v5mZk8qm5bFLyW is a get request
ERROR is : "Using $this when not in object context"
this is a PHP error not a Stripe error
I am using PHP librabry or package with symfony
and this the code of lib file
public function finalizeInvoice($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/finalize';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
}
you should use stripe-php SDK instead of posting yourself
Ok I got the solution thank you and fixed the error
One last question
When we retrieve a paid invoice then how we can get the data that how much stripe fee was charged ?
Ok Thank you