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.

object or null
object or null
Responses
201

Returns a billing method.

default

General error response from the platform

post/v1/billing/methods
Request samples
application/json
{
  • "name": "string",
  • "primary": true,
  • "address": {
    },
  • "credit_card": {
    },
  • "us_bank_acct": {
    }
}
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.

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
}
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": {
    }
}

Create Billing Method Job

Creates a new job for a billing method. Generally used to verify a payment method.

Requires the billing-methods-manage capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
methodId
required
string

The ID of the method.

Request Body schema: application/json
action
required
string

The name of the action to perform.

Value: "verify"
required
object
Responses
202

Returns a job descriptor.

default

General error response from the platform

post/v1/billing/methods/{methodId}/tasks
Request samples
application/json
{
  • "action": "verify",
  • "contents": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}