Tizondocs
ReferenceRevenue

Pay earnings out over Lightning

POST
/v1/revenue/payouts

Pays earnings to the account's Lightning address, in satoshis worth the amount at the moment the invoice is made. Omit amount to pay out everything payable.

What is payable is the Revenue Centre's balance less any overdraft the wallet has drawn: Tizon never sends out money the account owes back. The routing fee is Tizon's; the address receives the whole amount.

The payout is taken from the balance at once and sent in the background, so it comes back pending. It ends succeeded, or failed with the money returned to the Revenue Centre; payout.succeeded and payout.failed say which. Payouts may be paused on Tizon's side (503 payouts_unavailable), which never touches what has been earned.

Authorization

ApiKey
AuthorizationBearer <token>

An account API key, sent as Authorization: Bearer tz_live_…. The prefix selects the mode: tz_test_ for sandbox, tz_live_ for real money.

In: header

Header Parameters

Idempotency-Key*string

A client-generated key, unique per intended operation, that makes this request safe to retry. The same key returns the original response; the same key with a different request is rejected. Missing: 400 idempotency_key_required.

Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/revenue/payouts" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "object": "payout",  "livemode": true,  "status": "pending",  "amount": {    "amount": 1450,    "currency": "USD"  },  "lightning_address": "string",  "payment_hash": "string",  "amount_sats": 0,  "failure_reason": "string",  "created_at": "2019-08-24T14:15:22Z",  "resolved_at": "2019-08-24T14:15:22Z"}