Preview. This site is still being built. Features, prices and terms may change, and nothing here is a binding offer. Read the preview notice

Preview. Still being built; nothing here is a binding offer. Details

Billing

17 routes. Paths are relative to https://api.intersink.com/v1.

All groups

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

FieldTypeDescription
business_idrequiredstringBusiness that pays (you must own it)
country_coderequiredstringBilling country. Sets the currency for good: GB → GBP, US → USD. One of: "GB", "US".
billing_emailrequiredstringAt most 254 characters. Example: "[email protected]"
billing_namestringName on invoices (defaults to the legal name) At least 1 characters, at most 200 characters.
billing_addressobject
vat_numberstringExample: "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

NameTypeDescription
businessIdrequiredstring, 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

NameTypeDescription
businessIdrequiredstring, path

Request body application/json

FieldTypeDescription
billing_namestringAt least 1 characters, at most 200 characters.
billing_emailstringAt most 254 characters.
billing_addressobject
vat_numberstring

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

NameTypeDescription
businessIdrequiredstring, 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

NameTypeDescription
businessIdrequiredstring, path

Request body application/json

FieldTypeDescription
program_keyrequiredstringA programme key from GET /billing/credit-programs Example: "startup"
answersrequiredobjectThe 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

NameTypeDescription
businessIdrequiredstring, 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

NameTypeDescription
businessIdrequiredstring, 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

NameTypeDescription
businessIdrequiredstring, 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

NameTypeDescription
businessIdrequiredstring, 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

NameTypeDescription
businessIdrequiredstring, 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

NameTypeDescription
businessIdrequiredstring, 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

NameTypeDescription
businessIdrequiredstring, 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

NameTypeDescription
idrequiredstring, path

Request body application/json

FieldTypeDescription
answersrequiredobjectRevised 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

NameTypeDescription
idrequiredstring, 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

NameTypeDescription
idrequiredstring, path

Request body application/json

FieldTypeDescription
payment_idrequiredstringA 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

NameTypeDescription
app_idrequiredstring, query

Response

200. data is object[].