Create a transaction
API for creating new payment requests, this API create Transaction Entity.
API Interface
Creating a new transaction object (Payment Request)
POST
https://api.sensepass.com/api/transactions/init
This API creates new payment request based on the fields below.
Request Body
Name | Type | Description |
---|---|---|
methodType | string | Transaction Type: 0. 'payment' = Regular Payment 1. 'tokenize' = Tokenization 2. 'authorize' = Authorization 3. 'credit' = Credit transaction (Refund transaction without a reference to original payment transaction) |
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 ] |
maxInstallments | number | Installments Limit for this transaction - Valid only for credit card payment |
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 |
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 |
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 |
reason | string | The reason for this payment - This field will be presented to the consumer |
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.email | array | Invoice & Receipt Recipients Email example: ["a@example.com"] |
receiptNotifications.sms | array | Invoice & Receipt Recipients SMS example: ["9295522135"] |
products | object | Products information |
metadata | object | a unique array with a key-value pair for displaying information on SensePass Dashboard (backoffice) Metadata Model |
billingAddress | object | Customer's billing address entity: Customer Billing Details Model |
shippingAddress | object | Customer's shipping address entity: Customer Shipping Details Model |
See Transactions entity schema: #transaction-entity
Examples
Basic request example to create a new transaction.
See our full examples for creating transactions on the left menu.
Schema
Full Transaction Entity schema: #transaction-entity
Flow Chart
See our payment flow chart here
Transaction Status Flow
Last updated