#dizzydizz1101_webhooks

1 messages ยท Page 1 of 1 (latest)

short boughBOT
#

๐Ÿ‘‹ 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/1265592818836181032

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

stone berryBOT
#

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.

wispy sage
#

๐Ÿ‘‹ happy to help

burnt moss
#

hey tarzan.. its me again ๐Ÿ™ƒ

wispy sage
#

would you mind elaborating a bit what's the steps you've taken?

burnt moss
#

you helped a lot with you fixture the last time but we still have problem with using it in the context of our metered pricing

#

{
"_meta": {
"template_version": 0
},
"fixtures": [
{
"name": "customer",
"path": "/v1/customers/cus_id123โ€,
"method": "get",
"params": {}
},
{
"name": "subscription",
"path": "/v1/subscriptions/sub_id123โ€,
"method": "get",
"params": {}
},
{
"name": "subscription_item",
"path": "/v1/subscription_items/si_id123,
"method": "post",
"params": {}
},
{
"name": "usagerecord",
"path": "/v1/subscription_items/${subscription_item:id}/usage_records",
"method": "post",
"params": {
"quantity": 10,
"timestamp": "now"
}
},
{
"name": "invoice",
"path": "/v1/invoices",
"method": "post",
"params": {
"customer": โ€œcus_id123โ€,
"subscription": "sub_idโ€123,
"auto_advance": true
}
},
{
"name": "invoice_pay",
"path": "/v1/invoices/${invoice:id}/pay",
"method": "post",
"params": {
"payment_method": "pm_id123โ€
}
}
]
}

#

and just for your information the fixture you gave us was also only producing onyl 0 โ‚ฌ invoices which were not triggering the charge.dispute.created, cause the customer was in Euro and even that the creditcard was in USD it only started working wen we moved EUR inside the curreny..

wispy sage
#

cause the customer was in Euro and even that the creditcard was in USD it only started working wen we moved EUR inside the curreny..
yes that was something I couldn't have foreseen

#

give me a few minutes

wispy sage
#

sorry I was trying to catch up on everything else on other threads

burnt moss
#

no worries

wispy sage
#

I think there's a couple of things that we need to talk about before going into the implementation

burnt moss
#

if it helps you and you could use it for testing i could also send you the fixture with our actual ids for sub and customer and so on

wispy sage
#

no it won't actually help

#

let me understand first how are you using metered billing

#

are you using Meters?

burnt moss
#

Varies with usage, unit per month

#

i can send you a price id, of the subscriptions if this helps

#

we are using this Record usage for billing if i seeing it right from the docs, we use, createUsageRecord

wispy sage
#

ok this is the legacy flow and we no longer recommend using it

#

another issue you face here is that you need to use test clocks in order to advance to the next billing cycle

#

otherwise the usage records won't show up

burnt moss
#

so when the legacy is no longer recommend it this will be a a real. pain to convert all the cous

#

customers

wispy sage
#

if you haven't started already then it's best to do it now

burnt moss
#

so if i am seeing it wrigt i can not trigger a test clock

#

i did not recieve a mail that legacy flow is not supported for longerm

#

can you maybe send me a link where they descibe at which point legancy is not allowed anymore

#

and anyways so it is not possible to trigger a test clock via fixture

wispy sage
#

legacy doesn't mean it's deprecated yet

#

but if you're building a new integration we highly recommend you not to use legacy flows

burnt moss
#

so the problem is that i need to rund the test clock multiple times that the subscription is triggered multipel times?

#

right?

wispy sage
#

yes in a sense

#

sorry I'm taking a bit long to respond to you

burnt moss
#

still now worries

#

i am happy you can help me at all

wispy sage
#

but it's a bit busy and helping you write the fixture needs more time than I can allocate during my discord shift

#

and link the discord thread there

burnt moss
#

no worries, so i just google for fixtrues in context of stripe test clocks

#

and hopefully find something

wispy sage
#

I or someone from my team will try to pick it up and send you an answer in async

burnt moss
#

at least you gave me an point weher i can work on

wispy sage
#

something I noticed in your fixture is that you're creating a new invoice for the subscription

#

which is not correct

#

in the case of subscriptions you need to get the latest_invoice from the subscription

#

please let me know when you do so I can escalate the ticket to our team

burnt moss
#

sure.. i try it on my own again

#

and contact again if i am stuck again

#

dont want to bother you too much

wispy sage
#

sure, one last thing

#

writing the fixture is easier if you always start from scratch

short boughBOT
wispy sage
#

with new customers, new test clocks, new subscriptions etc....

#

so you have a way to replicate the same test case several times

burnt moss
#

okay.. great tip