Skip to main content
POST
Create CoworkerPaymentMethod
A CoworkerPaymentMethod is a tokenised payment method stored against a customer and a location, used when charging invoices issued to that customer by that location. Currently supported providers are Stripe (card and ACH/BACS) and GoCardless (direct debit mandates). The RegularPaymentProvider field identifies the provider; valid values for this entity are Stripe (2), StripeACH (11), StripeBACS (13), and GoCardless (12).
  • For Stripe methods, MethodId holds the Stripe payment method ID and CustomerId holds the Stripe customer ID.
  • For GoCardless mandates, MandateId holds the GoCardless mandate ID and CustomerId holds the GoCardless customer ID.
  • CardNumber stores a masked card number for display purposes only.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header. The authenticated user must be a full unrestricted administrator or have the CoworkerPaymentMethod-Create role.

Enums

Request Body

Required Fields

integer
required
Customer this payment method belongs to.
integer
required
Location that issued or will charge invoices using this payment method.

Optional Fields

integer
Payment provider for this method. For this entity, valid values are Stripe (2), StripeACH (11), StripeBACS (13), and GoCardless (12).. See eRegularPaymentProvider? enum above.
string
Provider payment method ID (e.g. Stripe payment method ID).
string
Provider customer ID (e.g. Stripe or GoCardless customer ID).
string
GoCardless mandate ID. Only populated for GoCardless payment methods..
string
Masked card number for display purposes only.
string
Optional notes about this payment method.

Code Examples

Response

200

integer
HTTP status code. 200 on success.
string
A human-readable message confirming the creation.
object
Contains the Id of the newly created record.
boolean
true if the coworkerpaymentmethod was created successfully.
array
null on success.
Example Response

400

string
A summary of the validation error(s), in the format PropertyName: error message.
any
null on validation failure.
object[]
Array of validation errors.
boolean
false when the request fails validation.
Example Response