Skip to navigation

Set default payment method

Set a payment method as the default for future payments.

Real-money operation. This call moves real funds (or mints a real-money credential) when authenticated with a drzl_live_ key. In the interactive API Explorer, use a drzl_test_ paper key against staging — a live-money endpoint called with a test key is rejected with 403 TEST_KEY_LIVE_ENDPOINT. Never paste a drzl_live_ key into a browser.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

OR
X-API-Keystring

Server-side API key (drzl_live_ prefix), least-privilege scoped. Keep it secret — never ship it to a browser or SPA. An alternative to a session JWT (HTTPBearer) on the developer surface. See docs/api/cors-and-auth.md.

Path parameters

payment_method_idstringRequired

Headers

X-API-Keystring or nullOptional
Idempotency-KeystringOptional<=255 characters

Client-supplied key that makes this unsafe mutation retry-safe. Reusing a key with the same request replays the original result (the response then carries Idempotency-Replayed: true); reusing it with a different request returns 409. Optional but strongly recommended so a network retry cannot double-apply.

Response

Successful Response

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error