#oftysterista_api
1 messages ¡ Page 1 of 1 (latest)
đ 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.
- oftysterista_api, 3 days ago, 42 messages
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?
They would need to provide a different payment methods
so we will tell them to change their payment method?
if they change the PM, is their subscription updated to active directly?
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
so when the user change the payment method, it will wait until the next retry attempt to update the status?
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.
manually retry means i need to do that via a webhook?
after payment method is changed?
https://docs.stripe.com/api/invoices/pay
to manually retry we can use this api?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yes to use the Pay API! And you can listen from payment_method.attached (Please test in Test mode and Test clock)
okay i got it for this one
My other question is also that email is not sent in test mode right? how can I test it int test mode then?
There is a workaround. We will send Test mode email if it's from the team registered on Dashboard
where to check the team registered?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
if the email is listed there, it will automatically sent the email?
Yes
let me test for a moment
ahh i see, it works
what role will we give to QA? is it sandbox user/sandbox administot?
Sorry I don't follow. Which settings you are looking for?
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
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.
Yeah I think Sandbox User is great, and they can see data inside a Sandbox
we cant add dynamic value seperti token pada custom url ini ini?
sure i'll test it
Yes you can use your custom link
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
Ah no query parameters. We haven't supported yet, sorry
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?
Yes correct! You can always listen to webhook and implement your own mailer
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?
The customer should be charged in order for the first Invoice be charged
Do you see the first Invoice is paid?
the first invoice is paid because it is trial
Can you share the Subsciption Id? sub_xxx
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?
I see. So the Invoice will always have 1 hour in draft, and then it finalized and attempt
so it is 1 hour?
Yes
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)
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
Yes!
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?
Can you look at latest_invoice of the Subscirption object?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ah u are right, i can expand it from that obj
btw is there any way to automatically record our stripe transaction in xero?
I know there is Stripe-Xero integration https://central.xero.com/s/article/Stripe or https://support.stripe.com/questions/setting-up-your-xero-account-with-stripe, not sure if that's what you are looking for