#krishnaKanabar-subscription

1 messages · Page 1 of 1 (latest)

young niche
#

No

#

No

#

The customer is there and can subscribe to other subscriptions

hidden sphinx
#

okay

hidden sphinx
#

Can I use ngrok to test webhooks in local enviorment?

young niche
#

Should be possible

hidden sphinx
#

When invoice is getting paid I have added event 'invoice.payment_succeeded'. Now to test it I did used this webhook endpoint

#

but it's not getting triggered

young niche
#

We can do a quick check if you provide the Invoice Id, the event id (evt_xxx)

hidden sphinx
#

solved

#

evt_1LUn8rSJsXH2azWQm9pICTtF

#

this event is getting failed

#

could you tell me the reason?

young niche
#

Your server returned 500

#

Webhook event needs to get 200 response back to consider it's well received

hidden sphinx
#

ye

#

yes

#

but why it's showing 500

young niche
#

It totally depends on your server. You will need to enable logging in your server and debug it

hidden sphinx
#

okay

#

can you tell me a way how to retrieve event data

#

like what event data is actually getting passed to server

dim bluff
#

Hi! I'm taking over this thread.

#

You should add some logs to your backend server to see exactly what happens there.

hidden sphinx
#

is there any way from stripe

#

evt_1LUnNWSJsXH2azWQuXwFZ7ou

#

I wanted event data of this event id

dim bluff
#

What do you mean by event data? If the event is sent to your server, you can add some logs on your server to print the data.

hidden sphinx
#

okay

hidden sphinx
#

evt_1LUnNWSJsXH2azWQuXwFZ7ou

#

this event Why am I getting payment intent is null

dim bluff
#

This is expected, since the invoice is for a zero amount. So there's nothing to actually charge.

hidden sphinx
#

I have added invoice item to customer

#

is there any way I can update customer payment method by this

#

in_1LUnwwSJsXH2azWQo2CrYwoJ

#

check this invocie it's for amount INR 0 but I am adding credit balance and for that i have used payment method.......now how to attach that to customer

celest oyster
#

attach what to the customer exactly? Which payment method?

#

as you mention that's a zero amount invoice due to being negative because of a negative invoice item you created; so there is nothing to pay and no need for a payment method.

hidden sphinx
#

I am actually taking INR 99 for trial period. As stripe doesn't provide paid trial , what i did is that created payment intent of INR 99 and confirmed payment. and then created invoiceitem of same amount and attached to customer

#

So I want payment method of that where I paid INR 99

#

payment -intent id - pi_3LUnwYSJsXH2azWQ12yVKxxp

celest oyster
#

then you'd need to use setup_future_usage while creating your manual PaymentIntent so the payment method is saved to the customer

hidden sphinx
#

okay

#

let me try

#

this worked

#

thanks