#arghya-das_api

1 messages Β· Page 1 of 1 (latest)

shell brookBOT
#

πŸ‘‹ Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

πŸ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1237981288455999508

πŸ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

real cosmos
neon willow
#

oh shoot I am not open in the stripe dashboard right now

#

can you not help in this way 😢?

#

parameter_missing - customer

#

this is for the billing portal api

#

if it is automatically cancelled due to declined card and now if I wanna go to billing portal it say customer parameter missing but if I cancel the sub from dashboard it is working

#

weird

shell brookBOT
fiery dirge
#

πŸ‘‹ Taking over this thread, catching up now

#

Can you share the request ID (req_xxx) of the error you faced? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request

We'd need an request ID (req_xxx) to understand the information in the request that your system sent, so that we can provide the solution accordingly

neon willow
#

yes so I am not in front of the dashboard rn

#

😢

#

can't login at the moment

#

but I will need the help πŸ˜… is it not possible?

fiery dirge
#

customer is a required field to create a Customer Portal Session

#

I'd recommend checking if customer field has been set in the request

neon willow
#

no the issue is not that

#

the issue is this

#

So I am in test mode and I have 4 retired setups in 1 week, I am running the clock simulator to try it with a declined card to fail the payment and cancel the subscription automatically but if I do that and then run the billing portal API it says customer parameter missing but if I simply cancel it from the dashboard it is ok. and I see in the dashboard that customer is not deleted also there is no webhook events called customer deleted

fiery dirge
#

but if I do that and then run the billing portal API it says customer parameter missing
Isn't this the one with the problem?

neon willow
#

yes but when I have a running sub it is working

#

even if I cancel the sub from the dashboard it is working

#

but as soon as I use the test clock simmulation to fail the payment and cancel the subscription it is not working.

fiery dirge
#

but as soon as I use the test clock simmulation to fail the payment and cancel the subscription it is not working.
What is not working? Can you share the error message and the detailed steps that you were doing?

neon willow
#

oh I think I have saved it somewhere wait sir

#

message: 'Missing required param: customer.',

fiery dirge
#

Can you share the code that threw this error message?

neon willow
#

parameter_missing

#

this one

fiery dirge
#

Based on the limited information you provided, the issue is likely due to customer not being set in the Customer Portal Session API: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-customer

customer is a required field to create a Customer Portal Session

I'd recommend checking if customer field has been set in the request
This statement still holds. Your code / request didn't set customer in the billing portal API

neon willow
#

aah so another thing I tried as soon as I go more then 30 days in my test clock it is not working, any reason?

fiery dirge
neon willow
#

no but I thought it is in real life time

#

also in test clock πŸ˜‚

#

?

fiery dirge
#

There is no test clock in live mode

#

Test clock only exists in test mode

neon willow
#

not live I am in test mode

#

actually okay as soon as I use the test clock I can't open my billing portal because the customer parameter is missing

fiery dirge
#

Do you mean you try to advance the time to more than 30 days and it doesn't work as expected?

neon willow
#

I tried as you gave that info

fiery dirge
#

The issue is not with the test clock. The issue here is with the request that you created the billing portal

neon willow
#

although no customer is deleted

fiery dirge
#

Can you share the code that threw the error? Without the code or request ID (req_xxx), we don't know how your exact integration works

#

We are unable to help further if code or request ID (req_xxx) isn't provided

neon willow
#

oh okay give me some time

#

if I can I will get back with that

#

actually I don't have the dashboard access the project I am working on

#

so I need to get that

#

but I can show you my code

fiery dirge
#

Sure! Sharing the code will be helpful too

neon willow
#

haha message is too long let me break it

fiery dirge
#

Where is the code to create billing portal session?

stripe.billingPortal.sessions.create(..)
neon willow
#

yes coming

fiery dirge
#

This is billing portal configuration, not billing portal session

#

I see

neon willow
#

yes yes just sending all of it so you can understand it better

fiery dirge
#

Looks like the issue is due to customer retrieval doesn't return anything

neon willow
#

if I cancel the sub from the billing portal it still works, if I cancel from dashboard it is still working but as soon as I use the test clock the stripe.customers.list returns []

neon willow
fiery dirge
#

This will go back to the initial ask. We'd need the request ID (req_xxx) of your List Customers API to understand why no customer is returned in the response on your account

#

Without request ID (req_xxx) or account ID (acct_xxx), we don't know what customers have been created in your account

neon willow
#

can you give me sometime to get back?

fiery dirge
#

Sure! Feel free to come back when you have an object ID

neon willow
#

what object id do you need? mainly

fiery dirge
#

Request ID (req_xxx) of the error or List Customers API will be helpful

#

Or do you have the subscription ID (sub_xxx)?

neon willow
#

sub gets deleted when the test clock goes to cancel it

#

give me 2 mins to get back to the dashboard and get back to you

#

@fiery dirge

#

this one?

fiery dirge
#

Checking it now

neon willow
#

Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.

#

got somethiong

#

what to put in there?

#

yep it worked

#

I needed to add the test_clock id to return the list of customer associated with test_clock

fiery dirge
#

Ah yes! If test clock is used, List Customers API should also include the test_clock

neon willow
#

another thing is that if I made the subscription cancel and then deleted if I go to billing portal there is sill a button for pay invoice why is that

fiery dirge
#

In general, we recommend to save the customer ID (cus_xxx) of that specific email address in your own database, and retrieve from your database when necessary instead of calling List Customers API

neon willow
fiery dirge
#

another thing is that if I made the subscription cancel and then deleted if I go to billing portal there is sill a button for pay invoice why is that
When the subscription is deleted, the previous unpaid invoice will still be present to be paid

neon willow
#

so sorry for that one sir

neon willow
#

the sub is already deleted right?

fiery dirge
#

The invoice will be marked as paid, but the subscription will remain as deleted

neon willow
#

but then will they be getting more invoice?

#

for the next month or whatever timeframe?

fiery dirge
#

No! The invoice showed in the billing portal was created before the subscription was canceled

#

After the subscription is canceled, no invoice will be created

neon willow
#

nice and I can't renew after subscription is cancel right?

fiery dirge
#

Yup! canceled is the terminal status of a subscription. It can't be renewed

neon willow
#

is there a renew button in the billing portal?

#

I can't find the props I am sure I saw one

fiery dirge
#

Renew is only possible if the subscription is scheduled to cancel in the future, but hasn't been canceled yet

#

If the subscription has been fully canceled, it's not possible to renew

neon willow
#

oh scheduled to cancel means if I set that in the dashboard

#

but after what date I can find the button renew? but I saw some other billing portal has renew button

#

let's say I have sub but my two payments declined and it is gonna retry again then cancel it I will not see the renew button right

fiery dirge
#

let's say I have sub but my two payments declined and it is gonna retry again then cancel it I will not see the renew button right
Yes! When a subscription is already canceled, renew button will not be shown

neon willow
#

gotcha

#

so so much thanks for listening and helping me

fiery dirge
#

No problem! Happy to help πŸ˜„