Payment methods
View as MarkdownPayment methods describe how payments are recorded and which option is selected by default.
On this page
- The payment method object
- List payment methodsGET
/api/v1/payment_methods - Retrieve a payment methodGET
/api/v1/payment_methods/{id} - Create a payment methodPOST
/api/v1/payment_methods - Update a payment methodPATCH / PUT / POST
/api/v1/payment_methods/{id} - Delete a payment methodDELETE
/api/v1/payment_methods/{id}POST/api/v1/payment_methods/{id}/delete
Payment methods describe how payments are recorded and which option is selected by default.
Attributes
idinteger- Identifier assigned by the API.
labelstring- Unique label, up to 64 characters.
is_activeboolean- Whether the method is active. Deactivation clears the default flag.
sort_orderinteger- Non-negative display order.
traceableboolean- Whether the payment method is traceable.
is_defaultboolean- Set true on an active method to select it as the workspace default.
/api/v1/payment_methodsLists payment method records in the workspace.
Permissions
Send your API key in X-API-Key. Required permissions are Payment methods → Read.
Query parameters
qstring- Search by label.
is_activeboolean- Filter by active state when supplied.
lengthinteger- Number of records to return.
startinteger- Zero-based offset.
drawstring- Optional request marker echoed in the response.
sortstring- Sort by id, label, is_active, sort_order, traceable, is_default, tsc, or tsu. Prefix the field name with a minus sign for descending order.
orderstring- Direction for unprefixed sort fields. Use asc or desc.
Returns
Returns items in data, counts before and after text search, and the optional draw marker.
Errors
401- The API key is missing or invalid.
403- The API key lacks the required permission.
/api/v1/payment_methods/{id}Returns one payment method by ID.
Permissions
Send your API key in X-API-Key. Required permissions are Payment methods → Read.
Path parameters
idintegerRequired- ID of the payment method.
Returns
The payment method is returned in data.
Errors
401- The API key is missing or invalid.
403- The API key lacks the required permission.
404- The requested record was not found.
/api/v1/payment_methodsCreates a payment method.
Permissions
Send your API key in X-API-Key. Required permissions are Payment methods → Write.
Body parameters
labelstringRequired- Unique label, up to 64 characters.
is_activeboolean- Whether the method is active. Deactivation clears the default flag.
sort_orderinteger- Non-negative display order.
traceableboolean- Whether the payment method is traceable.
is_defaultboolean- Set true on an active method to select it as the workspace default.
Returns
The created payment method is returned in data.
Errors
401- The API key is missing or invalid.
403- The API key lacks the required permission.
422- One or more fields failed validation.
500- The change could not be saved.
/api/v1/payment_methods/{id}Updates a payment method by ID.
Permissions
Send your API key in X-API-Key. Required permissions are Payment methods → Write.
Path parameters
idintegerRequired- ID of the payment method.
Body parameters
labelstring- Unique label, up to 64 characters.
is_activeboolean- Whether the method is active. Deactivation clears the default flag.
sort_orderinteger- Non-negative display order.
traceableboolean- Whether the payment method is traceable.
is_defaultboolean- Set true on an active method to select it as the workspace default.
Returns
Returns a successful update response.
Errors
401- The API key is missing or invalid.
403- The API key lacks the required permission.
404- The requested record was not found.
400- A payment method ID cannot be changed.
422- One or more fields failed validation.
500- The change could not be saved.
/api/v1/payment_methods/{id}/api/v1/payment_methods/{id}/deleteDeletes a payment method unless a current payment uses it.
Permissions
Send your API key in X-API-Key. Required permissions are Payment methods → Write.
Path parameters
idintegerRequired- ID of the payment method.
Returns
Returns a successful removal response.
Errors
401- The API key is missing or invalid.
403- The API key lacks the required permission.
404- The requested record was not found.
400- The record is in use or could not be removed.