Skip to content

Bit - Init

posthttps://api.tranzila.com/v1/transaction/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.

alt text

Mobile

alt text

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


keytypevaluerequired*remarks
terminal_namestringyourTerminalNameR
txn_currency_codestringILSRISO 4217 Currency Code
txn_typestringdebitR
success_url stringhttp://www.mywebsite/successRRedirect address for success
notify_urlstringhttp://www.mywebsite/notifyRWhen 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 stringhttp://www.mywebsite/failureRRedirect address for failure
expire_monthinteger6R
other_installments_amountintegerCROther installment amount for payment_plan – 8,6
client
ItemsarrayRThe amount of the transaction is calculated from the items details. There must be at least one item.
response_languagestringenglishRenglish, hebrew
user_defined_fieldsObjectCRKey, value parameters. Keys must be identical to user defined fields in ‘My Tranzila’

R – required, O – optional, C – conditional, CR – conditionally required.

Client Keys


keytypevaluerequired*remarks
companystringO
namestringO
idstringO
emailstringOemail address
address_line_1stringOaddress line 1
address_line_2stringOaddress line 2
citystringO
zipstringO

Items Keys


keytypevaluerequired*remarks
codestringO
namestringRItem name
typestringIOI – Item
S - Shipping
C – Coupon or discount
unit_pricenumberR
units_numbernumberR
unit_typenumber1Oall unit types
price_typestringNON – Net (Unit price includes does not include VAT tax)
G – Gross (Unit price includes VAT tax)
currency_codestringILSOISO 4217 Currency Code
to_txn_currency_exchange_ratenumber1OIf the currency is different than transaction currency, please send exchange rate to the transaction currency.
discount_typestringfixedCValues: fixed, percent
vat_percentinteger17OItem vat percent.
attributesArray of objectsO

R – required, O – optional, C – conditional, CR – conditionally required.

Unit type Reference


keyvalue
1unit
2gram
3kilogram
4ton
5day
6week
7month
8year
9centimeter
10meter
11kilometer
12MB
13GB
14TB
15hour
16litre

attributes Keys


keytypevaluerequired*remarks
languagestringR
namestringR
valuestringR

Request

Headers

X-tranzila-api-access-tokenstringrequired

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/

Example:775adb3ad32ef10bcb23b63427511463b0a784abf79287342142656f4e3c5de0
X-tranzila-api-noncestringrequired

A 40 bytes NONCE – unique random string generated with any random bytes function

Example:SuIu6YDtFZ4kZn7tKGy3HIDSPwuYkeWi2FTwkgKiVCm6KnoXxPEwxzlsUx6CTZwOE1ecKo0ARCUEz1y6
X-tranzila-api-app-keystringrequired

Application public key supplied by Tranzila

Example:vnNtAoXX735jmQviLuMgXEk1fGNCasL92UKW4GLBh8Kk442gK7TqddLNuPnNReixTJI9z8b1g0A
X-tranzila-api-request-timestringrequired

Request time sent in Unix format (large integer counting milliseconds from Jan 1 st , 1970 00:00:00

Example:1682840810

Body

application/json
terminal_namestringrequired
txn_currency_codestring
txn_typestring
success_urlstringrequired
failure_urlstringrequired
notify_urlstring
clientobject
itemsarray[object]required
response_languagestring
created_by_userstring
created_by_systemstring
user_defined_fieldsarray[object]

Responses

The response can be 200 with an Application error code:

Error CodeDescription
20100No Bit seller account
20101Provider communication error
20102Pending transaction failure
20103Zero discount, when discount enabled
20105Provider configuration error

Response body

response.json
JSON
1{
2  "error_code": 0,
3  "message": "string",
4  "sale_url": "string"
5}
6
Was this page helpful?