Bit - Init
Process Overview
When an end user chooses to pay with Bit, your server calls a Tranzila API service. The response contains a URL that needs to be displayed in an Iframe. The Iframe contains a QR (and a phone number to get a push notification for the payment to the customer mobile phone). When the end user completes the payment, the iframe will be redirected to a success or failure page.
Please create an iFrame using the sale URL.
Desktop
Contains QR code. In case the merchant has a definition to allow receiving the bit link to the mobile, an input for the cellular number will be displayed.

Mobile

Bit Payment Page
After the customer will complete the transaction with Bit app, the page will redirect to success_url or failure_url.
Request Keys
| key | type | value | required* | remarks |
|---|---|---|---|---|
| terminal_name | string | yourTerminalName | R | |
| txn_currency_code | string | ILS | R | ISO 4217 Currency Code |
| txn_type | string | debit | R | |
| success_url | string | http://www.mywebsite/success | R | Redirect address for success |
| notify_url | string | http://www.mywebsite/notify | R | When a purchase is completed, regardless of success or failure, the API will send a notification to this URL. It acts as a callback to let you know about the outcome of the purchase, so you can take any necessary actions on your side based on that information. |
| failure_url | string | http://www.mywebsite/failure | R | Redirect address for failure |
| expire_month | integer | 6 | R | |
| other_installments_amount | integer | CR | Other installment amount for payment_plan – 8,6 | |
| client | ||||
| Items | array | R | The amount of the transaction is calculated from the items details. There must be at least one item. | |
| response_language | string | english | R | english, hebrew |
| user_defined_fields | Object | CR | Key, value parameters. Keys must be identical to user defined fields in ‘My Tranzila’ |
R – required, O – optional, C – conditional, CR – conditionally required.
Client Keys
| key | type | value | required* | remarks |
|---|---|---|---|---|
| company | string | O | ||
| name | string | O | ||
| id | string | O | ||
| string | O | email address | ||
| address_line_1 | string | O | address line 1 | |
| address_line_2 | string | O | address line 2 | |
| city | string | O | ||
| zip | string | O |
Items Keys
| key | type | value | required* | remarks |
|---|---|---|---|---|
| code | string | O | ||
| name | string | R | Item name | |
| type | string | I | O | I – Item S - Shipping C – Coupon or discount |
| unit_price | number | R | ||
| units_number | number | R | ||
| unit_type | number | 1 | O | all unit types |
| price_type | string | N | O | N – Net (Unit price includes does not include VAT tax) G – Gross (Unit price includes VAT tax) |
| currency_code | string | ILS | O | ISO 4217 Currency Code |
| to_txn_currency_exchange_rate | number | 1 | O | If the currency is different than transaction currency, please send exchange rate to the transaction currency. |
| discount_type | string | fixed | C | Values: fixed, percent |
| vat_percent | integer | 17 | O | Item vat percent. |
| attributes | Array of objects | O |
R – required, O – optional, C – conditional, CR – conditionally required.
Unit type Reference
| key | value |
|---|---|
| 1 | unit |
| 2 | gram |
| 3 | kilogram |
| 4 | ton |
| 5 | day |
| 6 | week |
| 7 | month |
| 8 | year |
| 9 | centimeter |
| 10 | meter |
| 11 | kilometer |
| 12 | MB |
| 13 | GB |
| 14 | TB |
| 15 | hour |
| 16 | litre |
attributes Keys
| key | type | value | required* | remarks |
|---|---|---|---|---|
| language | string | R | ||
| name | string | R | ||
| value | string | R |
Request
Headers
hash_hmac using ‘sha256’ on application key with secret + request-time + nonce. hash_hmac is available for all programming languages with samples found here: https://www.jokecamp.com/blog/examples-of-creating-base64-hashes-using-hmac-sha256-in- different-languages/
775adb3ad32ef10bcb23b63427511463b0a784abf79287342142656f4e3c5de0A 40 bytes NONCE – unique random string generated with any random bytes function
SuIu6YDtFZ4kZn7tKGy3HIDSPwuYkeWi2FTwkgKiVCm6KnoXxPEwxzlsUx6CTZwOE1ecKo0ARCUEz1y6Application public key supplied by Tranzila
vnNtAoXX735jmQviLuMgXEk1fGNCasL92UKW4GLBh8Kk442gK7TqddLNuPnNReixTJI9z8b1g0ARequest time sent in Unix format (large integer counting milliseconds from Jan 1 st , 1970 00:00:00
1682840810Body
application/jsonResponses
The response can be 200 with an Application error code:
| Error Code | Description |
|---|---|
| 20100 | No Bit seller account |
| 20101 | Provider communication error |
| 20102 | Pending transaction failure |
| 20103 | Zero discount, when discount enabled |
| 20105 | Provider configuration error |
Response body
1{
2 "error_code": 0,
3 "message": "string",
4 "sale_url": "string"
5}
6