{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[]},"params":[]},"next":{"description":"","pages":[]},"title":"Billing API Overview","type":"basic","slug":"billing-api-overview","excerpt":"","body":"[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/36387f7-d8479f2871e14b90ac7604dbdaff9cf7.png\",\n        \"d8479f2871e14b90ac7604dbdaff9cf7.png\",\n        1746,\n        933,\n        \"#eaebeb\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Overview\"\n}\n[/block]\nCoinGate Billing is an API-first solution enabling businesses to issue bills and collect payments in cryptocurrencies. These can be one-off bills or a set of predefined recurring payments. There is also email invoicing solution which can be enabled by passing a single parameter.\n\nIt is up to you how invoices will be delivered. For example, you can choose to display retrieved payment (bill) links on your user dashboard, send them via any other channel available at your disposal or choose CoinGate to deliver the bill via email for you.\n[block:api-header]\n{\n  \"title\": \"Building blocks\"\n}\n[/block]\nBilling service has four main building blocks: **subscribers**, **subscription details**, **subscriptions** and **payments**.\n\nSubscribers represent your customers. Subscription details represent a set of details of a specific subscription, like it's title, list of items included, their quantity and unit price. \n\nSubscription is constituted from subscriber and subscription details merged to form a payments schedule along with other preferences, like start and end dates of a subscription.\n\nEach building block supports **many-to-many** relations and are **reusable**. This means that o**ne subscriber can have unlimited amount of subscriptions** assigned at any given time. Similarly, same **subscription details can be used in any number of subscriptions**. This can be useful when, for example, you are selling fixed number of different subscription plans. In this use case, it is only needed to create subscription details for each subscription plan you are selling and these can be reused later on.\n\n[block:api-header]\n{\n  \"title\": \"Authentication\"\n}\n[/block]\nThe first step is to create an API app to get an auth token. This can be done on Business account dashboard under Merchant - API apps. Previously created API apps can also be used.\n[block:api-header]\n{\n  \"title\": \"Using the API\"\n}\n[/block]\nIn the most simple scenario, the sequence of calls to API should be as follows:\n- POST Subscriber\n- POST Details\n- POST Subscription\n- PATCH Activate Subscription\n- GET Subscription Payments\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/73e7bcc-CoinGate_Billing.png\",\n        \"CoinGate_Billing.png\",\n        646,\n        534,\n        \"#fc9e0c\"\n      ]\n    }\n  ]\n}\n[/block]","updates":["5eaccd7592a23f0011c54895","5f9567c42603c4004279213d"],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5e7bb98134a7820067d57fc2","createdAt":"2020-03-25T20:05:21.242Z","user":"5530bf7457cea10d00a3aa3a","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Billing","slug":"billing","order":3,"from_sync":false,"reference":false,"_id":"5e7b51281ac49702d745882c","createdAt":"2020-03-25T12:40:08.657Z","version":"5adcc1185cd1890003da8165","project":"5530bfac57cea10d00a3aa3b","__v":0},"version":{"version":"2","version_clean":"2.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5adcc1185cd1890003da8166","5adcc1185cd1890003da8167","5adcf4b3ce4b3f00035317e9","5adfb8e9452bd900036d115b","5e7b51281ac49702d745882c","5e7b526560c6cc004f25ca3e"],"_id":"5adcc1185cd1890003da8165","project":"5530bfac57cea10d00a3aa3b","createdAt":"2018-04-22T17:06:32.152Z","releaseDate":"2018-04-22T17:06:32.152Z","__v":5},"project":"5530bfac57cea10d00a3aa3b","__v":2,"parentDoc":null}

Billing API Overview


[block:image] { "images": [ { "image": [ "https://files.readme.io/36387f7-d8479f2871e14b90ac7604dbdaff9cf7.png", "d8479f2871e14b90ac7604dbdaff9cf7.png", 1746, 933, "#eaebeb" ], "sizing": "full" } ] } [/block] [block:api-header] { "title": "Overview" } [/block] CoinGate Billing is an API-first solution enabling businesses to issue bills and collect payments in cryptocurrencies. These can be one-off bills or a set of predefined recurring payments. There is also email invoicing solution which can be enabled by passing a single parameter. It is up to you how invoices will be delivered. For example, you can choose to display retrieved payment (bill) links on your user dashboard, send them via any other channel available at your disposal or choose CoinGate to deliver the bill via email for you. [block:api-header] { "title": "Building blocks" } [/block] Billing service has four main building blocks: **subscribers**, **subscription details**, **subscriptions** and **payments**. Subscribers represent your customers. Subscription details represent a set of details of a specific subscription, like it's title, list of items included, their quantity and unit price. Subscription is constituted from subscriber and subscription details merged to form a payments schedule along with other preferences, like start and end dates of a subscription. Each building block supports **many-to-many** relations and are **reusable**. This means that o**ne subscriber can have unlimited amount of subscriptions** assigned at any given time. Similarly, same **subscription details can be used in any number of subscriptions**. This can be useful when, for example, you are selling fixed number of different subscription plans. In this use case, it is only needed to create subscription details for each subscription plan you are selling and these can be reused later on. [block:api-header] { "title": "Authentication" } [/block] The first step is to create an API app to get an auth token. This can be done on Business account dashboard under Merchant - API apps. Previously created API apps can also be used. [block:api-header] { "title": "Using the API" } [/block] In the most simple scenario, the sequence of calls to API should be as follows: - POST Subscriber - POST Details - POST Subscription - PATCH Activate Subscription - GET Subscription Payments [block:image] { "images": [ { "image": [ "https://files.readme.io/73e7bcc-CoinGate_Billing.png", "CoinGate_Billing.png", 646, 534, "#fc9e0c" ] } ] } [/block]