SolKnife One-off payments API
The One-off payments API from SolKnife — 3 operation(s) for one-off payments.
The One-off payments API from SolKnife — 3 operation(s) for one-off payments.
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-one-off-payments-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 One-off payments API
version: 1.0.0
servers:
- url: https://gate.solknife.xyz
tags:
- name: One-off payments
paths:
/api/payments:
post:
description: Creates a payment intent and returns the merchant SPL transfer details, the fixed gateway fee, and a hosted checkout URL. Gateway confirms a payment made through the hosted checkout on its own and sends the signed payment.confirmed callback.
operationId: post/api/payments
responses:
'200':
content:
application/json:
schema:
properties:
data:
type: object
properties:
checkoutReference:
type: string
checkoutUrl:
type: string
format: uri
confirmedAt:
type: string
createdAt:
type: string
customerTelegramChatId:
type: string
expiresAt:
type: string
gatewayFeeLamports:
type: string
gatewayFeeWallet:
type: string
id:
type: string
merchantAmountRaw:
type: string
merchantTokenMint:
type: string
merchantWallet:
type: string
payerWallet:
type: string
reference:
type: string
signature:
type: string
solanaMemo:
type: string
solanaPayTransactionUrl:
type: string
status:
type: string
enum:
- CONFIRMED
- EXPIRED
- FAILED
- PENDING
required:
- checkoutReference
- checkoutUrl
- createdAt
- customerTelegramChatId
- expiresAt
- gatewayFeeLamports
- gatewayFeeWallet
- id
- merchantAmountRaw
- merchantTokenMint
- merchantWallet
- reference
- solanaMemo
- solanaPayTransactionUrl
- status
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.
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: 'UNAUTHENTICATED: missing or invalid x-gateway-key.'
'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:
- gatewayKey: []
summary: Create hosted checkout
tags:
- One-off payments
requestBody:
content:
application/json:
schema:
type: object
properties:
checkoutReference:
type: string
minLength: 3
maxLength: 120
customerTelegramChatId:
type: string
pattern: ^-?[0-9]{3,32}$
merchantAmountRaw:
type: string
pattern: ^[1-9][0-9]*$
merchantTokenMint:
type: string
payerWallet:
type: string
required:
- checkoutReference
- customerTelegramChatId
- merchantAmountRaw
required: true
x-operation-id-source: normalized
x-operation-id-original: post /api/payments
/api/checkout/{paymentId}:
get:
description: Public checkout status used by the hosted checkout page. status moves from PENDING to CONFIRMED once Gateway finds and verifies the payment by its reference.
operationId: get/api/checkout/{paymentId}
responses:
'200':
content:
application/json:
schema:
properties:
data:
description: The checkout payment with its current status.
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: Checkout status
tags:
- One-off payments
parameters:
- in: path
name: paymentId
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
x-operation-id-source: normalized
x-operation-id-original: get /api/checkout/{paymentId}
/api/payments/{paymentId}/confirm:
post:
description: Verifies the Solana transaction on-chain, marks the payment CONFIRMED, sends the signed payment.confirmed callback, and notifies the customer and the merchant Telegram chats. Gateway confirms hosted checkout payments on its own by their reference, so this call is only needed when your app sends the transaction itself. 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/payments/{paymentId}/confirm
responses:
'200':
content:
application/json:
schema:
properties:
data:
properties:
merchantTelegramNotification:
type: object
payment:
type: object
properties:
checkoutReference:
type: string
checkoutUrl:
type: string
format: uri
confirmedAt:
type: string
createdAt:
type: string
customerTelegramChatId:
type: string
expiresAt:
type: string
gatewayFeeLamports:
type: string
gatewayFeeWallet:
type: string
id:
type: string
merchantAmountRaw:
type: string
merchantTokenMint:
type: string
merchantWallet:
type: string
payerWallet:
type: string
reference:
type: string
signature:
type: string
solanaMemo:
type: string
solanaPayTransactionUrl:
type: string
status:
type: string
enum:
- CONFIRMED
- EXPIRED
- FAILED
- PENDING
required:
- checkoutReference
- checkoutUrl
- createdAt
- customerTelegramChatId
- expiresAt
- gatewayFeeLamports
- gatewayFeeWallet
- id
- merchantAmountRaw
- merchantTokenMint
- merchantWallet
- reference
- solanaMemo
- solanaPayTransactionUrl
- status
telegramNotification:
type: object
webhook:
type: object
required:
- merchantTelegramNotification
- payment
- telegramNotification
- webhook
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.
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
description: 'UNAUTHENTICATED: missing or invalid x-gateway-key.'
'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:
- gatewayKey: []
summary: Confirm payment
tags:
- One-off payments
parameters:
- in: path
name: paymentId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
signature:
type: string
required:
- signature
required: true
x-operation-id-source: normalized
x-operation-id-original: post /api/payments/{paymentId}/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