#.adaxer

1 messages · Page 1 of 1 (latest)

wicked galeBOT
deft owl
#

hello

viral vault
#

hello, can you try that in test mode first?

#

to confirm whether the syntax etc works

deft owl
#

tried to modify it too, didn't work either

#
# Cancel stripe subscription at the end of the billing period.
subscription.modify(
       subscription_id,
       cancel_at_period_end=True,
)```
viral vault
#

can you tell me what happened? what didn't work, what error was thrown etc

deft owl
#

yeah about that.. haven't figured out how to throw errors with nginx x gunicorn yet.
it does return a 500 err though, but that's pretty wide. all I can say is that it has to do with this code snippet and it's nothing wrong with the subscription id

#

journalctl logs doesn't provide much here and neither does the access and error logs

viral vault
#

the 500 error wouldn't be from Stripe though, that's something being thrown in your code/nginx layer

start here - is there a request going out to Stripe even? look under your Developer Logs page in Stripe Dashboard

deft owl
#

it does actually

#

400 err

#

Outdated?

wicked galeBOT
viral vault
#

no, modify is the right keyword to update the Subscription but your code is making a delete request, no?

#

see the endpoint being hit in the error'ing screenshot

#

the API ref has the code snippets

deft owl
#

alright fixed it