Skip to main content

Payments

Payment creation and management. External ID must be unique per node.

Authentication: Bearer token required (except Get Payment Widget Data).


Create Payment

Endpoint: POST /api/v1/payments

Request Body

FieldTypeRequiredDescription
external_idstringYesUnique per node
node_idstringYesNode UUID
chain_idstringNoChain UUID
network_idstringYesNetwork UUID
wallet_idstringNoWallet UUID
member_idstringNoMember UUID
memberobjectNoInline member data (external_id, name, surname, email, etc.)
currency_idstringYesCurrency UUID
pricefloat64YesPrice
paid_pricefloat64YesPaid price
payment_methodstringYesweb3, credit_card, or bank_transfer
payment_groupstringYesproduct or listing_or_subscription
payment_addressstringYesPayment address (min 10 chars)
itemsarrayNoPayment items (name, price, external_id)
metadatastringNoMetadata
expires_atstringYesRFC3339 datetime
retryboolNoRetry flag
retry_countintNoRetry count
client_ipstringNoClient IP (IPv4)

Response — 201 Created

Returns PaymentResponse with access_token for the payment widget.

StatusDescription
404Node or currency not found
409External ID already exists for node

List Payments

Endpoint: GET /api/v1/payments

Query Parameters

ParameterTypeRequiredDefaultDescription
node_idstringYesNode UUID
wallet_idstringNoFilter by wallet
network_idstringNoFilter by network
pageintNo1Page number
per_pageintNo10Items per page (max 100)

Response — 200 OK

Paginated list with items (PaymentResponse), page, per_page, total.


Get Payment by ID

Endpoint: GET /api/v1/payments/{id}

Response — 200 OK

Full payment object including access_token, status, transaction_hash, etc.

StatusDescription
404Payment not found

Cancel Payment

Endpoint: POST /api/v1/payments/{id}/cancel

Triggers cancelDeal on the diamond contract. Integration's node must have access to the payment's node.

Response — 202 Accepted

{ "status": "accepted" }
StatusDescription
403Insufficient permission to access payment's node
404Payment not found

List Payment Logs

Endpoint: GET /api/v1/payments/{id}/logs

Returns paginated payment logs, ordered by created_at DESC.

Query Parameters

ParameterTypeRequiredDefaultDescription
pageintNo1Page number
per_pageintNo10Items per page (max 100)

Response — 200 OK

Paginated list with items (event_type, message, actor_type, created_at, etc.), page, per_page, total.

StatusDescription
404Payment not found

Retry Send Payment

Endpoint: POST /api/v1/payments/{id}/retry-send

Re-sends a pending web3 payment to the create-payment consumer.

Response — 200 OK

Returns updated payment object.

StatusDescription
400Payment not eligible for retry
404Payment not found

Get Payment Widget Data

Endpoint: GET /api/v1/widget/payments/{id}

Returns payment data and contract info for the payment widget. Use access_token from payment creation response.

Authentication: Bearer <access_token> (from payment creation, not integration JWT).

Response — 200 OK

{
"external_id": "...",
"node_id": "...",
"network_id": 1,
"deal_id": 123,
"price": 100.0,
"price_decimals": 6,
"payment_address": "...",
"diamond_address": "...",
"currency": "USDT",
"token_address": "...",
"contract": {
"abi": [...],
"function_name": "deposit",
"arguments": [...]
}
}
StatusDescription
401Invalid or expired access token
404Payment not found