#khornfucius2
1 messages · Page 1 of 1 (latest)
hello! do you have a subscription id for me to take a look?
hi! You can check out sub_1LuS6YDnKbkHbxM5myXDnj6V
https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_settings-save_default_payment_method - it sets the PaymentMethod as the subscription.default_payment_method [0]
[0] https://stripe.com/docs/api/subscriptions/object#subscription_object-default_payment_method
if you want to set it as the customer's default payment method, then you need to make an additional request to set it on the customer's invoice_settings.default_payment_method [0]
[0] https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
I'm currently already doing this as seen in my code above^:
So I just need to implement this on webhook response correct?
I'm having some difficulty receiving the charge.succeeded webhook at the moment
This is the request id of my config: req_neb7dnb5tVy5Pv
I enabled the charge.succeeded event, and it's showing on my webhook dashboard but doesn't seem to trigger. Can you help to check on this?
to clarify - subscription.default_payment_method does not set the customer's invoice_settings.default_payment_method
subscription.default_payment_method=subscription sets the PaymentMethod on the subscription's default_payment_method
yes, you can implement a method to set invoice_settings.default_payment_method on a webhook
gimme a second, looking at the charge.succeeded webhook
how are you triggering the charge.succeeded webhook event?
have you tried to make a payment?
yes, i have made payments - in the above image, i received both a charge.succeeded and an invoice.paid according to the dashboard.
However, I was only able to receive the webhook for the invoice.paid
I only updated the config to include charge.succeeded yesterday though, could that be a possible factor?
after you updated the config, have you made a payment after that
if you haven't made a payment after updating the config, then no charge.succeeded event would have been sent
yes, i changed the config yesterday. Made payments today but with no success
based off that screenshot yoou shared
your server is returning a 200 http response for the charge.succeeded event
onesec
yeah, so based off that screenshot, https://dashboard.stripe.com/test/events/evt_3LuSXqDnKbkHbxM52EPSLMKM was sent to your webhook endpoint, and your server returned a 200 http response.
i see, thanks very much for checking on that