SolKnife Hosted subscription checkout API
The Hosted subscription checkout API from SolKnife — 5 operation(s) for hosted subscription checkout.
The Hosted subscription checkout API from SolKnife — 5 operation(s) for hosted subscription checkout.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/solknife-xyz:solknife-xyz-hosted-subscription-checkout-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: 'Merchant API for SolKnife Gateway: Solana payment intents, subscription plans, customer subscriptions, and signed callbacks. Every response is a JSON envelope: { ok: true, data } on success, { ok: false, error: { code, message } } on failure.'
title: SolKnife Gateway Hosted subscription checkout API
version: 1.0.0
servers:
- url: https://gate.solknife.xyz
tags:
- name: Hosted subscription checkout
paths:
/api/subscription-checkout/{subscriptionId}/transactions/init-authority:
post:
description: Hosted checkout route. Returns an unsigned base64 wallet setup transaction without the merchant Gateway API key.
operationId: post/api/subscription-checkout/{subscriptionId}/transactions/init-authority
responses:
'200':
content:
application/json:
schema:
properties:
data:
type: object
properties:
message:
type: string
transaction:
type: string
description: Unsigned base64 Solana transaction for the wallet to sign.
required:
- message
- transaction
ok:
const: true
type: boolean
required:
- ok
- data
type: object
description: Success.
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: VALIDATION_ERROR or another request error.
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: The resource does not exist for this merchant.
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: 'CONFLICT: the request conflicts with an existing record. SUBSCRIPTION_STATE_CHANGED: another request changed the subscription first; read it again and retry.'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: 'INTERNAL_ERROR: unexpected server error.'
security: []
summary: Hosted wallet setup transaction
tags:
- Hosted subscription checkout
parameters:
- in: path
name: subscriptionId
required: true
schema:
type: string
- description: The customer reference from the hosted checkout URL.
in: query
name: reference
required: true
schema:
maxLength: 120
minLength: 3
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
account:
type: string
required:
- account
required: true
x-operation-id-source: normalized
x-operation-id-original: post /api/subscription-checkout/{subscriptionId}/transactions/init-authority
/api/subscription-checkout/{subscriptionId}/transactions/subscribe:
post:
description: Hosted checkout route. Returns an unsigned base64 subscribe transaction.
operationId: post/api/subscription-checkout/{subscriptionId}/transactions/subscribe
responses:
'200':
content:
application/json:
schema:
properties:
data:
type: object
properties:
message:
type: string
transaction:
type: string
description: Unsigned base64 Solana transaction for the wallet to sign.
required:
- message
- transaction
ok:
const: true
type: boolean
required:
- ok
- data
type: object
description: Success.
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: VALIDATION_ERROR or another request error.
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: The resource does not exist for this merchant.
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: 'CONFLICT: the request conflicts with an existing record. SUBSCRIPTION_STATE_CHANGED: another request changed the subscription first; read it again and retry.'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: 'INTERNAL_ERROR: unexpected server error.'
security: []
summary: Hosted subscribe transaction
tags:
- Hosted subscription checkout
parameters:
- in: path
name: subscriptionId
required: true
schema:
type: string
- description: The customer reference from the hosted checkout URL.
in: query
name: reference
required: true
schema:
maxLength: 120
minLength: 3
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
account:
type: string
expectedSubscriptionAuthorityInitId:
type: string
pattern: ^[0-9]+$
required:
- account
required: true
x-operation-id-source: normalized
x-operation-id-original: post /api/subscription-checkout/{subscriptionId}/transactions/subscribe
/api/subscription-checkout/{subscriptionId}/transactions/cancel:
post:
description: Hosted checkout route. Returns an unsigned base64 cancel transaction.
operationId: post/api/subscription-checkout/{subscriptionId}/transactions/cancel
responses:
'200':
content:
application/json:
schema:
properties:
data:
type: object
properties:
message:
type: string
transaction:
type: string
description: Unsigned base64 Solana transaction for the wallet to sign.
required:
- message
- transaction
ok:
const: true
type: boolean
required:
- ok
- data
type: object
description: Success.
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: VALIDATION_ERROR or another request error.
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: The resource does not exist for this merchant.
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: 'CONFLICT: the request conflicts with an existing record. SUBSCRIPTION_STATE_CHANGED: another request changed the subscription first; read it again and retry.'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: 'INTERNAL_ERROR: unexpected server error.'
security: []
summary: Hosted cancel transaction
tags:
- Hosted subscription checkout
parameters:
- in: path
name: subscriptionId
required: true
schema:
type: string
- description: The customer reference from the hosted checkout URL.
in: query
name: reference
required: true
schema:
maxLength: 120
minLength: 3
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
account:
type: string
required:
- account
required: true
x-operation-id-source: normalized
x-operation-id-original: post /api/subscription-checkout/{subscriptionId}/transactions/cancel
/api/subscription-checkout/{subscriptionId}/transactions/resume:
post:
description: Hosted checkout route. Returns an unsigned base64 resume transaction for a canceled subscription before the current billing period ends.
operationId: post/api/subscription-checkout/{subscriptionId}/transactions/resume
responses:
'200':
content:
application/json:
schema:
properties:
data:
type: object
properties:
message:
type: string
transaction:
type: string
description: Unsigned base64 Solana transaction for the wallet to sign.
required:
- message
- transaction
ok:
const: true
type: boolean
required:
- ok
- data
type: object
description: Success.
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: VALIDATION_ERROR or another request error.
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: The resource does not exist for this merchant.
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: 'CONFLICT: the request conflicts with an existing record. SUBSCRIPTION_STATE_CHANGED: another request changed the subscription first; read it again and retry.'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: 'INTERNAL_ERROR: unexpected server error.'
security: []
summary: Hosted resume transaction
tags:
- Hosted subscription checkout
parameters:
- in: path
name: subscriptionId
required: true
schema:
type: string
- description: The customer reference from the hosted checkout URL.
in: query
name: reference
required: true
schema:
maxLength: 120
minLength: 3
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
account:
type: string
required:
- account
required: true
x-operation-id-source: normalized
x-operation-id-original: post /api/subscription-checkout/{subscriptionId}/transactions/resume
/api/subscription-checkout/{subscriptionId}/confirm:
post:
description: Verifies the customer subscribe, cancel, or resume signature, updates the subscription, sends the signed callback, and notifies the customer in Telegram. Gateway reads the transaction at finalized commitment, about 13 seconds after it is sent; before that the request fails with a not-found error and should be retried.
operationId: post/api/subscription-checkout/{subscriptionId}/confirm
responses:
'200':
content:
application/json:
schema:
properties:
data:
description: The updated customer subscription.
type: object
ok:
const: true
type: boolean
required:
- ok
- data
type: object
description: Success.
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: VALIDATION_ERROR or another request error.
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: The resource does not exist for this merchant.
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: 'CONFLICT: the request conflicts with an existing record. SUBSCRIPTION_STATE_CHANGED: another request changed the subscription first; read it again and retry.'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: 'INTERNAL_ERROR: unexpected server error.'
security: []
summary: Hosted subscription confirmation
tags:
- Hosted subscription checkout
parameters:
- in: path
name: subscriptionId
required: true
schema:
type: string
- description: The customer reference from the hosted checkout URL.
in: query
name: reference
required: true
schema:
maxLength: 120
minLength: 3
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
action:
default: subscribe
type: string
enum:
- subscribe
- cancel
- resume
signature:
type: string
required:
- signature
required: true
x-operation-id-source: normalized
x-operation-id-original: post /api/subscription-checkout/{subscriptionId}/confirm
components:
schemas:
ErrorEnvelope:
properties:
error:
properties:
code:
type: string
message:
type: string
required:
- code
- message
type: object
ok:
const: false
type: boolean
required:
- ok
- error
type: object
securitySchemes:
gatewayKey:
description: The Gateway API key returned by POST /api/merchants/register.
in: header
name: x-gateway-key
type: apiKey
externalDocs:
description: Integration docs
url: https://gate.solknife.xyz/docs