Stripe API Create a payment link ARRAY

Hi all,

Im trying to make a Stripe: Create a payment link API call using Make. Unfortunately, that call is not in the list of available modules, so I need to use the Make an API Call module instead.

https://docs.stripe.com/api/payment_links/payment_links/create

However, that call requires an array of dictionaries as parameter. I can’t figure out how to add thus kind of value in the field. Am I missing something or is there a better way to do it ?

You need to add it to the body of the module like this:

{
     "line_items": 
   [
      {
            "price": "price_1MoC3TLkdIwHu7ixcIbKelAC", 
            "quantity": 1
      },
      {          "price": "price_3Joy6FGHdIwHu7ixcIsfRAC",           
                "quantity": 2 
      }
   ]
}

2 Likes

Ive tried that already but it doesnt work…

Missing required param: line_items.

@_Mark You cannot send JSON because they do not accept the content-type “application/json”.

Here is the way to do it correctly in Stripe:

3 Likes

Do you know how to do this for multiple line items?
I’m getting an unknown number of line items from HubSpot and writing them as an unknown number of line items to a payment link.

If Stripe used JSON, I would use the JSON aggregator, but there isn’t a form aggregator.