create payment requests
Our API now enables you to create payment requests easily. To initiate a request, make a call to the following endpoint: https://api.tranzila.com/v1/pr/create. Payment requests generated via TRAPI can be sent via email, SMS, or both.
Here’s an example of a request:
{
"terminal_name": "ternimalname",
"action_type": 1,
"response_language": "hebrew",
"request_currency": "ILS",
"request_vat": 17,
"payments_number": 1,
"created_by_user": "tester",
"created_via": "TRAPI",
"payment_plans": [1],
"payment_methods": [1],
"client": {
"name": "cats ltm",
"id": "123123123",
"contact_person": "test contact",
"email": "test@interspace.net",
"phone_country_code": "972",
"phone_area_code": "054",
"phone_number": "444444"
},
"items": [
{
"id": 22,
"code": "5555",
"name": "חולצה",
"unit_price": 10,
"type": "I",
"units_number": 1,
"unit_type": 1,
"price_type": "G",
"currency_code": "ILS"
}
],
"send_email": {
"sender_name": "טסט טסט 123 בע''מ",
"sender_email": "donotreply@tranzila.com"
}
}
Parameter Details:
-
payment_plans: Options include
1for regular and8for installments. -
payment_methods:
1: כרטיס אשראי (Credit Card)2: העברה בנקאית מס"ב (Bank Masav)14: Bit15: אפל פיי (Apple Pay)
Note: Each payment method is a paid module. Use only the methods that are enabled for your terminal.
Masav – value
2: Using this value activates the legacy payment page design, which allows end-customers to enter their bank account details and pay via the Masav clearing system. Requires the Masav module.New Bank Transfer model: If you have purchased the new Bank Transfer model, no separate parameter is required. The payment method is enabled automatically once it is activated in the iFrame settings of your terminal in the MY.TRANZILA portal.
-
action_type:
1for charge,2for J5. -
request_currency: Supported currencies are
ILS,USD,EUR,GBP,CAD,AUD,SEK,NOK,CHF,DKK,JPY. -
response_language: Options are
hebreworenglishfor the payment request language.
To send via SMS, you need the following client array parameters:
phone_country_codephone_area_codephone_number
To send via email, ensure you include the send_email array:
- sender_name: Specifies the business name that will appear in the email.
- sender_email: Defines the email address from which the payment request is sent.
Note that multiple payment methods can be combined in a single request, e.g., "payment_methods":[1,2,14,15]. Using unsupported methods will result in an error:
{
"error_code": 20403,
"message": "שגיאה בשליפת פרמטרים"
}
Customer fields must be properly configured in the payment page settings (e.g., company name, contact person) to be displayed correctly in the payment request page.
Example of a successful payment request creation response:
{
"error_code": 0,
"message": "דרישת תשלום נוצרה בהצלחה.",
"pr_id": "634",
"pr_link": "https://pay.tranzila.com/pr/EtujY6VXYDFtwGqunlzvekAWAbSNo2OJMur7fAspZOTVkcSPRCUxGYfNvr4EUa29Sl37p6qWgd61T3DG"
}
Clients wishing to receive a NOTIFY after a payment can match the response from the notify with the payment request using the pr_id parameter.
Request
Headers
application/json
keep-alive
Public key
timestamp
nonce
hash
Body
application/json^[a-z][a-z0-9]{2,15}$^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$englishhebrewhebrewenglishhebrewhebrew^[A-Za-z0-9]{80}$In case it is not sent, the PR will include the VAT as defined in the accounting documents module of the terminal.
18AUDCADCHFDKKEURGBPILSJPYNOKSEKUSDILSAUDCADCHFDKKEURGBPILSJPYNOKSEKUSDILSThe three fields for the phone number will no longer be mandatory as long as an email is provided.
Supported values: - `1` – Credit Card (כרטיס אשראי) - `2` – Bank Transfer Via Masav (העברה בנקאית מס"ב) * - `14` – Bit * - `15` – Apple Pay * \* Paid module. Available only if enabled for your terminal.
Responses
Example of a response to ensure proper creation of a payment request.
{
"error_code": 0,
"message": "The payment request created successfully.",
"pr_id": "634",
"pr_link": "https://pay.tranzila.com/pr/EtujY6VXYDFtwGqunlzvekAWAbSNo2OJMur7fAspZOTVkcSPRCUxGYfNvr4EUa29Sl37p6qWgd61T3DG"
}
Response body
1{
2 "error_code": 0,
3 "message": "The payment request created successfully.",
4 "pr_id": "102446"
5}
6