Skip to content

Choose whose wallet pays for this domain

PUT
/domains/{domain}/billing-member
curl --request PUT \
--url https://api.nsin.ir/domains/example.com/billing-member \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "user_id": 1 }'

Nominates the member whose wallet is charged for this domain — automatic renewals and interactive purchases alike — or clears the nomination with user_id: null so the owner pays again.

Owner only (platform support aside). This is deliberately not gated on domain.settings: a member with the admin role holds that permission, and an admin member must not be able to point the bill at somebody else on a domain they do not own.

The nominee must already hold an accepted membership on this domain. A pending invitation is not one — it grants nothing until it is accepted, and nominating against it would let an owner charge someone who never joined.

There is no consent step and no pending state: the nomination is in force the moment it is written, and the nominee is notified immediately. Their escape hatch is leaving the domain. Use GET /domains/{domain}/payer to show who pays, and what they have, before a purchase.

domain
required
string

The domain name (for example example.com) — not a numeric id.

Example
example.com
Media type application/json
object
user_id

The member’s user id, from GET /domains/{domain}/members. null, 0 or the owner’s own id all clear the nomination — the owner paying is the absence of a nomination, not one of its own.

integer | null
Example generated
{
"user_id": 1
}

The payer after the change. Always populated: with no nomination in force it describes the owner.

Media type application/json
object
billing_member

Whose wallet this domain’s charges come out of. Always populated — with no nomination in force it describes the owner.

object
user_id
integer
name
string
email
string
set_by

Who made the nomination. Absent when the owner pays.

integer
set_at
string format: date-time
is_owner

True when no nomination is in force and the domain owner pays. The owner being named explicitly is stored as no nomination, so this never disagrees with ownership.

boolean
Example generated
{
"billing_member": {
"user_id": 1,
"name": "example",
"email": "example",
"set_by": 1,
"set_at": "2026-04-15T12:00:00Z",
"is_owner": true
}
}

Malformed body, or the nominee has no accepted membership on this domain (code: not_a_member).

Media type application/json
object
error
required

Human-readable description of what went wrong.

string
code

Present when the nominee has no accepted membership on this domain — so a client can offer “invite them first” instead of just printing the message.

string
Allowed values: not_a_member
Examples
Example notAMember
{
"error": "that person must accept the domain invitation before they can be set as the payer",
"code": "not_a_member"
}

Missing, malformed, revoked or expired API key — or the owning account is inactive.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

The key is read-only, or you are a member of this domain but not its owner.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example notOwner
{
"error": "only the domain owner can choose who pays for this domain"
}

No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}