Skip to main content
PUT
Update CoworkerPaymentMethod
Updates an existing CoworkerPaymentMethod record. You must include the Id of the record to update along with all required fields.

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-Edit role.

Enums

Request Body

Required Fields

integer
required
The Id of the CoworkerPaymentMethod record to update.
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 update.
object
Contains the Id of the updated record.
boolean
true if the coworkerpaymentmethod was updated 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