#Gonza
1 messages · Page 1 of 1 (latest)
Hello Gonza, 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.
• Gonza, 1 hour ago, 5 messages
Hello there
What does "once I paid a one-time subscription" mean exactly?
Could you give me an example ID I could look at?
Hello
I have the following code in the webhook:
switch (event.type) {
//Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band.
case 'invoice.paid':
console.log('invoice.paid', dataObject);
break;
case 'invoice.created':
console.log('invoice.created', dataObject);
break;
So when I pay a one-time subscription
I expect that enter into a invoice.paid but it doesn't happen
This is one sample pi_3O58rdC8yYdDBaKr0VjKs3Gm
There isn't really a thing as a "one-time subscription" within Stripe. But I think what you are looking for here is to create a post-payment Invoice using Checkout. To do that you want to set invoice_creation.enabled: true (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-invoice_creation) when you create your Checkout Session.
Try that out and let me know if it is what you expect
Ok, I will try with that
Thats work but onther question
to get the price Id I should do dataObject.lines.data[0].price right?
Yes if there is just a single Price then that would be correct
Sure thing