Payment request with products
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:
Creating a new transaction object (Payment Request)
POST
/transactions/init
This API creates new payment request based on the fields below.
Request Body
Name | Type | Description |
---|---|---|
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
Last updated