#L0rdandBooz
1 messages · Page 1 of 1 (latest)
Hi, yes. Happy to help with technical questions.
I'm trying to setup my products issuing spending controls and am having trouble with the allowed / blocked categories section. It won't allow me to set it back to an empty array so all categories would be permitted to spend.
Here's the documentation I'm looking at: https://stripe.com/docs/issuing/controls/spending-controls
Here's the code: const updateMcc = await stripe.issuing.cards.update(
req.body.id,
{
spending_controls:{allowed_categories: req.body.formattedArray},
},
{stripeAccount: req.body.connectAccountID}
);
when formatted array is set to empty and passed to the api it keeps it to whatever values it already had.
Can you share the request id for this update request as an example so I can further review this? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
I tested this on my end, and it appears this is expected and you cannot unset this.
So how do I make it to where all categories are allowed? aside from submitting a 300 item long array?
Dang that's really weird
thank you for checking on it for me though
@halcyon herald - I just tested this again and it's working like you expect it. Instead of passing an empty array, you'd need to pass an empty string to accomplish this.
Happy to help!
Seriously saved me so much time