DomaineeDocs

Update a purchase (cancel / auto-renew)

PATCH /v1/domain-purchases/:id — toggle the autoRenew preference. Effectively the "cancel" action.

PATCH /v1/domain-purchases/:id

Toggles the autoRenew flag on an existing purchase. Set to false to cancel: the domain runs out its current term and isn't renewed.

Domains can't be cancelled mid-term — the registration is paid for and runs until expiresAt. Setting autoRenew: false is the practical "cancel" path (the domain expires naturally on its anniversary).

Request

curl -X PATCH https://api.domainee.dev/v1/domain-purchases/f8a0c1b9-… \
  -H "Authorization: Bearer $DOMAINEE_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "autoRenew": false }'

Body parameters

FieldRequiredNotes
autoRenewtrue enrolls in auto-renew; false cancels it.

Response — 200 OK

Same shape as GET /v1/domain-purchases/:id — the full updated purchase row.

{
  "purchase": {
    "id": "f8a0c1b9-1234-…",
    "hostname": "janesbakery.com",
    "autoRenew": false,
    "expiresAt": "2027-05-17T15:42:11.000Z",
    "status": "completed"
  }
}

Notes

  • Toggling has no immediate financial effect. No charge, no refund.
  • The auto-renew worker runs daily, picks domains expiring within 30 days where autoRenew: true, and renews them. Cancelling later than 30 days before expiry is the same as cancelling today.
  • Want a hard cancel + refund? Within the registrar's grace window (first ~5 days for .com/.net) contact support — auto-self-serve refund is on the roadmap.

On this page