#mukul-chawla_code
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/1379452035790934037
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
For instance, we'd want to add the following rule under RADAR:
Block if risk_score > 40 AND ::payment_type:: = "domain"
Where payment_type would be a metadata added to the charge object for all domain related payments that we can set.
We are struggling to find the right way to pass this meta data to the charge object that's increated with Invoices api.
Hey there, you can't control the metadata set on payment intents & charges created automatically for subscription invoices until after the charge happens. (ie, you can update them later, but not set at creation time).
Instead, you can set the relevant metadata at on the customer and use radar rules based on customer metadata: https://docs.stripe.com/radar/rules/reference#metadata-attributes:~:text=to your payments.-,Metadata on Customer,-and Destination Objects
search for "Metadata on Customer and Destination Objects"
if the link doesnt take you to that
Thanks for a swift response however I am finding it hard to understand how would it work on our use case. Here are more details:
We want to add that special radar rule for any payments that are for Domains ( we sell domain names in our portal). This is an invoice or charge specific rule for specific product type as we also sell other products.
Now I am wondering, how can we use Customer object meta data to identify a specific product payments. Can you please elaborate on this?
Do we set a metadata like “attempting_domain_payment” on customer object before calling invoices api? Then we would also need to clear this meta data since it’s more transient and not permanent to a customer object. I hope this is making sense but feel free to ask for more clarification if needed.
Hmm if its temporary and not a permanent state I can see how thats not ideal
Yes, thats the idea though you'd set that customer metadata prior to the payment
Currently there's no way to pass metadata through from an invoice to the payment intent/charge. I've filed feedback related ot this internally so we can hoepfully offer that in future, but for now you'll need to take another approach.
Hm understood. I don’t think using customer metadata is ideal for us since it’s need only for payments and is transient.
I suppose there are no other alternatives?
I would also like to submit feedback for the radar team to allow adding rules for product directly
So simple cases like setting different rules for different products are easily added via Radar rules ui