API Reference
- Purchases
- Payment methods
- Billings
- Clients
- Webhooks
- Public key
- Account
- Company statements
List all billing templates
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Response
Object type identifier
Object creation time
Object last modification time
Core information about the Purchase, including the products, total, currency and invoice fields. If you're using invoicing via /billing/
or /billing_templates/
, this object will be copied 1:1 from BillingTemplate you specify to the resulting Purchases (also to subscription Purchases).
Line items of the invoice. In case of a transaction with no invoice sent, specify a single Product forming the cost of transaction.
Product name
256
Quantity of these products in invoice
You can use this field or total_override
with a value of 0 to activate preauthorization scenario. See the description of the Purchase.skip_capture
field.
x > 0
Total discount per this product in invoice
x > 0
Percent of tax added to the price of this product
Product category
256
Currency code in the ISO 4217 standard (e.g. 'EUR').
3
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Language code in the ISO 639-1 format (e.g. 'en')
2
10000
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
Amount of money as the smallest indivisible units of the currency. Examples: 1 cent for EUR and 1 Yen for JPY.
ClientDetails fields to request from the client before the payment. If a value is passed for a field in ClientDetails, it will be automatically removed from this list.
email
, phone
, full_name
, personal_code
, brand_name
, legal_name
, registration_number
, tax_number
, bank_account
, bank_code
, billing_address
, shipping_address
Timezone to localize invoice-specific timestamps in, e.g. to display a concrete date for a due
timestamp on the invoice.
Whether to permit payments when Purchase's due
has passed. By default those are permitted (and status will be set to overdue
once due
moment is passed). If this is set to true
, it won't be possible to pay for an overdue invoice, and when due
is passed the Purchase's status will be set to expired
.
An optional message to display to your customer in invoice email, e.g. "Your invoice for June".
256
Indicates this is a test object, created using test API keys or using Billing section of UI while in test mode.
ID of user who has created this object in the Billing UI, if applicable.
ID of the brand to create this BillingTemplate for. You can copy it down in the API section, see the "specify the ID of the Brand" link in answer to "How to setup payments on website or in mobile app?".
256
Defines whether this BillingTemplate issues invoices in a recurring manner - it's a subscription - or it sends invoices only once. You can't change this parameter when you edit the BillingTemplate. If this field is true
, you will need to specify subscription_*
fields and invoice_*
fields are read-only, and vice-versa.
Sets issued
on the Purchase objects generated. Generated from current day in purchase.timezone
if not provided. Read-only if is_subscription == true
.
Sets due
on the Purchase objects generated. Required if is_subscription == false
, read-only otherwise.
Sets skip_capture
on the Purchase objects generated. false
by default. Read-only if is_subscription == true
.
Sets send_receipt
on the Purchase objects generated. true
by default (unlike in Purchases API, where by default receipts are not sent). Read-only if is_subscription == true
.
Defines how often are the subscription Purchases generated. Used together with subscription_period_units
: to issue Purchases once a month, use "...period": 1
and "...period_units" == "months"
.
Variable number of days in a month is respected; e.g. if subscription has a period of 1 month, a client had its billing cycle activated on January 30 and there are 28 days in February that year - billing scheduled for February will happen on 28th.
Both fields are required when creating a BillingTemplate with is_subscription == true
/editing a BillingTemplate with is_subscription == true
as long as there aren't any launched subscribers; they are read-only otherwise, whether it's BillingTemplate's editing when there already are clients activated or if is_subscription == false
.
1 < x < 256
See subscription_period
.
days
, weeks
, months
Used to generate due
on the Purchase objects generated. Used together with subscription_due_period_units
: to set the final Purchase.due
to a week after it's generated/invoice is sent, use "...period": 1
and "...period_units" == "weeks". Required if
is_subscription == true`, read-only otherwise.
1 < x < 256
See subscription_due_period
.
days
, weeks
, months
If this is true
, clients are charged at the end of billing periods, and vice-versa. E.g. if you add a subscriber client to a BillingTemplate, with this value being set to false
, he will receive first invoice today, otherwise - after a single billing period (defined by subscription_period
/subscription_period_units
) passes.
Required when creating a BillingTemplate with is_subscription == true
/editing a BillingTemplate with is_subscription == true
as long as there aren't any launched subscribers; read-only otherwise, whether it's BillingTemplate's editing when there already are clients activated or if is_subscription == false
.
How many trial periods to give the client prior to starting his billing cycle. If billing period is 1 month and you set this value to 2, subscription will automatically adjust to giving your client 2 months without payments and then charging him for the 3rd month (when exactly depends on subscription_charge_period_end
: 3 months after the subscriber was launched for false
, 4 for true
). "subscription_trial_periods": 0
disables this feature.
Required when creating a BillingTemplate with is_subscription == true
/editing a BillingTemplate with is_subscription == true
as long as there aren't any launched subscribers; read-only otherwise, whether it's BillingTemplate's editing when there already are clients activated or if is_subscription == false
.
0 < x < 256
Whether this subscription is paused. Has the same effect as setting "status": "subscription_paused"
for every BillingTemplateClient launched for this subscription, see the description of status
on BillingTemplateClient for more details.
Ignored (read-only) if is_subscription == false
.
If this is true
, there were launched clients (POST /billing_templates/{id}/add_subscriber/
- or subscribers that were added via the gateway system UI) for this subscription.
While this is false
(it will be as long as you're only just created the template and haven't launched any subscribers), you can edit all of subscription_*
fields.
If this is true
, you're only allowed to edit subscription_due_period
, subscription_due_period_units
and subscription_active
.
Is always false
if is_subscription == false
.
If the used payment method supports recurring payment functionality, forces the customer's payment credentials to be saved for possible later recurring payments, without giving the customer a choice in the matter.
The next page of pagination results. null
if there are no more results.
The previous page of pagination results. null
if there was no previous page.