v1 · interfaces may evolve between versions

Developer docs

For partner product, engineering and integration teams: integrating the TLAY Connect SDK into your app, configuring campaigns, how payments are verified and plans issued, and the platform API.

Overview

Most partners integrate the TLAY Connect SDK into their own app. Users pay, claim data, connect their card and install plans without leaving your app, while the SDK talks to the TLAY Connect platform. Partners without an app can point users to TLAY Connect instead.

Your app + TLAY Connect SDK
Wallet signing and payments, Bluetooth SIM connection, plan installs, status and usage — in your own UI
Or: the TLAY Connect app (no development needed)
TLAY Connect platform
On-chain monitoring and eligibility checks, budgets and deduplication, global plan catalog, eSIM provisioning, usage, renewals and order management, ops console and reporting

Partners own the campaign rules and budget, the user channel and the merchant address — plus, when integrating the SDK, the in-app UI and user accounts.

SDK integration

The TLAY Connect SDK wraps payment verification, card connection and plan installation in a few modules. Your users stay in your app the whole time.

PlatformStatusRequirements
Android (native / Kotlin)Available[Android version TBD], Bluetooth Low Energy
iOS (native / Swift)In developmentiOS 15.6 or later, real devices only (no Simulator)
React NativeIn development — one API for Android and iOSAs above, per platform
ModuleWhat it does
accountLinks your user to a TLAY Connect account using a user token issued by your backend
walletWallet signature binding, stablecoin payments, transaction submission; works with your app’s existing wallet signer or the built-in wallet
cardsScan and connect Bluetooth SIMs (with card password), read the EID, link the card and write plans to it; built-in eSIM installs go through the OS install flow (Apple’s setup screen on iOS, confirmed by the user)
campaignsLive campaigns; submit a transaction and get the eligibility result
entitlementsList plans, install to card with step-by-step progress callbacks, renew, usage and end date
ui (optional)Prebuilt screens for card connection, install progress and usage, themed to your brand
Integration steps
  1. Once you join, get the SDK package and sandbox keys (a publishable client key and a server secret).
  2. Add the SDK to your app and declare the Bluetooth and network permissions.
  3. On your backend, use the server secret to issue a TLAY Connect user token for each user; the app starts its session with it.
  4. Build card connection and plan installs first, then the campaign or purchase flow.
  5. Pass acceptance testing on testnet, then switch to production keys and go live.
Example (Android, illustrative API)
// Initialize
TlayConnect.init(context, TlayConfig(
    publishableKey = "pk_test_…",
    environment = Environment.SANDBOX
))

// Start a user session with a token from your backend
TlayConnect.account.signIn(userToken)

// Scan, connect and link a Bluetooth SIM
val card = TlayConnect.cards.scan().first()
TlayConnect.cards.connect(card, password = cardPassword)
TlayConnect.cards.bind(card)

// Install a ready plan to the card, with progress callbacks
TlayConnect.entitlements.install(entitlementId) { stage ->
    progressView.show(stage)
}

Keep the server secret on your backend. Never ship it inside the app.

Core concepts

ObjectDescription
CampaignA set of reward rules: qualifying action, time window, budget, limits and reward plan
EligibilityThe result of checking one on-chain transfer against one campaign: qualified, or rejected with a reason
PaymentIntentCreated when a user buys or renews a plan; locks the price, has its own deposit address, valid for 30 minutes
EntitlementA plan the user holds, from a campaign reward or a purchase, linked to one card
RenewalAdds another period of the same plan to an existing entitlement; no reinstall needed
CardA linked eUICC identified by its EID; a card belongs to one user at a time

Campaign settings

Today, the TLAY team sets up your campaign in the ops console with the fields below. Every change is recorded in the audit log.

FieldDescriptionExample
Merchant addressThe address users must pay for a payment to qualifyYour merchant address
Network and tokenOnly this stablecoin on this network is accepted[Network] · [Stablecoin]
Minimum amountPer-payment minimum, compared at the token’s native precision[Amount]
Time windowJudged by the timestamp of the block containing the transactionStart and end time
Reward planThe plan issued when a payment qualifiesJapan · 1 GB · 7 days
Total budgetMaximum rewards; reserved and settled within one transaction100 rewards
Per-user / per-card limitHow many times one user or one card can claim1
Require wallet signatureWhen on, only wallets with a proven signature countOn

Eligibility and rejection reasons

Each on-chain transfer is checked once per campaign and the result is stored. Resubmitting, re-scanning or processing the same transaction concurrently never creates a second reward. Rejected payments carry one of these reasons:

CodeMeaning
CAMPAIGN_INACTIVEThe campaign is paused or not enabled
OUTSIDE_WINDOWThe transaction falls outside the campaign window
WRONG_TOKENWrong token or network
WRONG_RECIPIENTThe recipient isn’t the campaign’s merchant address
BELOW_MINBelow the minimum amount
SELF_TRANSFERA self-transfer, or the payer is an address the platform controls
PAYER_NOT_BOUNDThe paying wallet isn’t linked to any user
WALLET_NOT_VERIFIEDThe campaign requires a signature, but the wallet was only registered by address
NO_CARDThe user hasn’t linked a card
USER_LIMITOver the per-user limit
CARD_LIMITOver the per-card limit
BUDGET_EXHAUSTEDThe campaign budget is used up

On-chain confirmation

  • The platform only acts on finalized transactions. A transaction submitted before finality returns pending and is processed automatically once final.
  • Each transfer event is identified by chain_id + tx_hash + log_index and deduplicated on ingestion.
  • The platform monitors campaign merchant addresses and payment deposit addresses; the app can also submit a transaction hash directly. Both paths use the same checks.
  • Purchases are matched by their unique deposit address, never by guessing from amount or time.
Sandbox parameters (for integration) The test network, stablecoin contract addresses and other parameters come with your sandbox keys. Production networks and stablecoins are configured to each partner’s needs.

Entitlement lifecycle

reserved→fulfilling→ready→installed→active→finished
StatusDescription
reservedBudget or payment locked, waiting to be issued
fulfillingThe plan is being provisioned, or an unclear result is being reconciled
readyActivation details ready; not installed on a card yet
installedThe app reported a successful install
activeThe plan is in use
suspendedPaused by the operator
finishedData used up or plan expired
failedDefinitive failure; campaign budget released automatically, purchases refunded
manual_reviewThe outcome can’t be proven automatically; handed to the ops team

If provisioning times out, the platform reconciles before deciding to retry. It retries automatically only when it can prove the plan wasn’t provisioned — it never provisions twice.

Platform API (v1)

This is the API the SDK uses under the hood; call it directly if you build your own UI or integrate server-side. REST + JSON, base URL [https://api.your-domain/v1]. Everything except the config endpoint requires Authorization: Bearer <token>.

MethodPathPurpose
GET/configPublic settings: network, token, explorer
POST/auth/registerRegister with an invite code; returns a token
POST/wallet/challengeGet a wallet signing challenge
POST/wallet/bindLink a wallet (verified when signed)
POST/cards/bindLink a card by EID
GET/productsPlans on sale
GET/campaignsLive campaigns and remaining rewards
POST/campaigns/:id/submit-txSubmit a transaction hash; returns eligibility
POST/payment-intentsCreate a purchase payment intent
GET/payment-intents/:idPayment intent status
GET/entitlements, /entitlements/:idEntitlements and details (usage, renewal history)
GET / POST/entitlements/:id/renewalRenewal quote / create a renewal payment intent
POST/entitlements/:id/install-reportReport the install result and step timings
Example: submit a campaign transaction
POST /v1/campaigns/c_123/submit-tx
Authorization: Bearer <token>
Content-Type: application/json

{ "txHash": "0x3686…98db1ea3" }

200 OK
{
  "state": "processed",
  "eligibilities": [
    {
      "status": "qualified",
      "reason": null,
      "entitlementId": "e_456"
    }
  ]
}
Error format
422 Unprocessable Entity
{
  "error": {
    "code": "RENEWAL_NOT_ELIGIBLE",
    "message": "…",
    "details": { "reason": "ORDER_FINISHED" }
  }
}

Reports and data

  • Per campaign: cards linked, qualified and rejected payments (by reason), entitlements by status, issuing success rate, duplicate rewards, and P50 / P90 time from confirmed payment to ready-to-install.
  • CSV exports mask wallet addresses, EIDs and ICCIDs and never include activation codes.
  • Sent weekly; a live dashboard is [planned].

Security and audit

  • Server secrets stay on the server and never appear in the app, logs or exports; clients use only the publishable key and user tokens.
  • Activation codes are encrypted at rest and returned only to the user who owns the entitlement.
  • Every manual action in the ops console — reissue, refund, suspend, resume, renewal handling — records the operator, the reason and the before and after state.
  • Each partner can be limited to an allowlist of plans and an issuing cap; requests over the limit are blocked before provisioning.