#muhammad-invoicing-start
1 messages · Page 1 of 1 (latest)
Hello
We don't support Laravel Cashier here -- we only support use of our API directly.
So you really would want to reach out to Laravel about this if you need help with their integration.
can you provide any api for it?
https://laravel.com/docs/10.x/billing and https://github.com/laravel/cashier-stripe are their docs
I don't know anything about Laravel Cashier beyond that
no leave laravel
can you provide stripe api
on subscribing monthly plan customer used payment card is declined then on stripe payments listing its showing failed status.
my client want to show this failed transaction of subscription to the customer.
Oh, you want to look at the Charge's that are associated to the PaymentIntent, as the Charge object contains things like failure_message: https://stripe.com/docs/api/charges/object#charge_object-failure_message
So you can basically list all Charges for the relevant PaymentIntent using: https://stripe.com/docs/api/charges/list#list_charges-payment_intent
Or, if you only care about the most recent Charge attempt, you can look at the last_payment_error for the PaymentIntent: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-last_payment_error
actually i want transaction history against customer_id
That's fine, you can list by Customer ID using the above list Charges API as well: https://stripe.com/docs/api/charges/list#list_charges-customer
fine
on get customer subscription
their is invoice against payment_intent
but
on create Payment_intent
its not have any invoice or invoice url
Invoices create PaymentIntents
So it mostly depends where you are starting from
If you have the Subscription ID, then you can get the latest_invoice and then look at that Invoice's associated PaymentIntent
But yeah you can't go PaymentIntent --> Invoice
In terms of creation
actually i am collecting payments with payment_intent that not have invoice
i am managing custom invoice but my client want stripe invoices.
Oh
Well in that case Invoices aren't relevant at all within Stripe here
Unless you migrate your code to creating Subscriptions or one-off Invoices
So I think the best thing to do right now is back up and explain your full use-case here and what you are looking for. Then we can help guide you on the best Stripe integration for that.
muhammad-invoicing-start
$paymentIntent = $stripe->paymentIntents->create([
'customer' => $user->stripe_id,
'amount' => $amount * 100,
'currency' => Setting::CURRENCY,
'application_fee_amount' => $plateFormFee * 100,
'automatic_payment_methods' => ['enabled' => true],
'transfer_data' => [
'destination' => $slot->provider->stripe_connect_id
],
'payment_method_options' => [
'card' => [
'setup_future_usage' => 'off_session',
],
],
]);
this is my payment intent
i am developing an appointment application
customer just select slot then pay fee with their master or visa card and on confirm payment_intent appointment is booked
i want stripe invoice against this payment intent
You're misunderstanding how it all works. This is a PaymentIntent creation for accepting a one-off payment. This will never create a Stripe Invoice.
If you want a Stripe Invoice you have to change your entire code to integrate with our Invoicing API first. You create an Invoice with the right line item details and that will in turn automatically create a PaymentIntent for you
See https://stripe.com/docs/invoicing/integration/quickstart for an end to end quickstart