#crypt8470

1 messages · Page 1 of 1 (latest)

tired archBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

cerulean prairie
#

No you can't create an Invoice from a PaymentIntent

#

You can only create an Invoice, and use the PaymentIntent unders it, which would be autogenerated

rich hill
#

@cerulean prairie can you please share any reference of doc where i can read more on it?
About how can enable payment on my platform and generate invoice.

cerulean prairie
tired archBOT
rich hill
#

I have checked this, it's more customer-specific, I want it to be the payment-specific invoice.

sand crypt
#

What do you mean by "payment-specific" invoice?

rich hill
#

when I do the recurring payment I use webhook to fetch event data. I am listing charge.succeded event, for reccuring i am able to get invoice id as given below

{
"id": "evt_3OgCCZAMTuoasDFy0Cafa67M",
"object": "event",
"api_version": "2023-10-16",
"created": 1707078129,
"data": {
"object": {
"id": "ch_3OgCCZAMTuoasDFy08i3okoz",
"object": "charge",
"amount": 4000,
"amount_captured": 4000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_3OgCCZAMTuoasDFy0vsQ1Qp6",
"calculated_statement_descriptor": "DS STRIKES",
"captured": true,
"created": 1707078128,
"currency": "usd",
"customer": "cus_PJMvhSp1wklRTs",
"description": "Subscription creation",
"destination": null,
"dispute": null,
"disputed": false,
"failure_balance_transaction": null,
"failure_code": null,
"failure_message": null,
"fraud_details": {
},
"invoice": "in_1OgBFUAMTuoasDFyimozJwIW",
"livemode": false,
"metadata": {
},
.
.
.
"paid": true,
"payment_intent": "pi_3OgCCZAMTuoasDFy020fQ3Wp",
"payment_method": "pm_1OUrpUAMTuoasDFyPUWfoS54",
"payment_method_details": {
.
.
.
}

but if I do a one-time(instead of recurring) payment and then fetch the event using charge.succeeded then not able to get the invoice ID(getting invoice: null).

sand crypt
#

Is the charge created by invoice?

rich hill
#

No,
created a payment intent and confirmed the payment using the card, as soon as payment is done the charge.succeeded triggered.

sand crypt
#

Then that's expected. the invoice field is null if there's no associated invoice to this charge.

#

Anyway, can you tell me what you want to achieve with Stripe API?

rich hill
#

I am creating a booking system,
here user comes, books the hotel, user does the payment. and when payment completed(from frontend) i want to create invoice of that transaction. and also wants to listen the transaction using webhook so i can store relevent transaction history.