API versionv2 next

API v2 is not live yet: it launches in early 2027, and until then these pages are its spec. Switch to v1 (live)

Delete subscriber

Delete a subscriber's saved card, so that it can no longer be charged. The subscriber stays, with its history, and the payer can renew it with a new card.

Request

DELETE https://api.gjold.com/v2/{shopid}:sub:{subid}
  • {subid} is the subscriber's "id", from seq.

The request has no body. The key needs the charge permission.

Headers

HTTP header Description
Authorization

Required. Your API key, after Basic and base64-encoded. See Authentication.

Response

We answer 200 OK with an empty object, {}, once the card is forgotten. What is final is that: we no longer have the card, and can't get it back. The subscriber itself remains:

  • Seq returns it with a "delete" in its "acts", and its "rev" one higher.
  • Charge subscriber fails with 410 subscriber deleted.
  • Renew subscriber works as before: the payer saves a new card, and the subscriber can be charged again, with its old "id".
  • Its charges, which are transactions, are not affected: you can still capture, refund, or void them.

Deleting a subscriber that is deleted already changes nothing, and answers 200 OK again, so the request is safe to send again.

Errors

Besides the errors that any request can give, which Errors lists:

Status and message Description
404 subscriber not found The shop has no subscriber with that {subid}.

When to delete

Delete a subscriber when the payer cancels, and you will not charge them again, or when they ask you to forget their card. Until you do, the card can be charged, and a leaked API key could charge it. See Charging subscribers.