palbaseDocs

Palbase Payments · API

DELETE/payments/customers/{customer_id}

Delete a payer

Forgets a payer. Its customer record at each provider is deleted first (its cards go with it) — every channel whose keys are still kept is asked, in use or not — then its profile, cards and references here. A provider that cannot be reached fails the deletion with 503 provider_unavailable: the deletion is not finished and nothing is deleted here; retrying is safe. A provider that refuses the channel's keys, or whose account does not have the record (the channel's keys are another account's now), cannot be asked: its record stays there, the payer is forgotten here all the same, and the answer names the record (provider_records_kept). What the payer paid stays in the books: its payments no longer name it, and the entries of the append-only wallet ledger keep the id they were written under — name payers by an id of your own, not by a name or an email. Refused with customer_has_subscriptions while a subscription of its is not ended, and customer_has_wallet_balance while a wallet of its holds, reserves or owes money. Refused with customer_has_open_invoices while an invoice of its is open, or still being made: void it, mark it uncollectible, or have it paid first.

Called by your server, with the project's secret key.

Path

customer_idstring · requiredThe payer's id: a user id, or any name of 1 to 128 characters the project's server gives a company or a team. Escape it as a path segment.
curl
curl -X DELETE "https://<your-ref>.palbase.studio/payments/customers/<customer_id>" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

200Payer deleted

defaultStandard Palbase JSON error envelope (`error` and `error_description`).

Operation DeleteCustomer of payments's contract.