Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Simple request example to create new transaction with website custom data.
The data is key-value pairs that can be sent in the request body to store custom information about the transaction, for example - order id, consumer name.
This information will not be visible to the consumer and this data will be available to the e-commerce platform on any transaction event - Socket.IO messages, callback, transaction status API.
Request Body:
POST
/transactions/init
This API creates new payment request based on the fields below.
amount*
number
The required amount for this transaction (Cents).
If products are a part of the transaction - they are all summed up & calculated via the following formula:
(amount + vat - discount) * quantity e.g. (10 + 1.7 - 1) * 2.
isCent
boolean
Determines if Amount represents in cents or not
timeOut
number
Time until the transaction will be timed out (seconds)
currency*
string
[ USD, CAD, ILS, EUR, RUB ]
apiKey*
string
Unique API provided by SensePass, unique for each location of your merchant
posData
object
Any data (object/array/string/number etc...) to be received in the callback url or transaction's responses
returnURL
string
URL to redirect consumer after Success or Error
cancelURL
string
URL to redirect consumer on cancel event from consumer
callbackURL
string
URL to Callback API - SensePass will call this API with full Transaction Entity for every status change about this transaction
See Transactions entity schema: #transaction-entity
Basic request example to create a new transaction.
POST
/transactions/init
This API creates new payment request based on the fields below.
amount*
number
The required amount for this transaction (Cents).
If products are a part of the transaction - they are all summed up & calculated via the following formula:
(amount + vat - discount) * quantity e.g. (10 + 1.7 - 1) * 2.
isCent
boolean
Determines if Amount represents in cents or not
timeOut
number
Time until the transaction will be timed out (seconds)
currency*
string
[ USD, CAD, ILS, EUR, RUB ]
apiKey*
string
Unique API provided by SensePass, unique for each location of your merchant
returnURL
string
URL to redirect consumer after Success or Error
cancelURL
string
URL to redirect consumer on cancel event from consumer
callbackURL
string
URL to Callback API - SensePass will call this API with full Transaction Entity for every status change about this transaction
See Transactions entity schema: #transaction-entity
Simple request example to create new transaction and products information.
Adding products to request body allows the consumer to view before and after the payment the full product information including product names, quantity, pricing per products, sub products and tax.
In addition, the products information will be visible in the merchant back office.
Request body:
POST
/transactions/init
This API creates new payment request based on the fields below.
amount*
number
The required amount for this transaction (Cents).
If products are a part of the transaction - they are all summed up & calculated via the following formula:
(amount + vat - discount) * quantity e.g. (10 + 1.7 - 1) * 2.
isCent
boolean
Determines if Amount represents in cents or not
timeOut
number
Time until the transaction will be timed out (seconds)
currency*
string
[ USD, CAD, ILS, EUR, RUB ]
apiKey*
string
Unique API provided by SensePass, unique for each location of your merchant
products
object
Products information
returnURL
string
URL to redirect consumer after Success or Error
callbackURL
string
URL to Callback API - SensePass will call this API with full Transaction Entity for every status change about this transaction
cancelURL
string
URL to redirect consumer on cancel event from consumer
See Transactions entity schema: #transaction-entity
See product object entity:
Adding receipt to your payment request alllows your customers to view the full payment receipt on their mobile device immediately after the payment approved, and on their SensePass account.
Receipt full documentation: Receipts Model
Request Body:
Email Payment Request enables you to send payment request to a consumer remotely, without asking the consumer any confidential information like credit card number.
The Email will be sent from SensePass servers from this address: no-reply@sensepass.com
Multiple languages are available, see "emailConfig" field below.
Request Body:
POST
/transactions/init
This API creates new payment request based on the fields below.
amount*
number
The required amount for this transaction (Cents).
If products are a part of the transaction - they are all summed up & calculated via the following formula:
(amount + vat - discount) * quantity e.g. (10 + 1.7 - 1) * 2.
isCent
boolean
Determines if Amount represents in cents or not
timeOut
number
Time until the transaction will be timed out (seconds)
currency*
string
[ USD, CAD, ILS, EUR, RUB ]
apiKey*
string
Unique API provided by SensePass, unique for each location of your merchant
clientEmail
string
email message will be sent to this consumer email for remote payment
emailConfig.paymentRequest.language
string
[ en, he, ru ]
cancelURL
string
URL to redirect consumer on cancel event from consumer
returnURL
string
URL to redirect consumer after Success or Error
callbackURL
string
URL to Callback API - SensePass will call this API with full Transaction Entity for every status change about this transaction
See Transactions entity schema: #transaction-entity
Adding receipt to your payment request alllows your customers to view the full payment receipt on their device immediately after the payment approved, and on their SensePass account.
Receipt full documentation: Receipts Model
Request Body:
Response body:
See "posReceiptsEndpoint" field in the response body, the value of the field represents the unique endpoint created for saving the receipt created by the e-commerce platform.
Save this value in your website platform for a case of "Approved" status event.
Register to Socket.IO channel or use callback URL to get notifications about transaction status changes.
Once the transaction status changes to status "Approved" (5) you will get "confirmations" object in the Transaction model:
Save all "confirmationNumber" objects, and create receipt in your website platform.
More than one "confirmations" object can be available in cases of split payment, refund and partial refund
Once the receipt is ready in your platform, invoke API request to the url from "posReceiptsEndpoint" (see the previous section).
It is required to host the receipt on a publicy accessible server and send SensePass the full URL of the file, SensePass will not expose to the consumers the URL, instead our servers will download the receipt from your server and host it securely.
Request Body:
"associateToConfirmationNumbers" is an array of "confirmationNumber" for the previous sections, this is the relation between the receipt to the payments of the consumer.
Response body:
Basic request example to create a new transaction and present it on iFrame.
Response body:
See the URL of the iFrame in transactionPage.consumerPage.
You can choose to display the cosumer two different sizes:
1. Regular display (transactionPage.consumerPage.regular) for full size view, see example:
2. Medium display (transactionPage.consumerPage.medium) for medium view without the QR, see example:
3. Small display (transactionPage.consumerPage.small) for smaller view without the QR and without the header, see example:
There are multiple options to get notifications about the transaction status changes:
Callback
Web sockets (Socket.IO)
Post message event on the client side
Adding callback URL using "callbackURL" field to request body enables you to get POST request from SensePass on any transaction update events.
See full information about callbacks logic here: Callback
Implement Socket.IO client on your platform and listen to this URL:
Production - https://api.sensepass.com?id=tr_<TransactionNumber-From-Response-Body>
Sandbox - https://api.sandbox.sensepass.com?id=tr_<TransactionNumber-From-Response-Body>
Listen to "message" event to get notifcations about the transaction.
Post messsge events are sent to client side using the browser API.
Code example:
All of the notifications are conforms to Transaction Entity interface.
See the full interface model here: Transaction Entity
Notification Example:
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.
Request Body:
POST
/transactions/init
This API creates new payment request based on the fields below.
amount*
number
The required amount for this transaction (Cents).
If products are a part of the transaction - they are all summed up & calculated via the following formula:
(amount + vat - discount) * quantity e.g. (10 + 1.7 - 1) * 2.
isCent
boolean
Determines if Amount represents in cents or not
timeOut
number
Time until the transaction will be timed out (seconds)
currency*
string
[ USD, CAD, ILS, EUR, RUB ]
apiKey*
string
Unique API provided by SensePass, unique for each location of your merchant
callbackURL
string
URL to your POST endpoint
cancelURL
string
URL to redirect consumer on cancel event from consumer
returnURL
string
URL to redirect consumer after Success or Error
See Transactions entity schema: #transaction-entity
HMAC (Hash-based Message Authentication Code) signature authentication for callbacks is a security mechanism used to ensure the integrity and authenticity of a message between two systems.
This authentication logic will enables you to verify that the callback API call was originated by SensePass.
HMAC Verification steps:
Extract "HMAC-Random-Key" header from the callback API request
Concat the header from #1 to the request body
Perform HMAC 256 calculation with the concatenated string and using your secret HMAC key
Compare the result from #3 against the value of the request header "HMAC-Authorization"
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 for GET callbacks:
This API call will be sent to this URL:
https://google.com/callback/api/callback?TransactionNumber=573942fsdqe90342k304242&callbackType=transaction_status
Adding invoice to your payment request alllows your customers to view the full payment information before processing the payment.
Supported invoice file formats: PDF, JPEG, PNG.
It is required to host the invoice on a publicy accessible server and send SensePass the full URL of the file, SensePass will not expose to the consumers the URL, instead our servers will download the invoice from your server and host it securely.
Please see the full invoice model here: #invoice-model
Request Body:
POST
/transactions/init
This API creates new payment request based on the fields below.
amount*
number
The required amount for this transaction (Cents).
If products are a part of the transaction - they are all summed up & calculated via the following formula:
(amount + vat - discount) * quantity e.g. (10 + 1.7 - 1) * 2.
isCent
boolean
Determines if Amount represents in cents or not
timeOut
number
Time until the transaction will be timed out (seconds)
currency*
string
[ USD, CAD, ILS, EUR, RUB ]
apiKey*
string
Unique API provided by SensePass, unique for each location of your merchant
invoice
object
Used to present invoice for the consumer before the payment
cancelURL
string
URL to redirect consumer on cancel event from consumer
returnURL
string
URL to redirect consumer after Success or Error
callbackURL
string
URL to Callback API - SensePass will call this API with full Transaction Entity for every status change about this transaction
See Transactions entity schema: #transaction-entity
SMS Payment Request enables you to send a payment request to a consumer remotely, without asking the consumer any confidential information like credit card number.
The SMS message will be sent from SensePass servers, all of the countries globally are supported.
For delivery status - See "SMS" field in #transaction-entity
Request Body:
Full customization of the SMS message including variables can be done using "customSmsText" field in the "/transactions/init" API.
Request Body:
businessName: Merchant name
locationName: Location name
amount: Transaction amount including currency
link: Full URL to payment request page
reason: Reason field of the transaction
expiration: Transaction expiration date formatted
Add %% before and after the name of the variable.
Examples:
%%businessName%% asks you to pay
Hi, you got payment request from %%businessName%%, %%locationName%% of %%amount%% - %%reason%%. Please click here to pay: %%link%%
POST
/transactions/init
This API creates new payment request based on the fields below.
amount*
number
The required amount for this transaction (Cents).
If products are a part of the transaction - they are all summed up & calculated via the following formula:
(amount + vat - discount) * quantity e.g. (10 + 1.7 - 1) * 2.
isCent
boolean
Determines if Amount represents in cents or not
timeOut
number
Time until the transaction will be timed out (seconds)
currency*
string
[ USD, CAD, ILS, EUR, RUB ]
apiKey*
string
Unique API provided by SensePass, unique for each location of your merchant
clientPhoneNumber
string
SMS message will be sent to this consumer number for SMS payment
returnURL
string
URL to redirect consumer after Success or Error
cancelURL
string
URL to redirect consumer on cancel event from consumer
callbackURL
string
URL to Callback API - SensePass will call this API with full Transaction Entity for every status change about this transaction
See Transactions entity schema: #transaction-entity
Interface:
See invoice object entity:
For delivery status - See "SMS" field in