Skip to main content

Base URL

All API requests use the following base URL:
https://api.maash.io

Versioning

The API is versioned via the URL path. The current version is v1:
https://api.maash.io/checkout/sessions

Authentication

All endpoints require two headers: x-api-key and x-maash-user-type. See the Authentication guide for details.
curl https://api.maash.io/checkout/sessions \
  -H "x-api-key: mk_live_1234567890abcdef1234567890abcdef" \
  -H "x-maash-user-type: checkout"
HeaderRequiredValue
x-api-keyYesYour merchant API key
x-maash-user-typeYescheckout

Request format

  • Use Content-Type: application/json for all POST and PUT requests.
  • Query parameters are used for GET requests with filters.
  • All monetary values in USD use number type with up to 2 decimal places.
  • Token amounts are returned as string to preserve decimal precision.

Response format

All successful responses wrap the result in a data object:
{
  "data": {
    "session_id": "cs_01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "status": "pending"
  }
}
Error responses use this structure:
{
  "error": "Validation failed",
  "details": {
    "validation_errors": ["amount_usd: Number must be greater than 0"]
  }
}
The details object and validation_errors array are included when there are specific validation issues. See Error Handling for more information.

ID formats

All resource IDs are ULID-based, prefixed by resource type:
ResourcePrefixExample
Checkout sessioncs_cs_01ARZ3NDEKTSV4RRFFQ69G5FAV
Paymentpay_pay_01ARZ3NDEKTSV4RRFFQ69G5FAV
Quoteqt_qt_01ARZ3NDEKTSV4RRFFQ69G5FAV
Merchantmer_mer_01ARZ3NDEKTSV4RRFFQ69G5FAV
Webhook deliverywh_wh_01ARZ3NDEKTSV4RRFFQ69G5FAV

Timestamps

All timestamps are in ISO 8601 format with UTC timezone:
2024-01-31T15:30:00Z

Pagination

List endpoints return all matching results. Pagination is not currently required.

Endpoints

Tokens & Quotes

List tokens

GET /checkout/tokens — List supported tokens and chains.

Get quote

GET /checkout/quote — Get a price quote for a stablecoin conversion.

Checkout Sessions

Create checkout session

POST /checkout/sessions — Create a new checkout session.

Get checkout session

GET /checkout/sessions/{session_id} — Retrieve a checkout session.

Select payment method

POST /checkout/sessions/select-payment — Select token and chain, generate wallet address.

Authentication

Learn about API keys, session tokens, and webhook signatures.

Error handling

Understand error response formats and handling strategies.

Quickstart

Create your first checkout session step by step.

Webhooks

Receive real-time payment notifications.