Billing
17 routes. Paths are relative to https://api.intersink.com/v1.
- POST/billing/accountsSet up billing for a business you own
- GET/billing/accounts/{businessId}Billing account, standing and credit balance
- PATCH/billing/accounts/{businessId}Update billing name, email, address or VAT number
- GET/billing/accounts/{businessId}/credit-applicationsThis business's credit applications, newest first
- POST/billing/accounts/{businessId}/credit-applicationsApply for a credit programme (business owner)
- GET/billing/accounts/{businessId}/creditsCredit grants with what is left of each
- GET/billing/accounts/{businessId}/invoicesIssued invoices, newest first
- GET/billing/accounts/{businessId}/usageCharges accrued so far this month (not yet invoiced)
- GET/billing/businesses/{businessId}/cardThe business's card on file (brand, last 4, expiry) and Stripe's publishable key
- DELETE/billing/businesses/{businessId}/cardRemove the card on file
- POST/billing/businesses/{businessId}/card/confirmMake the confirmed card the default: { setup_intent_id }
- POST/billing/businesses/{businessId}/card/setupStart adding a card: returns a SetupIntent client_secret for Stripe.js
- PATCH/billing/credit-applications/{id}Revise answers after the reviewer asked for more information
- GET/billing/credit-programsCredit programmes a business can apply for (amount per currency)
- GET/billing/invoices/{id}One invoice with its lines and the credits applied
- POST/billing/invoices/{id}/paySettle an open invoice with a successful /payments payment (amount = total due, metadata.invoice_id = this invoice)
- GET/billing/plansPaid app plans and their prices (GBP / USD per month)
Set up billing for a business you own
POST/billing/accounts
Needs a signed-in user (Bearer token or access_token cookie).
Request body application/json
| Field | Type | Description |
|---|---|---|
| business_idrequired | string | Business that pays (you must own it) |
| country_coderequired | string | Billing country. Sets the currency for good: GB → GBP, US → USD. One of: "GB", "US". |
| billing_emailrequired | string | At most 254 characters. Example: "accounts@example.com" |
| billing_name | string | Name on invoices (defaults to the legal name) At least 1 characters, at most 200 characters. |
| billing_address | object | |
| vat_number | string | Example: "GB123456789" |
Response
201. The payload in data is not described in the spec yet.
Billing account, standing and credit balance
GET/billing/accounts/{businessId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| businessIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Update billing name, email, address or VAT number
PATCH/billing/accounts/{businessId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| businessIdrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| billing_name | string | At least 1 characters, at most 200 characters. |
| billing_email | string | At most 254 characters. |
| billing_address | object | |
| vat_number | string |
Response
200. The payload in data is not described in the spec yet.
This business's credit applications, newest first
GET/billing/accounts/{businessId}/credit-applications
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| businessIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Apply for a credit programme (business owner)
POST/billing/accounts/{businessId}/credit-applications
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| businessIdrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| program_keyrequired | string | A programme key from GET /billing/credit-programs Example: "startup" |
| answersrequired | object | The applicant's answers (flat object of short strings, max 8 KB) |
Response
201. The payload in data is not described in the spec yet.
Credit grants with what is left of each
GET/billing/accounts/{businessId}/credits
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| businessIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Issued invoices, newest first
GET/billing/accounts/{businessId}/invoices
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| businessIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Charges accrued so far this month (not yet invoiced)
GET/billing/accounts/{businessId}/usage
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| businessIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
The business's card on file (brand, last 4, expiry) and Stripe's publishable key
GET/billing/businesses/{businessId}/card
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| businessIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Remove the card on file
DELETE/billing/businesses/{businessId}/card
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| businessIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Make the confirmed card the default: { setup_intent_id }
POST/billing/businesses/{businessId}/card/confirm
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| businessIdrequired | string, path |
Response
201. The payload in data is not described in the spec yet.
Start adding a card: returns a SetupIntent client_secret for Stripe.js
POST/billing/businesses/{businessId}/card/setup
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| businessIdrequired | string, path |
Response
201. The payload in data is not described in the spec yet.
Revise answers after the reviewer asked for more information
PATCH/billing/credit-applications/{id}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| answersrequired | object | Revised answers (only while more_info) |
Response
200. The payload in data is not described in the spec yet.
Credit programmes a business can apply for (amount per currency)
GET/billing/credit-programs
Public: no sign-in needed.
Response
200. The payload in data is not described in the spec yet.
One invoice with its lines and the credits applied
GET/billing/invoices/{id}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Settle an open invoice with a successful /payments payment (amount = total due, metadata.invoice_id = this invoice)
POST/billing/invoices/{id}/pay
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| payment_idrequired | string | A successful /payments payment for exactly the amount due, with metadata.invoice_id |
Response
200. The payload in data is not described in the spec yet.
Paid app plans and their prices (GBP / USD per month)
GET/billing/plans
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| app_idrequired | string, query |
Response
200. data is object[].