CoworkerPaymentMethods
Create CoworkerPaymentMethod
Create a new CoworkerPaymentMethod record.
POST
Create CoworkerPaymentMethod
A customer payment method (CoworkerPaymentMethod) records the provider credentials used to charge a specific customer at a specific location; only one record is allowed for each customer, location, and provider.
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
eRegularPaymentProvider
eRegularPaymentProvider
Request Body
Required Fields
integer
required
ID of the customer whose payment method is stored; the customer must belong to a location the operator can access.
integer
required
ID of the location that uses this payment method when charging the customer.
Optional Fields
integer
Regular-payment provider for this method; only one method may exist for the same customer, location, and provider, and the Admin UI supports Stripe, StripeACH, StripeBACS, and GoCardless. See
eRegularPaymentProvider? enum above.string
Payment-provider method ID supplied by the provider, such as a Stripe payment method token; set it only for the matching provider flow.
string
Payment-provider customer ID supplied by the provider, such as a Stripe customer ID; set it only for the matching provider flow.
string
Payment-provider mandate or bank-account identifier supplied by a direct-debit provider; GoCardless and StripeBACS use this field.
string
Optional internal notes about this customer 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