Placeholders for configuring payment methods

The following placeholders can be used for configuring payment methods (see Creating a payment method).

Placeholder

Description

payment.payment_method

The payment method name

payment.account_id

The ID of an account linked to the payment

payment.account_name

The full name of an account linked to the payment

payment.account_type_key

The account type key of an account linked to the payment

payment.account_custom_attributes['attribute_key']

The value of an additional attribute with the given key (see

Creating an attribute

) of an account linked to the payment

payment.account_address

The full address of an account linked to the payment. Autogenerated from the address information of the account (see

Creating an account

). Example: 143246, Germany, Hesse region, Dreieich city, Hainer str., building 3, office 5

payment.account_email

The email of an account linked to the payment

payment.account_phone

The phone number of an account linked to the payment

payment.account_country

The country code of an account linked to the payment

payment.account_country_name

The country name of an account linked to the payment

payment.account_region

The region of an account linked to the payment

payment.account_city

The city of an account linked to the payment

payment.account_zip

The zip of an account linked to the payment

payment.account_street

The street of an account linked to the payment

payment.account_building

The building of an account linked to the payment

payment.id

The payment ID

payment.document_id

The payment document number

payment.document_number

The payment number in the payment document

payment.total

The amount to be paid. It is calculated as the difference between the original amount and the paid from the balance amount

payment.total_in_words

The amount to be paid in words

payment.amount_paid_from_balance

Part of the amount that was paid from the balance

payment.initial_total

The full original payment amount

payment.no_tax_total

The payment total excluding taxes

payment.tax_total

The tax total for the payment

payment.status

The payment status
  • Pending billing (pending_billing — in the API methods) — the initial status of a new payment when external management of invoices for the Postpay model is used (see Managing invoices for the Postpay model by a third-party ERP system). A payment is created but not ready to be paid since a third-party ERP system has not yet approved the linked invoice.

  • Waiting for payment (waiting_for_payment) — the initial status of the rest of new payments. If external management of invoices for the Postpay model is used — the payment is ready for paying since a third-party ERP system has approved the linked invoice.

  • Expired — a payment is not completed before the due date.

  • Cancelled — a payment is cancelled.

  • Receipt creating (receipt_creating) — a manager manually prepares a receipt (see Processing a payment that requires manual receipt creation).

  • Receipt sent (receipt_sent) — a manager sent a manually prepared receipt to a customer.

  • Processing — a temporary status while a payment on the payment gateway side is processed. In the Processing status, all operations for a payment are not available.

  • Completed — a payment is processed (a customer paid for a payment).

  • Paid from balance (paid_from_balance) — a customer paid for a payment using the account balance.

payment.comment

The payment comment

payment.orders

Information about orders linked to the payment (semicolon-separated list)

payment.order_charges

The list of the charges linked to the payment (separated by ";"): description, quantity, unit_price, unit_price_without_tax, discount_amount, discounted_unit_price_without_tax, amount_without_tax, period, tax_percent, amount, discount_ids

payment.order_charges.size

The number of charges in a PDF receipt

payment.order_charges[].has_taxes

Bool; indicates whether a payment item has taxes

payment.order_charges[].taxes_amount

The sum of all taxes in a payment

payment.order_charges[].taxes[]

The array of taxes included in a payment

payment.order_charges[].taxes[].id

The ID of a tax

payment.order_charges[].taxes[].name

The name of a tax

payment.order_charges[].taxes[].code

The code of a tax

payment.order_charges[].taxes[].amount

The amount of a tax

payment.grouped_order_charges

The list of the grouped charges linked to the payment (separated by ";" parameters are set for the first charge in a group if not specified otherwise): id; name; description; unit_price (price); amount (specified as the total amount for a group); duration (period); discount_ids; discount_amount (specified as the total amount for a group); quantity (specified as the total amount for a group); operate_from; operate_to; type; plan_id; plan_name; plan_sku; plan_resource_id; unit_price_without_tax; discounted_unit_price_without_tax; amount_without_tax (specified as the total amount for a group); unit_price_with_discount; tax_percent.

Example for displaying as a table:

{% for charge in payment.grouped_order_charges %} <tr>
  <td>{{ charge.plan_id }}</td>
  <td>{{ charge.plan_name }}</td>
</tr>
{% endfor %}

Example for displaying the order items as a table:

{% for item in payment.grouped_order_charges %} <tr>
  <td style="text-align:center">{{ item.plan_sku }}</td>
  <td>{{ item.description }} on plan "{{ item.plan_name }}"</td>
  <td style="text-align:center">{{ item.period }}</td>
  <td style="text-align:center">{{ item.quantity }}</td>
  <td style="text-align:center">{{ item.unit_price_in_reseller_currency_with_discount | format_as_money:unit:'' }}</td>
  <td style="text-align:center">{{ item.price | format_as_money:unit:'' }}</td>
</tr>
{% endfor %}

Charges are grouped if have the following identical parameters:

Identical parameters of grouped charges
  • reseller_id

  • account_id

  • subscription_id

  • resource_id

  • operate_from

  • operate_to

  • duration

  • unit_price

  • status

  • type

  • taxes_amount

  • discount_id

  • original_amount_currency

  • currency_rate

  • currency_unit

payment.grouped_order_charges.size

The number of grouped charges in a PDF receipt

payment.created_at

The date and time when the payment is created

payment.provisioning_items

Information about resources linked to the payment

payment.positive_provisioning_items

Information about resources linked to the payment and with the resource amount greater than 0

payment.topup?

The indicator of a top-up payment

payment.topup_sum

The top-up amount

payment.automatically_generated?

The indicator of a payment created automatically by the platform

payment.invoices

Information about Invoices linked to the payment

payment.panel_link

A link to the payment in the Customer Control Panel

payment.downloadable

The indicator of the availability of a downloadable receipt for the payment

payment.receipt_url

The receipt download link for the payment

payment.purpose

The purpose of the top-up payment (see

Creating a payment manually

)

payment.due_date

The due date for the payment. Depending on the payment mode:

  • Prepay — the date is calculated considering the type of a linked order. For joined payments, the earliest date among the linked orders is selected.

    Details

    Order type

    The due date

    Sales order

    The order expiration date

    Change order

    Switch plan order

    Prolong order

    • If an order is created before the Paid to date of a subscription — the Paid to date of a subscription.

    • If an order is created after the Paid to date of a subscription — the subscription expiration date.

    Setting the Paid to date for different subscriptions is described in Prolonging a subscription

    Renewal order

    • If an order is created before the subscription expiration date — the earliest date among the subscription expiration date and order expiration date.

    • If an order is created after the subscription expiration date — the order expiration date.

  • Postpay — the due date of the payment.

payment.external_total

The amount of a third-party invoice, if specified (see

Managing invoices for the Postpay model by a third-party ERP system

). For a PDF template only

payment.external_currency

The ISO code of the currency of a third-party invoice, if specified (see

Managing invoices for the Postpay model by a third-party ERP system

). For a PDF template only

payment.pdf_url

Used in the instructions template for a payment method based on the CheckCash plugin: a link to download a PDF receipt generated by the platform using a template from PDF Template (in Liquid format) (see

Creating a payment method

)

payment.external_file_url

Used in the instructions template for a payment method based on the CheckCash plugin:

  • A link to download a PDF receipt generated by the platform using a template from PDF Template (in Liquid format) (see Creating a payment method) — in the following cases:For a prepaid payment.For a postpaid payment when the platform itself manages postpaid invoices.For a postpaid payment when external management of postpaid invoices is used, but a third-party ERP system did not attach a third-party invoice to a payment.

  • A link to download a third-party invoice attached to a postpaid payment by a third-party ERP system in the form of a link or file when external management of postpaid invoices is used.

See also Managing invoices for the Postpay model by a third-party ERP system.