GET
/
billing_templates
curl --request GET \
  --url https://gate.chip-in.asia/api/v1/billing_templates/ \
  --header 'Authorization: Bearer <token>'
{
  "results": [
    {
      "type": "<string>",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "created_on": 1619740800,
      "updated_on": 1619740800,
      "purchase": {
        "currency": "<string>",
        "products": [
          {
            "name": "<string>",
            "quantity": 1,
            "price": 1,
            "discount": 1,
            "tax_percent": 0,
            "category": "<string>"
          }
        ],
        "total": 123,
        "language": "Default value is controlled in Company -> Brand section of merchant portal separately per each Brand used (default value, if no changes are made, is `en`). Brand to be used with corresponding Purchase/BillingTemplate specified using brand_id.",
        "notes": "<string>",
        "debt": 123,
        "subtotal_override": 123,
        "total_tax_override": 123,
        "total_discount_override": 123,
        "total_override": 123,
        "request_client_details": [],
        "timezone": "Europe/Oslo",
        "due_strict": false,
        "email_message": "<string>"
      },
      "company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "is_test": true,
      "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "title": "<string>",
      "is_subscription": true,
      "invoice_issued": "2020-04-30",
      "invoice_due": 1619740800,
      "invoice_skip_capture": false,
      "invoice_send_receipt": false,
      "subscription_period": 1,
      "subscription_period_units": "days",
      "subscription_due_period": 7,
      "subscription_due_period_units": "days",
      "subscription_charge_period_end": false,
      "subscription_trial_periods": 0,
      "subscription_active": false,
      "subscription_has_active_clients": true,
      "force_recurring": false
    }
  ],
  "next": "<string>",
  "previous": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

200 - application/json
OK
results
object[]

BillingTemplate generates Purchase objects, either to issue one-time invoices or in a subscription.

It does so by copying over its' PurchaseDetails, one of its BillingTemplateClient-s and generating other fields from BillingTemplate's fields as necessary into a new Purchase object.

If is_subscription is true, it is considered to be a subscription's BillingTemplate. You will need to specify subscription_* fields like subscription_period when creating it and add BillingTemplateClient objects to its billing cycle (POST /billing_templates/{id}/add_subscriber/). After that the clients will receive recurring invoices (that will be paid for automatically if client saves their card) according to the BillingTemplate settings you have specified.

If is_subscription is false, this BillingTemplate is used to send one-time invoices. After creating it and specifying invoice_* fields, use POST /billing_templates/{id}/send_invoice/ request to send the actual invoices. BillingTemplateClients for non-subscription BillingTemplates are not saved.

next
string | null

The next page of pagination results. null if there are no more results.

previous
string | null

The previous page of pagination results. null if there was no previous page.