#tehalsingh_22956
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
Invoice always gets a PaymentIntent attached to it, you can use that one: https://stripe.com/docs/api/invoices/object#invoice_object-payment_intent
No i'm not getting any paymentintent from invoice
please check this in_1NdWa0J2seNBihJcKjE7rO1Y invoice which is generated thought php code. lemme know where i'm missing something.
\Stripe\InvoiceItem::create(array(
"amount" => $total,
"currency" => $currency,
"customer" => $client->stripe->stripe_account_id,
"description" => "Last Day Cancellation Fee",
));
$invoice = \Stripe\Invoice::create(array(
"customer" => $client->stripe->stripe_account_id,
"application_fee_amount" => $fee,
"description" => "Last Day Cancellation Fee",
), ["stripe_account" => $business->stripe->stripe_account_id]);
One think my customer has default payment source is type of always authenticate ( 4000002760003184 ).
What's the response you're getting? I see the PaymentIntent for this Invoice.
okey let me check again then
yes, found that after retrieving the invoice i'm getting the payment intent. but it's is possible to get this intent in the create object response
I think you might need to Finalize the Invoice to get the PaymentIntent, sorry.
Yes, you can't pay the Invoice before it's finalized, so the PaymentIntent is not available until then.
okey, that's why i'm not geeting the invoice in the create object. Anyways thank you for your help
Yes.
Happy to help!