Docs

Beta developer packet

A concise handoff for invited app developers integrating native ATM checkout and notifications in test mode.

Closed beta@atmosphere-money/app-nodeSDK beta: 0.0.0-beta.3ATM API beta: 2026-0671 published lexicons

Compatible with the closed-beta ATM app APIs and versioned ATM event headers. Check atm-api-version on every webhook or XRPC receiver event.

Install

For invited apps, the first integration is fixed-price digital checkout in test mode. Install the pinned native SDK build supplied for your integration on a trusted backend, and keep its integrity hash in your lockfile; older npm betas may not include the native helpers. Service-auth, attempt storage, status tokens, notification verification and fulfilment never run in the browser.

sh
# For example, a supplied package tarball:
npm install ./atmosphere-money-app-node-<version>.tgz
npm install -D @atmosphere-money/testing@beta

Package browser links: App Node SDK on npmx and Testing package on npmx. Use these for README/source/provenance review; npm remains the canonical install source.

Test configuration

ATM assigns these values with your invitation. Keep them together; every attempt is bound to them, and a later change cannot rebind an existing purchase.

App DID and originThe DID of the app account registered in ATM, and its exact HTTPS app origin.
Test brokerThe assigned test broker DID and HTTPS checkout origin. The service-auth audience is <brokerDid>#atmosphere_money_broker.
Dashboard originWhere buyers open ATM’s authenticated receipt view.
Test seller and catalogA seller with payment permission and accepted terms, and the exact Product and fixed Price strongRefs.
NotificationsThe canonical XRPC receiver, or a signed-HTTP webhook URL and its test signing secret.
Service-authYour app account’s PDS session, which signs a new token for every call. Keep it private.

Test-mode checklist

  • Confirm your assigned test configuration and that fixed digital checkout is admitted for your app.
  • Mint a new service-auth JWT for every call, with the exact method and the broker audience. Never cache one or use an API key for XRPC.
  • Capture a durable attempt before createCheckout, retry only with its exact body and key, and save the response before redirecting.
  • Poll getCheckoutStatus by authenticated POST from a backend worker, even when the browser never returns.
  • Handle all five statuses and the final payer; grant a digital purchase once, under a unique effect key, only on completed plus fulfil.
  • Verify every notification, use durable fenced claims, and queue reconciliation before acknowledging. Test duplicates, early delivery and failed local saves.
  • Test cancel and return paths in the browser without treating them as payment truth.
  • Keep status tokens, checkout URLs, raw bodies, secrets and private buyer data out of logs.

Callbacks

AT-native apps default to protocol-shaped callbacks authenticated with ATM service-auth. Conventional web apps may explicitly select signed HTTP webhooks. Either callback should wake canonical status reconciliation rather than fulfill directly.

API shape

createAtmCheckoutAttemptsCapture, recover and reconcile native test checkouts durably.
createCheckoutPOST money.atmosphere.payment.createCheckout: start hosted ATM checkout from your server.
getCheckoutStatusPOST money.atmosphere.payment.getCheckoutStatus: read canonical status with the saved token.
Webhook and receiver helpersVerify signed HTTP webhooks or ATM’s receiver service-auth before queuing reconciliation.
Tickets methodsAvailability, holds, free claims, verify and check-in follow their own admitted contract.

Auth model

App to ATMApp service-auth JWT minted server-side by the app.
App to ATM developer utilitiesRestricted environment API key; never accepted by XRPC.
Payer assertionAn optional short-lived service-auth JWT from the signed-in buyer, sent as payerAssertionJwt with payerDid.
ATM to app webhookHMAC signature with the environment webhook secret.
ATM to app XRPC receiverATM service-auth JWT scoped to money.atmosphere.event.receiveEvent.

Sample events

Use the testing package to generate signed fixtures for app tests. The same event envelope shape is used by HTTP webhooks and optional XRPC receiver callbacks. Event payloads include a Lexicon$type marker for generated AT Protocol receiver tooling; most apps can still branch on the envelopetype.

ts
import {
  ATM_TEST_WEBHOOK_SECRET,
  createAtmWebhookRequest,
  createPaymentCompletedFixture,
} from "@atmosphere-money/testing";
import { constructTypedAtmWebhookEvent } from "@atmosphere-money/app-node";

const fixture = createPaymentCompletedFixture({
  payment: { id: "pay_test_123", metadata: { appOrderId: "ord_123" } },
});
const request = createAtmWebhookRequest(fixture);
const event = constructTypedAtmWebhookEvent({
  rawBody: fixture.rawBody,
  secret: ATM_TEST_WEBHOOK_SECRET,
  expectedType: "payment.completed",
  now: fixture.signatureTimestamp,
  headers: {
    signature: request.headers.get("atm-signature"),
    deliveryId: request.headers.get("atm-delivery-id"),
    event: request.headers.get("atm-event"),
    apiVersion: request.headers.get("atm-api-version"),
    environment: request.headers.get("atm-environment"),
  },
});

Ticket flow

  1. 01

    Buyer selects ticket type

    The selling app renders the event page and ticket selection UX; the organizer owns the event record and canonical ticket configuration.

  2. 02

    Check availability

    The app asks ATM Tickets for current private inventory state.

  3. 03

    Create hold

    ATM reserves scarce capacity and returns a hold id plus checkout URL.

  4. 04

    Buyer pays

    ATM checkout handles ATM Wallet, cards, eligible device wallets, receipts, and payment state.

  5. 05

    Tickets issued

    ATM issues tickets once and sends tickets.issued to the app receiver.

  6. 06

    Fulfill

    The app shows the buyer tickets after verified event delivery or confirmed ATM state.

Free limited tickets use claimFreeTicket instead of checkout. ATM still owns capacity and issuance. Tickets follow their own admitted contract, separate from native checkout.

Current beta caveats

  • Fixed-price digital checkout in test mode is the first admitted flow; other product types arrive as ATM admits them.
  • Fixed monthly subscriptions are not yet available; ATM will publish their recovery API before admitting them.
  • Install the pinned native build; older npm betas may not include the native helpers.
  • Test and live environments are separate, and live payments need a separate review.
  • Authenticated POST status polling is the default reconciliation path; notifications are wake-ups.
  • The default XRPC receiver requires ATM service-auth verification plus jti replay protection.
  • Embedded checkout is on the roadmap; hosted checkout is the current surface.

Support

For access, registration, notification troubleshooting or a later live review, contact ATM support with your app DID, the environment, your attempt ID, the ATM payment ID, the delivery ID and the error code. Never send a status token, checkout URL, JWT, webhook secret or private buyer data.