API referencePenalties

Penalties

2 operations. Every schema and example on this page is generated from the platform contract.

Charge (or retry) a single gym no-show fee.

Merchant approves or retries one no-show penalty fee: an off-session destination charge on the member's saved card (gym keeps 100%, fee-neutral application fee recovers only Stripe's cost). Atomic single-winner claim + a Stripe idempotency key make it safe against concurrent crons / double taps. Requires the gym-management entitlement and the can_waive_penalties staff permission, and the fee must belong to the authorised store. A non-ok result (no card, consent withdrawn, SCA required, store dark) is returned as a successful body with ok=false, not an HTTP error.

Request body

store_idstring · uuidrequired

Store the fee belongs to (also authorises the merchant). Never trusted for identity beyond authorisation.

action_idstring · uuidrequired

The gym_penalty_actions row (action_type=fee_charged) to charge or retry.

Response, 200

okbooleanrequired

Whether the fee was collected. false = a friendly, non-error outcome the merchant UI shows.

payment_intent_idstringoptional

Stripe PaymentIntent id of the successful charge.

amount_pencenumberoptional

Amount collected, in pence.

alreadybooleanoptional

True when the fee was already collected (idempotent replay of a prior success).

statusenumoptional

Why the charge did not complete (drives the merchant-readable reason).

no_cardblocked_no_consentno_accountfailednot_chargeable
failure_codestringoptional

Underlying Stripe/guard failure code (e.g. authentication_required, store_dark).

errorstringoptional

Human-readable failure detail.

curl -X POST "https://www.membber.com/api/v1/penalties/fee-charges" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "store_id": "6659c139-0000-4000-8000-d0c500000066",
    "action_id": "0bd1bfc4-0000-4000-8000-d0c50000000b"
  }'
Response, 200
{
  "ok": true,
  "payment_intent_id": "0b6642a5-0000-4000-8000-d0c50000000b",
  "amount_pence": 1500,
  "already": true,
  "status": "no_card",
  "failure_code": "EXAMPLE10",
  "error": "<error>"
}

List a store's no-show fees to collect.

Merchant reviews the no-show penalty fees owed to their gym (the "Payments to collect" inbox), newest first, each with its collection status, amount, member, strike count, and any failure code. Optionally filtered by a comma-separated list of fee statuses. Requires the gym-management entitlement.

Parameters

store_idstring · uuidqueryrequired

Store whose fees to list (also authorises the merchant).

statusesstringqueryoptional

Comma-separated fee_status filter (e.g. pending,scheduled). Empty returns all statuses.

Response, 200

feesarray of objectrequired
11 child fields
action_idstringrequired
customer_idstringrequired
customer_namestring, nullablerequired
store_idstringrequired
amount_pencenumberrequired
fee_statusstringrequired
collect_afterstring, nullablerequired
charged_atstring, nullablerequired
failure_codestring, nullablerequired
strikes_at_timenumber, nullablerequired
created_atstringrequired
curl -G "https://www.membber.com/api/v1/penalties/fees-owed" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  --data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"
Response, 200
{
  "fees": [
    {
      "action_id": "0bd1bfc4-0000-4000-8000-d0c50000000b",
      "customer_id": "96607d1c-0000-4000-8000-d0c500000096",
      "customer_name": "Alex Example",
      "store_id": "6659c139-0000-4000-8000-d0c500000066",
      "amount_pence": 1500,
      "fee_status": "<fee_status>",
      "collect_after": "<collect_after>",
      "charged_at": "<charged_at>",
      "failure_code": "EXAMPLE10",
      "strikes_at_time": 1,
      "created_at": "<created_at>"
    }
  ]
}
WhatsApp
Book a Call
Start Free