#oftysterista_api

1 messages ¡ Page 1 of 1 (latest)

mint mulchBOT
#

👋 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/1353588834390245397

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

simple furnace
#

hello

#

in subscription, when the user's PM failed. stripe attempt a retry mechanism. if all the retry still failed, the subscription will be past_due or canceled. what can the user do if the payment still failed?

indigo scroll
#

They would need to provide a different payment methods

simple furnace
#

so we will tell them to change their payment method?

#

if they change the PM, is their subscription updated to active directly?

indigo scroll
#

You can turn on 1 setting in Stripe Dashboard, and we will send an email to customer with a button to update PM

#

You can click into the eyes to preview the email

simple furnace
#

so when the user change the payment method, it will wait until the next retry attempt to update the status?

indigo scroll
#

This email will be sent on each retries. If they update before the last retries then the next retry con pick up. But if they only update on the last retry, you may need to manually retry.

simple furnace
#

manually retry means i need to do that via a webhook?

#

after payment method is changed?

indigo scroll
#

Yes to use the Pay API! And you can listen from payment_method.attached (Please test in Test mode and Test clock)

simple furnace
#

My other question is also that email is not sent in test mode right? how can I test it int test mode then?

indigo scroll
#

There is a workaround. We will send Test mode email if it's from the team registered on Dashboard

simple furnace
#

where to check the team registered?

indigo scroll
simple furnace
#

if the email is listed there, it will automatically sent the email?

indigo scroll
#

Yes

simple furnace
#

let me test for a moment

#

ahh i see, it works

#

what role will we give to QA? is it sandbox user/sandbox administot?

indigo scroll
#

Sorry I don't follow. Which settings you are looking for?

simple furnace
#

the team

#

if i want to invite a user to the team

#

this user is a QA

indigo scroll
#

Ah I see. It's more of... up to you, depends on which permission would you give the QA

#

Definitely not the Admin for developers

simple furnace
#

actually what I want to know is what role gives access to users only for testing and allows them to do advandce time without touching and seeing any live mode data.

indigo scroll
#

Yeah I think Sandbox User is great, and they can see data inside a Sandbox

simple furnace
#

we cant add dynamic value seperti token pada custom url ini ini?

indigo scroll
#

Yes you can use your custom link

simple furnace
#

i mean the value is dynamic

#

is that possible?

#

i want to add like a query param

#

for example like ?id=xxxx

#

the xxx is dymaic

indigo scroll
#

Ah no query parameters. We haven't supported yet, sorry

simple furnace
#

i see okay thanks

#

but for all of that email in settings, we can do it manually right?

#

for example like i still want to use query parameter so i need to create my own email

#

maybe using webhook?

indigo scroll
#

Yes correct! You can always listen to webhook and implement your own mailer

simple furnace
#

okay thanks

#

I think it's enough for now, very helpful

#

wait

#

i relized something

#

i am using trial for my subscription. in dashboard said that this trial will end in 25 march 2026 for example.
when i try to advandced the time to that date, the status is updated to active directly even the customer hasnt charged?

#

so there is a spare time between
trial to the real updated status after the user charged?

indigo scroll
#

The customer should be charged in order for the first Invoice be charged

#

Do you see the first Invoice is paid?

simple furnace
#

the first invoice is paid because it is trial

indigo scroll
#

Can you share the Subsciption Id? sub_xxx

simple furnace
#

i am using 4000000000000341 this card

#

so it suppose to be past due?

#

the payment shoud failed

#

sub_1R63XpKxUzgEvuWhmGL1JdUB

#

this is the subs id

#

the invoice is still draft but the subs status is active already

#

is it the correct cycle?

#

the status updated to 'active' in this evt_1R64LlKxUzgEvuWhA3xt9EnW, if i advanced the time a bit more and the pay attemped and failed the status will be updated again. so the pay attempt is not run on exactly period end time?

indigo scroll
#

I see. So the Invoice will always have 1 hour in draft, and then it finalized and attempt

simple furnace
#

so it is 1 hour?

indigo scroll
simple furnace
#

the invoice created exactly when the last perid is end?

#

so what i can say is the period will be updated to the next status after 1 hour it end?

#

so the pay attempt in live mode also always in 1 hour after the invoice is created (last period end)

indigo scroll
#

Yes correct

#

It's called the billing cycle

simple furnace
#

in this one hour finalized time, the subscription will remain active?

#

so I can tell to my system that this subscription is still active until current_period_end_at + 1 hour

indigo scroll
#

Yes!

simple furnace
#

okayy thanks alot

#

very helpful

#

how can i check an invoice for the susbcription? i mean i want to check is the last invoice is open for the subscription? cause i need to attempt pay if the last invoice is open?

#

is this the only way?

const latestInvoice = await this.stripeClient.invoices.list({
  subscription: subscriptionId,
  status: 'open',
  limit: 1,
});
#

using invoice list api?

#

is that possible a subscription has more then one open invoice?

indigo scroll
#

Can you look at latest_invoice of the Subscirption object?

simple furnace
#

ah u are right, i can expand it from that obj

simple furnace
#

btw is there any way to automatically record our stripe transaction in xero?

indigo scroll