Skip to content

create payment requests

posthttps://api.tranzila.com/v1/pr/create

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:

JSON
{
  "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 1 for regular and 8 for installments.

  • payment_methods:

    • 1: כרטיס אשראי (Credit Card)
    • 2: העברה בנקאית מס"ב (Bank Masav)
    • 14: Bit
    • 15: אפל פיי (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: 1 for charge, 2 for J5.

  • request_currency: Supported currencies are ILS, USD, EUR, GBP, CAD, AUD, SEK, NOK, CHF, DKK, JPY.

  • response_language: Options are hebrew or english for the payment request language.

To send via SMS, you need the following client array parameters:

  • phone_country_code
  • phone_area_code
  • phone_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:

JSON
{
    "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:

JSON
{
    "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

Content-Typestring

application/json

Connectionstring

keep-alive

X-tranzila-api-app-keystringrequired

Public key

X-tranzila-api-request-timestringrequired

timestamp

X-tranzila-api-noncestringrequired

nonce

X-tranzila-api-access-tokenstringrequired

hash

Body

application/json
terminal_namestringrequired
Match pattern:^[a-z][a-z0-9]{2,15}$
created_by_userstringrequired
created_by_systemstringrequired
created_viastringrequired
action_typenumber
request_datestringnullrequired
Match pattern:^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$
request_languagestringrequired
Allowed values:englishhebrew
Example:hebrew
response_languagestringrequired
Allowed values:englishhebrew
Example:hebrew
pr_tokenstring
Match pattern:^[A-Za-z0-9]{80}$
request_vatnumber

In case it is not sent, the PR will include the VAT as defined in the accounting documents module of the terminal.

Example:18
currency_codestring
Allowed values:AUDCADCHFDKKEURGBPILSJPYNOKSEKUSD
Example:ILS
request_currencystring
Allowed values:AUDCADCHFDKKEURGBPILSJPYNOKSEKUSD
Example:ILS
clientobjectrequired

The three fields for the phone number will no longer be mandatory as long as an email is provided.

itemsarray[object]required
payment_plansarrayrequired
payment_methodsarrayrequired

Supported values: - `1` – Credit Card (כרטיס אשראי) - `2` – Bank Transfer Via Masav (העברה בנקאית מס"ב) * - `14` – Bit * - `15` – Apple Pay * \* Paid module. Available only if enabled for your terminal.

send_smsobject
payments_numbernumberrequired
send_emailobject

Responses

Example of a response to ensure proper creation of a payment request.

JSON
{
    "error_code": 0,
    "message": "The payment request created successfully.",
    "pr_id": "634",
    "pr_link": "https://pay.tranzila.com/pr/EtujY6VXYDFtwGqunlzvekAWAbSNo2OJMur7fAspZOTVkcSPRCUxGYfNvr4EUa29Sl37p6qWgd61T3DG"
}

Response body

response.json
JSON
1{
2  "error_code": 0,
3  "message": "The payment request created successfully.",
4  "pr_id": "102446"
5}
6
Was this page helpful?