#sumeetcallenqcom_api

1 messages · Page 1 of 1 (latest)

steel kiteBOT
#

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

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

twilit juniper
#

Hey there, looking at this, give me a moment

restive urchin
#

sure

twilit juniper
#

What happens if you additionally specify price_type=metered? All our examples use only this, and the prices are indicated as a preview feature

restive urchin
#

documentation clearly says you can specify either price_type or prices

#

still let me try, specifying both

#

I tried, but same error,
req_mouhzEm0vbRH3S

twilit juniper
#

oh wait

#

i was effectively rubber ducking as writing this up to ask internally

#

i think you're missing id in the prices entry

#

Can you share your python snippet for that request?

#

I think you might be sending ['price_123'] and need to send [{id: 'price_123'}] instead

#

or the appropriate python analog for a dictionary/object

restive urchin
#

let me try that
BTW the link you sent me is not accessible to me
its redirecting to https://docs.stripe.com/api?lang=curl

twilit juniper
#

oh, odd. I just following the API ref link from the doc you shared

#

Dang

#

Can you share the python snippet anyway so i can share that internally?

restive urchin
#

I tried what you said

#

req_bQRak07nu5jl2F

twilit juniper
#

Yep, thanks for trying that -- i already saw it and that it didn't fix the issue

restive urchin
#

new_credit_grant = create_stripe_object(
action=enum.CREATE_CREDIT_GRANT,
name=f"SAAS Credit grant on invoice dated {enq_invoice.created.strftime('%Y-%m-%d')}",
customer=customer_id,
amount={"monetary": {"currency": "usd",
"value": saas_credit_grant_amount},
"type": "monetary"},
applicability_config={"scope": {"prices": [{"id": price.id}]}},
category="paid",
expires_at=int(expires_at.timestamp()),
metadata={"type": enum.ON_PAID_INVOICE,
"invoice_id": invoice.id},
idempotency_key=f"cg|saas|{invoice.id}"
)

twilit juniper
#

thanks!

restive urchin
#

Hi
Are you still checking ?

twilit juniper
#

Yep, i'm looking into this over here. I might need to ask you to write in to convert this to a case where i can follow up later, but i'm going to give them some time to look.

steel kiteBOT
restive urchin
#

ok let me know

twilit juniper
#

Ok it looks like we need to enable something on your account, so i'm going to have our bot message you a link to open a case

steel kiteBOT
#

Hello @restive urchin, we have sent you a direct message, please check it at https://discord.com/channels/@me/1354823104311857297

  • 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
twilit juniper
#

Please click the link there, and when prompted for additional information please specify that you want price-specific credit grants enabled.

restive urchin
#

ok