# Stripe - creating API using Bubble API plugin

**URL:** <https://forum.bubble.io/t/stripe-creating-api-using-bubble-api-plugin/241141>\
**Category:** APIs\
**Created:** [January 12, 2023, 7:27am UTC](https://forum.bubble.io/t/stripe-creating-api-using-bubble-api-plugin/241141 "2023-01-12T07:27:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgellis](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jgellis/32/165674_2.png) [@jgellis](https://forum.bubble.io/u/jgellis)\
**Post date:** [January 12, 2023, 7:27am UTC](https://forum.bubble.io/t/stripe-creating-api-using-bubble-api-plugin/241141/1 "2023-01-12T07:27:55Z")

</div>

I am stumped! I am attempting to create an API connector to Stripe. (Yes Bubble has a plugin, and yes there is a Stripe.js plugin. However: the Bubble plugin does not offer all the functionality we need. The Stripe.js plugin keeps stalling on Chrome when it does a [m.stripe.com](http://m.stripe.com) cookie request at initialization. (Note: this is NOT the author of the Stripe.js plugin’s issue… rather Stripe does this action by default in their JS.) So back to the issue…

I have tested the POST API connection using Postman and it works using the Content-Type application/x-www-form-urlencoded as required by stripe. But… the Bubble API does not have this option - but does have Form-data which I am not sure if it is compatible - since it does not work. Here is a pic of the API as it stands… (Yes… I have entered the authorization in the header and GETs work fine so it is not a auth issue).

Any inspiration would be greatly appreciated.  
John

 ![Capture](https://us1.discourse-cdn.com/bubble/original/3X/0/b/0b3e24108e7af1b74455bf1c1aa81ef15ce9742c.jpeg)

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dorilama/32/226878_2.png) [@dorilama](https://forum.bubble.io/u/dorilama)\
**Post date:** [January 12, 2023, 7:44am UTC](https://forum.bubble.io/t/stripe-creating-api-using-bubble-api-plugin/241141/2 "2023-01-12T07:44:32Z")

</div>

try with body type JSON (do not add a body payload) add the data as parameters and tick the box “querystring”.

Cheers  
Mariano

---

<div class="post-metadata">

**Author:** ![jgellis](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jgellis/32/165674_2.png) [@jgellis](https://forum.bubble.io/u/jgellis)\
**Post date:** [January 12, 2023, 8:07am UTC](https://forum.bubble.io/t/stripe-creating-api-using-bubble-api-plugin/241141/3 "2023-01-12T08:07:02Z")

</div>

Genius 🙂

I would have never have guessed it… if you were close I would buy you a beer, or any other beverage of your choice. It’s 3:00am here… so thanks to you I get to go to bed now.

John

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dorilama/32/226878_2.png) [@dorilama](https://forum.bubble.io/u/dorilama)\
**Post date:** [January 12, 2023, 11:17am UTC](https://forum.bubble.io/t/stripe-creating-api-using-bubble-api-plugin/241141/4 "2023-01-12T11:17:16Z")

</div>

Sleep well and rest 🙂

---

<div class="post-metadata">

**Author:** ![jgellis](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jgellis/32/165674_2.png) [@jgellis](https://forum.bubble.io/u/jgellis)\
**Post date:** [January 12, 2023, 4:22pm UTC](https://forum.bubble.io/t/stripe-creating-api-using-bubble-api-plugin/241141/5 "2023-01-12T16:22:58Z")

</div>

Thanks Mariano…  
**A tip** (maybe this is common knowlege):  
Stripe uses nested JSON objects for the address data.  
“address”: {  
“city”: “Chelmsford”,  
“country”: null,  
“line1”: null,  
“line2”: null,  
“postal\_code”: null,  
“state”: null  
},  
They need to be treated as arrays. To make this work in Bubble put the array name as the key. Eg. address[city]

 ![Capture](https://us1.discourse-cdn.com/bubble/original/3X/7/a/7a2acb8d95def20b2313c31ef00000c9ce1d513f.jpeg)

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dorilama/32/226878_2.png) [@dorilama](https://forum.bubble.io/u/dorilama)\
**Post date:** [January 12, 2023, 5:03pm UTC](https://forum.bubble.io/t/stripe-creating-api-using-bubble-api-plugin/241141/6 "2023-01-12T17:03:15Z")

</div>

Yes, you can use the square bracket notation. For example it’s `address[city]` for `{"address": {"city": 123}}`, and `address[0][city]` for `{"address": [{"city": 123}]}`
