Methods

Endpoints related to managing payment methods associated with a hubs.

List Billing Methods

Lists the Billing Methods associated with the Hub defined in X-Hub-ID.

Requires the billing-methods-manage capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
sort
Array of strings

An array of sort values. To sort descending, put a - in front of the value, e.g. -id.

filter
object
object

In a list return, the data associated with the page number and size returned. 20 results per page, page 2 would be page[size]=20&page[number]=2

Responses
200

returns a collection of billing methods.

default

General error response from the platform

get/v1/billing/methods
Response samples
application/json
{
  • "data": [
    ]
}

Create Billing Method

Requires the billing-methods-manage capability.

SecuritybearerAuth and hubAuth
Request
Request Body schema: application/json

Parameters for creating a new billing method.

name
required
string

A name for the billing method.

primary
required
boolean

A boolean where true represents a billing method being primary.

required
object (Address)

Address information for a given billing method.

required
object
Responses
201

Returns a Billing Method resource.

default

General error response from the platform

post/v1/billing/methods
Request samples
application/json
{
  • "name": "string",
  • "primary": true,
  • "address": {
    },
  • "credit_card": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

Get Billing Method

Requires the billing-methods-manage capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
methodId
required
string

The ID of the billing method.

Responses
200

Returns a billing method resource.

default

General error response from the platform

get/v1/billing/methods/{methodId}
Response samples
application/json
{
  • "data": {
    }
}

Update Billing Invoice

Requires the billing-methods-manage capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
methodId
required
string

The ID of the billing method.

Request Body schema: application/json
name
string

A name for the billing method.

primary
boolean

A boolean where true represents a billing method being primary.

object (Address)

Address information for a given billing method.

object (CreditCard)

Information about a credit card.

Responses
200

Returns a billing method resource.

default

General error response from the platform

patch/v1/billing/methods/{methodId}
Request samples
application/json
{
  • "name": "string",
  • "primary": true,
  • "address": {
    },
  • "credit_card": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

Delete Biilling Method

Deletes the Billing Method. However, the primary payment method may not be deleted. Requires the billing-methods-manage capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
methodId
required
string

The ID of the billing method.

Responses
202

Returns a Job Descriptor.

default

General error response from the platform

delete/v1/billing/methods/{methodId}
Response samples
application/json
{
  • "data": {
    }
}