Skip to content
Lumean API

private-giftcodes.{userId}

Gift codes and reseller status of the key owner: a batch issued, a code changing status, the reseller status and the reseller application changing. Events never carry code values, only masks; the full code comes from GET /reseller/codes and GET /reseller/codes/{uuid}. Key permission: reseller.read.

Channel parameters

Fill in your values — they appear in the channel name, in the code below and in the console. They are sent nowhere and never end up in the page URL.

is the numeric id of the key owner, returned by GET /user.

Channel name to subscribe to

private-giftcodes.{userId}

The name still contains placeholders in braces. You cannot subscribe with it: the server authorizes channels by exact name.

import Pusher from 'pusher-js';

const pusher = new Pusher('7c4dd881d8116ac76fe89aff71d8c2ff', {
  wsHost: 'ws.lumean.app',
  wsPort: 443, wssPort: 443,
  forceTLS: true,
  enabledTransports: ['ws', 'wss'],
  cluster: '',
  channelAuthorization: {
    endpoint: 'https://api.lumean.app/api/public/broadcasting/auth',
    headers: { 'X-API-KEY': 'YOUR_API_KEY' },
  },
});

const channel = pusher.subscribe('private-giftcodes.{userId}');
channel.bind('status.changed', (data) => {
  console.log(data);
});

Payload example

not connected

Channel: private-giftcodes.{userId}

This is an example from the spec. There is no connection and none is simulated: subscribing for real needs your API key.

needs a key with the reseller.read scope

.status.changed

{
  "gift_code": {
    "uuid": "a2467160-ceab-4ab6-8095-7a0fafda7648",
    "code_masked": "LUM-****-****-SNKG",
    "nominal": 10000000000,
    "nominal_formatted": 100000000,
    "source": "purchase",
    "funding": "crypto",
    "status": "active",
    "activatable_at": "2026-10-10T14:47:14+00:00",
    "redeemed_at": "2026-10-10T14:48:14+00:00",
    "cancelled_at": "2026-10-10T14:48:14+00:00",
    "created_at": "2026-10-10T14:48:14+00:00",
    "currency_asset": {
      "code": "LUMC",
      "precision": 2
    }
  }
}

Channel events: 4

Every event has its own anchor, a full payload table with descriptions and enums, and a sample shape. Names are shown in Laravel Echo notation — with the leading dot.

.status.changed

Echo: .status.changed · pusher-js: status.changed

A gift code changed status.

Payload fields

gift_coderequired
object
uuidrequired
string
Example a2467160-ceab-4ab6-8095-7a0fafda7648
code_maskedrequired
string
Example LUM-****-****-SNKG
nominalrequired
integer
Example 10000000000
nominal_formattedrequired
number
Example 100000000
sourcerequired
Valuespurchasereseller
string
Example purchase
fundingrequired
Valuesrubcryptomixed
string
Example crypto
statusrequired
Valuesactiverefundingredeemedrefundedcancelledannulled
string
Example active
activatable_atrequired
string
Example 2026-10-10T14:47:14+00:00
redeemed_atrequired
string (date-time) | null
Example 2026-10-10T14:48:14+00:00
cancelled_atrequired
string (date-time) | null
Example 2026-10-10T14:48:14+00:00
created_atrequired
string
Example 2026-10-10T14:48:14+00:00
currency_assetrequired
object
coderequired
string
Example LUMC
precisionrequired
integer
Example 2

Payload example

{
  "gift_code": {
    "uuid": "a2467160-ceab-4ab6-8095-7a0fafda7648",
    "code_masked": "LUM-****-****-SNKG",
    "nominal": 10000000000,
    "nominal_formatted": 100000000,
    "source": "purchase",
    "funding": "crypto",
    "status": "active",
    "activatable_at": "2026-10-10T14:47:14+00:00",
    "redeemed_at": "2026-10-10T14:48:14+00:00",
    "cancelled_at": "2026-10-10T14:48:14+00:00",
    "created_at": "2026-10-10T14:48:14+00:00",
    "currency_asset": {
      "code": "LUMC",
      "precision": 2
    }
  }
}

Values come from the spec where the spec has them; the rest are type-based placeholders. This is the shape of the event, not a recording of a real one.

.issued

Echo: .issued · pusher-js: issued

A batch of gift codes was issued: the batch summary, without code values.

Payload fields

batchrequired
object
uuidrequired
string
Example 0a926d68-e974-4220-aab2-7952b111f170
sourcerequired
Valuespurchasereseller
string
Example purchase
codes_countrequired
integer
Example 1
nominal_totalrequired
integer
Example 0
nominal_total_formattedrequired
number
Example 0
created_atrequired
string
Example 2026-10-10T14:48:13+00:00
currency_assetrequired
object
coderequired
string
Example LUMC
precisionrequired
integer
Example 2

Payload example

{
  "batch": {
    "uuid": "0a926d68-e974-4220-aab2-7952b111f170",
    "source": "purchase",
    "codes_count": 1,
    "nominal_total": 0,
    "nominal_total_formatted": 0,
    "created_at": "2026-10-10T14:48:13+00:00",
    "currency_asset": {
      "code": "LUMC",
      "precision": 2
    }
  }
}

Values come from the spec where the spec has them; the rest are type-based placeholders. This is the shape of the event, not a recording of a real one.

.reseller.application.status.changed

Echo: .reseller.application.status.changed · pusher-js: reseller.application.status.changed

The status of the reseller application changed.

Payload fields

applicationrequired
object
idrequired
integer
Example 14
statusrequired
Valuespendingapprovedrejectedwithdrawn
string
Example pending
admin_commentrequired
string | null
Example example
reviewed_atrequired
string (date-time) | null
Example 2026-10-10T14:48:15+00:00
created_atrequired
string
Example 2026-10-10T14:48:15+00:00

Payload example

{
  "application": {
    "id": 14,
    "status": "pending",
    "admin_comment": "example",
    "reviewed_at": "2026-10-10T14:48:15+00:00",
    "created_at": "2026-10-10T14:48:15+00:00"
  }
}

Values come from the spec where the spec has them; the rest are type-based placeholders. This is the shape of the event, not a recording of a real one.

.reseller.status.changed

Echo: .reseller.status.changed · pusher-js: reseller.status.changed

The reseller status changed.

Payload fields

resellerrequired
object
idrequired
integer
Example 1
statusrequired
Valuesactiveblockedrevoked
string
Example active
discount_bpsrequired
integer
Example 0
blocked_reasonrequired
string | null
Example example
approved_atrequired
string
Example 2026-10-12T15:55:20+00:00
currency_assetrequired
object
coderequired
string
Example LUMC
precisionrequired
integer
Example 2

Payload example

{
  "reseller": {
    "id": 1,
    "status": "active",
    "discount_bps": 0,
    "blocked_reason": "example",
    "approved_at": "2026-10-12T15:55:20+00:00",
    "currency_asset": {
      "code": "LUMC",
      "precision": 2
    }
  }
}

Values come from the spec where the spec has them; the rest are type-based placeholders. This is the shape of the event, not a recording of a real one.

All channels and connection parameters·POST /broadcasting/auth

Feed this page to an AI

Open .mdllm.md

spec 0.0.1