Search
K

Payment request with callback

Simple request example to create new transaction with callback URL data.
Adding callback URL to request body enables you to get POST request from SensePass on any transaction update events.
It is required to implement a POST endpoint on your server based on the same interface as get-transaction-object-by-transaction-number
In event of communication error from SensePass to your server - SensePass will retry multiple times to call your server will the callback URL over a period of days.
Make sure the URL provided in "callbackURL" is fully accessible from the internet and does not contain local IP or private DNS.
SensePass IP's are dynamic - Limiting your endpoint to specific IP address is not possible.
URL: /transactions/init
Request Body:
{
"timeOut": 600,
"amount": 200,
"isCent": true,
"currency": "USD",
"deviceId": "2ooeww5ufzg3nkuf8a10gu5n695yolixlbgb042o03to9bxfkr7t815i5epu8o58jv1rznif3o1tr6xsb1rm",
"callbackURL": "https://google.com/callback/api/callback"
}
post
/transactions/init
Creating a new transaction object (Payment Request)

Choosing Request Method (POST / GET)

By default all the callbacks are sent with JSON body and POST method, it is possible to choose GET method callback without request body.
Callback with GET method will be sent with TransactionNumber as query param.
URL: /transactions/init
Request Body:
{
"timeOut": 600,
"amount": 200,
"isCent": true,
"currency": "USD",
"deviceId": "2ooeww5ufzg3nkuf8a10gu5n695yolixlbgb042o03to9bxfkr7t815i5epu8o58jv1rznif3o1tr6xsb1rm",
"callbackURL": "https://google.com/callback/api/callback",
"callbackMethod": "GET"
}
This API call will be sent:
https://google.com/callback/api/callback?TransactionNumber=573942fsdqe90342k304242&callbackType=transaction_status