Customers

Customer Credits

A CustomerCredit represents a coupon credit issued to a customer — either automatically as a recurring membership benefit or manually as a one-off (e.g. a goodwill gesture). Each credit references the underlying Coupon that defines what it entitles the customer to.

get/customers/customers/{customerId}/credits

List Customer Credits

listCustomerCredits

Retrieves a paginated list of credits issued to the given customer.

Path parameters

  • customerIduuidrequired

    The unique identifier of the customer this operation is scoped to. Customer IDs are stable across renames and email changes; treat them as opaque strings even though the underlying format is a UUID.

Query parameters

  • per_pageintegeroptional

    The number of results to return per page

  • pageintegeroptional

    The page to retrieve results from

  • redeemedbooleanoptional

    Whether to include redeemed credits

  • expiredbooleanoptional

    Whether to include expired credits

  • revokedbooleanoptional

    Whether to include revoked credits

  • multi_usebooleanoptional

    Filter on credits that are multi-use or single-use

Responses

  • 200

    The customer's credits were successfully retrieved

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

post/customers/customers/{customerId}/credits

Issue a Customer Credit

createCustomerCredit

Issues a one-off credit to the customer. Use this endpoint to grant an ad-hoc coupon credit; recurring credits typically come from membership credit rules.

Path parameters

  • customerIduuidrequired

    The unique identifier of the customer this operation is scoped to. Customer IDs are stable across renames and email changes; treat them as opaque strings even though the underlying format is a UUID.

Request body

  • coupon_iduuidrequired

    The Coupon template that defines what the credit entitles the customer to spend (offering, monetary value, redemption rules). Every credit is issued from a coupon — there is no free-form credit grant.

  • customer_iduuidrequired

    The Customer the credit is issued to. Credits are scoped to a single customer and cannot be transferred between customers later.

  • membership_iduuidoptional

    The Membership the credit relates to, if the credit is being issued as part of a membership benefit (e.g. a monthly recurring complimentary treatment). Omit for one-off credits unrelated to a membership.

  • expiry_datedate-timeoptional

    The datetime which the credit will expire

  • revenueintegeroptional

    The amount of revenue that should be allocated when this credit is redeemed, in the smallest unit of currency.

Responses

  • 201

    The customer's credit was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

get/customers/customers/{customerId}/credits/{creditId}

Get a Customer Credit

getCustomerCredit

Retrieves a single customer credit by its ID.

Path parameters

  • customerIduuidrequired

    The unique identifier of the customer this operation is scoped to. Customer IDs are stable across renames and email changes; treat them as opaque strings even though the underlying format is a UUID.

  • creditIduuidrequired

    The unique identifier of the customer credit this operation is scoped to.

Responses

  • 200

    The customer's credit was successfully retrieved

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

delete/customers/customers/{customerId}/credits/{creditId}

Revoke a Customer Credit

deleteCustomerCredit

Revokes the given customer credit so that it can no longer be redeemed. Credits that have already been redeemed cannot be revoked.

Path parameters

  • customerIduuidrequired

    The unique identifier of the customer this operation is scoped to. Customer IDs are stable across renames and email changes; treat them as opaque strings even though the underlying format is a UUID.

  • creditIduuidrequired

    The unique identifier of the customer credit this operation is scoped to.

Responses

  • 200

    The customer's credit was successfully retrieved

  • 400

    The credit couldn't be revoked

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found