Перейти до основного вмісту

Список параметрів для роботи з платіжним віджетом

При роботі з платіжним віджетом використовуються такі параметри:

ParameterTypeRequiredDescription
apiKeyStringAPI key for authentication, acquired upon registering and configuring the widget project (it’s different from project’s API key).
Reach out to Tranzzo support to get one
modeMODEWidget display mode (popup - a pop-up window with the widget, embedded - a built-in window with the widget)
selectorStringSelector of the HTML element into which the widget is inserted. This field is mandatory when using the embedded mode
localeStringLanguage parameter. Values are recognized as follows:
en - English
uk - Ukrainian
ru - Russian
localizationObjectCustomized values of the payment widget UI components.
Supported parameters
payment.typeTYPEPayment flow (pay - for one-step payment flow (purchase), hold - for two-step payment flow (auth)
payment.orderIdStringUnique identified of order
payment.descriptionStringPayment description
payment.amountNumberTransaction amount
payment.currencyCURRENCYTransaction currency (ISO_4217). For instance, UAH for Ukrainian hryvnia
payment.serverUrlURLWebhook notification will be sent to this URL
payment.productsArray[Product]Array of products in the order
payment.products[i].nameStringProduct name
payment.products[i].priceNumberProduct price (does not influence total payment amount). Max two decimals (e.g. 123.45)
payment.products[i].quantityNumberProduct quantity. Max three decimals (e.g. 1.455)
payment.products[i].codeStringProduct code
payment.products[i].unitStringMeasuring unit for a specific product (kg, l, m, pc).
payment.payer.idStringProduct identifier in merchant's system
payment.payer.firstNameStringCustomer first name
payment.payer.middleNameStringCustomer middle name
payment.payer.lastNameStringCustomer last name
payment.payer.phoneStringCustomer phone
payment.payer.emailStringCustomer email
payment.payer.birthDateDateCustomer's birthday (yyyy-MM-dd)
payment.payer.billingAddress.line1StringCustomer address line 1
payment.payer.billingAddress.line2StringCustomer address line 2
payment.payer.billingAddress.cityStringCustomer city
payment.payer.billingAddress.countryCOUNTRYCustomer country (ISO 3166-1 (alpha-2)). For instance, UA for Ukraine
payment.payer.billingAddress.stateStringCustomer region
payment.payer.billingAddress.postalCodeStringCustomer postcode
payment.recurring.intervalUnitStringA type of time interval (day, week, month, year).
The parameter is mandatory for recurring payments
payment.recurring.intervalCountIntegerA number of time intervals between charges. For example, if the charge should take place once per 3 weeks, the following parameters should be passed: interval_unit: week and interval_count: 3
The allowed values are as follows: 1-365 for day, 1-53 for week, 1-12 for month, and 1-10 for year
The parameter is mandatory for recurring payments
payment.recurring.startDateDateThe date of the first scheduled charge (format: YYYY-MM-DD)
payment.recurring.endDateDateThe date of the first scheduled charge (format: YYYY-MM-DD)
payment.recurring.timeTimeTime of each recurring charge in UTC. If not provided, the time of the recurring payment creation will be used. (format: HH:MM:SS)
payment.recurring.amountNumberThe recurring payment amount if it is different from the one of the initial transaction. If not specified, it will default to the initial transaction amount.