01.software Docs

subscribeMembership

Use the SDK for application integration. This read-only reference covers Commerce, Customer Auth, Membership and Events.

All HTTP operations
POST
/api/memberships/subscribe

Requires an sk01_ key with write scope. Paid subscriptions return a first-charge instruction; only signed result or reconciliation can activate them. Same-key replay preserves the admitted snapshot.

Authorization

serverSecretKey
headerAuthorizationBearer <token>

Public integration credential: opaque sk01_ secret API key only; PAT and Customer JWT are not supported by this scheme. Requires tenant binding and the read or write scope named by the operation.

Header Parameters

X-Idempotency-Key*string
Length1 <= length

Request Body

application/json
  1. body
planId*string
Length1 <= length
priceId*string
Length1 <= length
customerId*string
Length1 <= length
customerRef*string
Length1 <= length
card?

Response Body

Successful operation

application/json
  1. response
membershipId*string
Length1 <= length
status*"trialing"
Value in"trialing"

Examples may be generated from schemas; they are illustrative, not recorded successful API calls. Example snippets may omit required authentication headers.

Example Request
curl -X POST 'https://api.01.software/api/memberships/subscribe' \  -H 'X-Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "planId": "string",  "priceId": "string",  "customerId": "string",  "customerRef": "string"}'
Example Response
{  "membershipId": "string",  "status": "trialing"}