API connector - payment gateway

Hi all

my experience with API is little so I hope to find someone who could help me connecting the API for our online payment gateway with bubble.

we are working with https://www.tap.company/sa/en

with help from my colleague developer we worked on bubble API connector to set the calls needed.

as a start we set the parameters and body JSON as it is on the documentation, but we had the following error.

this is our call header

and this is the body JSON

{
“amount”: 1,
“currency”: “KWD”,
“threeDSecure”: true,
“save_card”: false,
“description”: “Test Description”,
“statement_descriptor”: “Sample”,
“metadata”: {
“udf1”: “test 1”,
“udf2”: “test 2”
},
“reference”: {
“transaction”: “txn_0001”,
“order”: “ord_0001”
},
“receipt”: {
“email”: false,
“sms”: true
},
“customer”: {
“first_name”: “test”,
“middle_name”: “test”,
“last_name”: “test”,
“email”: “test@test.com”,
“phone”: {
“country_code”: “965”,
“number”: “50000000”
}
},
“merchant”: {
“id”: “”
},
“source”: {
“id”: “src_kw.knet”
},
“post”: {
“url”: “http://your_website.com/post_url”
},
“redirect”: {
“url”: “http://your_website.com/redirect_url”
}
}

And here is the documentation link https://www.tap.company/sa/en/developers

Thanks in advance,

Seham

since the call is a POST, i assume it’s an action, and one that’ll be done through a workflow? or not?

yes, it should be done through a workflow action.

I have just tried to change it to action and got the same error.

type of the json body like this

{

“save_card”: <save_card>,

and so on., instead of adding parameters. the parameters will appear automatically, and you’ll have to put the values in quotes. here’s an example: image

Thank you I am really grateful for your responses.

I did set the parameters inside the JSON body

but still getting the same error

:neutral_face:

type of the 5 like this “5” , with the qoutes

I did

still got the same error.

Add “Content-Type” application/json to header, like the following pictures

Thank you very much Mr Keitaro.
It does work :clap:t2: :clap:t2:

1 Like

You are welcome!

hey Unfortunately I still need help.

we have set the post charge and get charge calls
this is how I set up the workflow

next step of the workflow was to create the purchase and store the charge_id on the purchase table to use it later to update the payment status

the workflow returned this error from step 1, the purchase have not created and I did not redirected to the redirect page that was defined inside the call’s JSON body

{
“amount”: ,
“currency”: “sar”,
“threeDSecure”: true,
“save_card”: false,
“description”: “Test Description”,
“statement_descriptor”: “Sample”,
“metadata”: {
“udf1”: “test 1”,
“udf2”: “test 2”
},
“reference”: {
“transaction”: “txn_0001”,
“order”: “ord_0001”
},
“receipt”: {
“email”: false,
“sms”: true
},
“customer”: {
“first_name”: <first_name>,
“middle_name”: “test”,
“last_name”: <last_name>,
“email”: ,
“phone”: {
“country_code”: “966”,
“number”:
}
},
“merchant”: {
“id”: “”
},
“source”: {
“id”: “src_all”
},
“post”: {
“url”: “http://mywebsite/checkout_completed
},
“redirect”: {
“url”: “http://mywebsite/checkout_completed
}
}

thanks in advance to anyone who will try to help.

Seham