#sumeetcallenqcom_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/1354802985309442198
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hey there, looking at this, give me a moment
sure
What happens if you additionally specify price_type=metered? All our examples use only this, and the prices are indicated as a preview feature
documentation clearly says you can specify either price_type or prices
still let me try, specifying both
I tried, but same error,
req_mouhzEm0vbRH3S
oh wait
i was effectively rubber ducking as writing this up to ask internally
i think you're missing id in the prices entry
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
oh, odd. I just following the API ref link from the doc you shared
Ok, i see the same error in your logs: https://dashboard.stripe.com/test/logs/req_bQRak07nu5jl2F
Dang
Can you share the python snippet anyway so i can share that internally?
Yep, thanks for trying that -- i already saw it and that it didn't fix the issue
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}"
)
thanks!
Hi
Are you still checking ?
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.
ok let me know
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
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.
Please click the link there, and when prompted for additional information please specify that you want price-specific credit grants enabled.
ok