Call Stripe API from Function on Flow
I have this code one flow to call API from Stripe:
- string CreateStripePayementLink()
- {
- datas = "{'line_items':{0:{price:'plan_OLTYHRPZl4t6EO',quantity:1}}}";
- response = invokeurl
- [
- url :"https://api.stripe.com/v1/payment_links"
- type :POST
- parameters:datas.toMap()
- connection:"stripe_sandbox"
- ];
- return response;
- }
But it gives this error
{
"error": {
"message": "Invalid array",
"param": "line_items",
"request_log_url": "**************",
"type": "invalid_request_error"
}
}
When I look the log on Stripe I have this Request Post:
- Request POST body
"line_items": "{0:{\"price\":\"plan_OLTYHRPZl4t6EO\",\"quantity\":1}}"
The problem is because Stripe API receives double quotes escaped!!
Any Ideas ?!
Thank You