Developer preview

Architecture overview for customer-action billing.

This page is a developer preview of MonetLayer object relationships, verification rules, and webhook direction. It does not expose a public production API hostname.

Related reading: product lifecycle, settlement proof, reconciliation, and usage-based billing.

API contract preview — not a public production endpoint

Example base URL placeholder

https://api.example.monetlayer.dev

Use this only as a contract sketch for early-access discussion. Do not treat it as a live public endpoint.

Quickstart preview

A coherent object flow around one collection.

  1. 01

    Create plan

  2. 02

    Create subscription

  3. 03

    Open invoice

  4. 04

    Create payment attempt

  5. 05

    Receive customer-action requirement

  6. 06

    Verify settlement

  7. 07

    Receive webhook

01Plan
02Subscription
03Invoice
04PaymentAttempt
05CustomerActionRequest
06SettlementEvidence
07Entitlement
08WebhookEvent
09WebhookDelivery

Conceptual billing object

{
  "invoice_id": "inv_preview",
  "amount": {
    "raw": "100000",
    "decimals": 6,
    "formatted": "0.100000",
    "currency": "USDC"
  },
  "collection_method": "customer_initiated",
  "payment_status": "requires_action",
  "network": "base-sepolia"
}
01

Plan

Commercial template for price, cadence, and entitlement rules.

02

Subscription

Customer binding to a plan across billing periods.

03

Invoice

Amount-due record for a collection period.

04

PaymentAttempt

Collection attempt with explicit action and verification state.

05

CustomerActionRequest

Requirement for customer wallet confirmation.

06

SettlementEvidence

Verified onchain receipt evidence bound to billing state.

07

Entitlement

Access state activated after reconciliation.

08

WebhookEvent

Durable merchant-facing state-change event.

09

WebhookDelivery

Delivery attempt history for a webhook event.

Example response

Requires-action invoice shape with integer-safe amounts.

{
  "invoiceId": "inv_preview_example",
  "status": "requires_action",
  "collectionMethod": "customer_initiated",
  "network": "base-sepolia",
  "amount": {
    "raw": "100000",
    "decimals": 6,
    "formatted": "0.100000",
    "currency": "USDC"
  }
}

Execution boundary

Payment execution is separate from billing truth.

A provider can submit or observe payment movement. MonetLayer records the billing lifecycle, verifies settlement evidence, reconciles invoice state, activates entitlement, and delivers merchant webhooks.

Billing truth

01
MonetLayer billing coreLifecycle, reconcile, entitle

Payment execution

01
Payment execution providerSubmit or observe movement

Customer-action lifecycle

01invoice.open
02payment.requires_action
03transaction.submitted
04receipt.verified
05invoice.paid
06entitlement.active
07webhook.delivered

Webhook events

Label contract maturity honestly.

01

invoice.opened

Current contract direction

02

payment_attempt.requires_action

Current contract direction

03

settlement.confirmed

Current contract direction

04

invoice.paid

Current contract direction

05

entitlement.activated

Current contract direction

06

webhook.delivery_succeeded

Proposed contract

07

webhook.delivery_failed

Proposed contract

Idempotency

Duplicate webhook processing and historical replay against the same payment evidence must not create conflicting billing state. Exact request headers such as Idempotency-Key are not published here unless verified in the public contract.

Environment details

Network: Base Sepolia. Chain ID: 84532. Billing asset: USDC. Collection model: Customer initiated. Signature: Required for each demonstrated collection. Product status: Early access / testnet.

Provider support status

Provider availability is stated narrowly.

ProviderCurrent status
MockLocal and staging testing
Direct BaseCustomer-initiated Base Sepolia
StablecoinX HarnessBlocked pending documentation and access