Create a transaction
post
https://api.sensepass.com/api
/transactions/init
Creating a new transaction object (Payment Request)
This API creates new payment request based on the fields below.
Parameters
Body
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.
currency*
string
[ USD, CAD, ILS, EUR, RUB ]
reason
string
The reason for this payment - This field will be presented to the consumer
deviceId
string
Terminal unique device ID provided by SensePass (For Device based Transactions) - Required if apiKey is empty
apiKey
string
Merchant ID provided by SensePass (For Web based Transactions) - Required if deviceId is empty
timeOut
number
Time until the transaction will be timed out (seconds)
isCent
boolean
Determines if Amount represents in cents or not
maxInstallments
number
Installments Limit for this transaction - Valid only for credit card payment
clientPhoneNumber
string
SMS message will be sent to this consumer number for SMS payment
clientEmail
string
email message will be sent to this consumer email for remote payment
clientName
string
consumer name for the payment
returnURL
string
URL to redirect consumer after Success or Error (For E-Commerce Transactions)
cancelURL
string
URL to redirect consumer on cancel event from consumer (For E-Commerce Transactions)
callbackURL
string
URL to Callback API - SensePass will call this API with full Transaction Entity for every status change about this transaction
posData
object
Any data (object/array/string/number etc...) to be received in the callback url or transaction's responses
invoice
object
Used to present invoice for the consumer before the payment
receipt
object
Used for present receipt for the consumer after the payment
emailConfig.paymentRequest.language
string
[ en, he, ru ]
receiptNotifications.sms
array
Invoice & Receipt Recipients SMS
example: ["9295522135"]
metadata
object
a unique array with a key-value pair for displaying information on SensePass Dashboard (backoffice) Metadata Model
Responses
200: OK
OK
400: Bad Request
Invalid Input
500: Internal Server Error
Internal Error
Basic request example to create a new transaction.
{
"timeOut": 600,
"amount": 200,
"isCent": true,
"currency": "USD",
"deviceId": "2ooeww5ufzg3nkuf8a10gu5n695yolixlbgb042o03to9bxfkr7t815i5epu8o58jv1rznif3o1tr6xsb1rm"
}
See our full examples for creating transactions on the left menu.
Last modified 19d ago