VEYNDO
Handbook
docs/reference/payments.mdView source ↗

English source · 15 min

Payments API reference

Provider-independent payment ledger, captures, refunds and provider workers. Contract version 1.0.0, generated from contracts/http/payments.openapi.json. 15 HTTP operations, 8 MCP tools. All components · Build your first app.

Set up a client

Every example below uses these three values. VEYNDO_TOKEN is needed only for merchant operations; keep it on your server.

export VEYNDO_URL=https://api.veyndo.ai
export VEYNDO_SHOP=<your-shop-id>
export VEYNDO_TOKEN=<personal-session-or-integration-key>

curl

curl -fsS "$VEYNDO_URL/health"

TypeScript

import { Auth, VeyndoClient } from "@veyndo/commerce-client";

const client = new VeyndoClient({
  baseUrl: process.env.VEYNDO_URL!,
  tenant: process.env.VEYNDO_SHOP,
  auth: process.env.VEYNDO_TOKEN ? Auth.personalSession(process.env.VEYNDO_TOKEN) : undefined,
});

Python

import os
from veyndo_sdk import Auth, VeyndoClient

token = os.environ.get("VEYNDO_TOKEN")
client = VeyndoClient(os.environ["VEYNDO_URL"], tenant=os.environ["VEYNDO_SHOP"],
                      auth=Auth.personal_session(token) if token else None)

Rust

use serde_json::json;
use veyndo_sdk::{Auth, Client, ClientOptions, RequestOptions};

let client = Client::new(ClientOptions {
    base_url: std::env::var("VEYNDO_URL")?,
    tenant: std::env::var("VEYNDO_SHOP").ok(),
    auth: std::env::var("VEYNDO_TOKEN").ok().map(Auth::PersonalSession),
    ..ClientOptions::default()
});

The payments API object, method names and argument order are those of the generated SDKs.

Operations

Operation Permission In the docs
GET /store-api/account/payment-methods public request
POST /store-api/account/payment-methods/{id}/revoke public request
POST /store-api/payment-providers/{id}/webhooks public request
POST /store-api/payments/paypal/webhooks public request
GET /store-api/payments/{id} public request
GET /store-api/payments/{id}/instructions public request
GET /store-api/payments/{id}/session public request
POST /store-api/payments/{id}/{operation} public request
GET /api/payment-providers payments.read request
POST /api/payment-providers/{id}/onboarding payments.manage request
GET /api/payments payments.read request
GET /api/payments/jobs/{id} payments.read request
GET /api/payments/{id}/details payments.read request
GET /api/payments/{id}/instructions payments.read request
POST /api/payments/{id}/{operation} payments.manage request
MCP checkout.payment.instructions shopper request
MCP checkout.payment.method.revoke shopper request
MCP checkout.payment.methods shopper request
MCP merchant.payment payments.manage request
MCP merchant.payment.details payments.read request
MCP merchant.payment.instructions orders.read, customers.pii, payments.read request
MCP merchant.payment.onboarding payments.manage request
MCP merchant.payment.providers payments.read request

Public HTTP

Anonymous storefront, discovery and protocol routes. Name the shop with x-tenant.

GET /store-api/account/payment-methods

Permission: public, no credential. Source: src/payments/routes.rs. SDK method: getStoreAccountPaymentMethods.

Needs a cart, buyer or object token: run the example against your own shop.

curl

curl -fsS -X GET "$VEYNDO_URL/store-api/account/payment-methods" \
  -H "x-tenant: $VEYNDO_SHOP"

TypeScript

const result = await client.payments.getStoreAccountPaymentMethods();

Python

result = client.payments.get_store_account_payment_methods()

Rust

let result = client.payments().get_store_account_payment_methods(RequestOptions::default()).await?;

POST /store-api/account/payment-methods/{id}/revoke

Permission: public, no credential. Source: src/payments/routes.rs. SDK method: postStoreAccountPaymentMethodsByIdRevoke.

Not executed from the docs. Try it in a private sandbox.

curl

curl -fsS -X POST "$VEYNDO_URL/store-api/account/payment-methods/<id>/revoke" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H 'content-type: application/json' \
  --data '{}'

TypeScript

const result = await client.payments.postStoreAccountPaymentMethodsByIdRevoke({ "id": "<id>" }, { body: {} });

Python

result = client.payments.post_store_account_payment_methods_by_id_revoke("<id>", body={})

Rust

let result = client.payments().post_store_account_payment_methods_by_id_revoke("<id>", RequestOptions::json(json!({}))).await?;

POST /store-api/payment-providers/{id}/webhooks

Permission: public, no credential. Source: src/payments/routes.rs. SDK method: postStorePaymentProvidersByIdWebhooks.

Not executed from the docs. Try it in a private sandbox.

curl

curl -fsS -X POST "$VEYNDO_URL/store-api/payment-providers/<id>/webhooks" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H 'content-type: application/json' \
  --data '{}'

TypeScript

const result = await client.payments.postStorePaymentProvidersByIdWebhooks({ "id": "<id>" }, { body: {} });

Python

result = client.payments.post_store_payment_providers_by_id_webhooks("<id>", body={})

Rust

let result = client.payments().post_store_payment_providers_by_id_webhooks("<id>", RequestOptions::json(json!({}))).await?;

POST /store-api/payments/paypal/webhooks

Permission: public, no credential. Source: src/payments/routes.rs. SDK method: postStorePaymentsPaypalWebhooks.

Not executed from the docs. Try it in a private sandbox.

curl

curl -fsS -X POST "$VEYNDO_URL/store-api/payments/paypal/webhooks" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H 'content-type: application/json' \
  --data '{}'

TypeScript

const result = await client.payments.postStorePaymentsPaypalWebhooks({ body: {} });

Python

result = client.payments.post_store_payments_paypal_webhooks(body={})

Rust

let result = client.payments().post_store_payments_paypal_webhooks(RequestOptions::json(json!({}))).await?;

GET /store-api/payments/{id}

Permission: public, no credential. Source: src/payments/routes.rs. SDK method: getStorePaymentsById.

Needs a cart, buyer or object token: run the example against your own shop.

curl

curl -fsS -X GET "$VEYNDO_URL/store-api/payments/<id>" \
  -H "x-tenant: $VEYNDO_SHOP"

TypeScript

const result = await client.payments.getStorePaymentsById({ "id": "<id>" });

Python

result = client.payments.get_store_payments_by_id("<id>")

Rust

let result = client.payments().get_store_payments_by_id("<id>", RequestOptions::default()).await?;

GET /store-api/payments/{id}/instructions

Permission: public, no credential. Source: src/payments/routes.rs. SDK method: getStorePaymentsByIdInstructions.

Needs a cart, buyer or object token: run the example against your own shop.

curl

curl -fsS -X GET "$VEYNDO_URL/store-api/payments/<id>/instructions" \
  -H "x-tenant: $VEYNDO_SHOP"

TypeScript

const result = await client.payments.getStorePaymentsByIdInstructions({ "id": "<id>" });

Python

result = client.payments.get_store_payments_by_id_instructions("<id>")

Rust

let result = client.payments().get_store_payments_by_id_instructions("<id>", RequestOptions::default()).await?;

GET /store-api/payments/{id}/session

Permission: public, no credential. Source: src/payments/routes.rs. SDK method: getStorePaymentsByIdSession.

Needs a cart, buyer or object token: run the example against your own shop.

curl

curl -fsS -X GET "$VEYNDO_URL/store-api/payments/<id>/session" \
  -H "x-tenant: $VEYNDO_SHOP"

TypeScript

const result = await client.payments.getStorePaymentsByIdSession({ "id": "<id>" });

Python

result = client.payments.get_store_payments_by_id_session("<id>")

Rust

let result = client.payments().get_store_payments_by_id_session("<id>", RequestOptions::default()).await?;

POST /store-api/payments/{id}/{operation}

Permission: public, no credential. Source: src/payments/routes.rs. SDK method: postStorePaymentsByIdByOperation.

Not executed from the docs. Try it in a private sandbox.

curl

curl -fsS -X POST "$VEYNDO_URL/store-api/payments/<id>/<operation>" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H 'content-type: application/json' \
  --data '{}'

TypeScript

const result = await client.payments.postStorePaymentsByIdByOperation({ "id": "<id>", "operation": "<operation>" }, { body: {} });

Python

result = client.payments.post_store_payments_by_id_by_operation("<id>", "<operation>", body={})

Rust

let result = client.payments().post_store_payments_by_id_by_operation("<id>", "<operation>", RequestOptions::json(json!({}))).await?;

Merchant HTTP

Each route checks the named permission against your current membership.

GET /api/payment-providers

Permission: payments.read, personal session or integration key. Source: src/payments/routes.rs. SDK method: getPaymentProviders.

Needs a merchant credential. Run it against your own private sandbox.

curl

curl -fsS -X GET "$VEYNDO_URL/api/payment-providers" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H "authorization: Bearer $VEYNDO_TOKEN"

TypeScript

const result = await client.payments.getPaymentProviders();

Python

result = client.payments.get_payment_providers()

Rust

let result = client.payments().get_payment_providers(RequestOptions::default()).await?;

POST /api/payment-providers/{id}/onboarding

Permission: payments.manage, personal session or integration key. Source: src/payments/routes.rs. SDK method: postPaymentProvidersByIdOnboarding.

Not executed from the docs. Try it in a private sandbox.

curl

curl -fsS -X POST "$VEYNDO_URL/api/payment-providers/<id>/onboarding" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H "authorization: Bearer $VEYNDO_TOKEN" \
  -H 'content-type: application/json' \
  --data '{}'

TypeScript

const result = await client.payments.postPaymentProvidersByIdOnboarding({ "id": "<id>" }, { body: {} });

Python

result = client.payments.post_payment_providers_by_id_onboarding("<id>", body={})

Rust

let result = client.payments().post_payment_providers_by_id_onboarding("<id>", RequestOptions::json(json!({}))).await?;

GET /api/payments

Permission: payments.read, personal session or integration key. Source: src/payments/routes.rs. SDK method: getPayments.

Needs a merchant credential. Run it against your own private sandbox.

curl

curl -fsS -X GET "$VEYNDO_URL/api/payments" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H "authorization: Bearer $VEYNDO_TOKEN"

TypeScript

const result = await client.payments.getPayments();

Python

result = client.payments.get_payments()

Rust

let result = client.payments().get_payments(RequestOptions::default()).await?;

GET /api/payments/jobs/{id}

Permission: payments.read, personal session or integration key. Source: src/payments/routes.rs. SDK method: getPaymentsJobsById.

Needs a merchant credential. Run it against your own private sandbox.

curl

curl -fsS -X GET "$VEYNDO_URL/api/payments/jobs/<id>" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H "authorization: Bearer $VEYNDO_TOKEN"

TypeScript

const result = await client.payments.getPaymentsJobsById({ "id": "<id>" });

Python

result = client.payments.get_payments_jobs_by_id("<id>")

Rust

let result = client.payments().get_payments_jobs_by_id("<id>", RequestOptions::default()).await?;

GET /api/payments/{id}/details

Permission: payments.read, personal session or integration key. Source: src/payments/routes.rs. SDK method: getPaymentsByIdDetails.

Needs a merchant credential. Run it against your own private sandbox.

curl

curl -fsS -X GET "$VEYNDO_URL/api/payments/<id>/details" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H "authorization: Bearer $VEYNDO_TOKEN"

TypeScript

const result = await client.payments.getPaymentsByIdDetails({ "id": "<id>" });

Python

result = client.payments.get_payments_by_id_details("<id>")

Rust

let result = client.payments().get_payments_by_id_details("<id>", RequestOptions::default()).await?;

GET /api/payments/{id}/instructions

Permission: payments.read, personal session or integration key. Source: src/payments/routes.rs. SDK method: getPaymentsByIdInstructions.

Needs a merchant credential. Run it against your own private sandbox.

curl

curl -fsS -X GET "$VEYNDO_URL/api/payments/<id>/instructions" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H "authorization: Bearer $VEYNDO_TOKEN"

TypeScript

const result = await client.payments.getPaymentsByIdInstructions({ "id": "<id>" });

Python

result = client.payments.get_payments_by_id_instructions("<id>")

Rust

let result = client.payments().get_payments_by_id_instructions("<id>", RequestOptions::default()).await?;

POST /api/payments/{id}/{operation}

Permission: payments.manage, personal session or integration key. Source: src/payments/routes.rs. SDK method: postPaymentsByIdByOperation.

Not executed from the docs. Try it in a private sandbox.

curl

curl -fsS -X POST "$VEYNDO_URL/api/payments/<id>/<operation>" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H "authorization: Bearer $VEYNDO_TOKEN" \
  -H 'content-type: application/json' \
  --data '{}'

TypeScript

const result = await client.payments.postPaymentsByIdByOperation({ "id": "<id>", "operation": "<operation>" }, { body: {} });

Python

result = client.payments.post_payments_by_id_by_operation("<id>", "<operation>", body={})

Rust

let result = client.payments().post_payments_by_id_by_operation("<id>", "<operation>", RequestOptions::json(json!({}))).await?;

MCP tools

Called with JSON-RPC tools/call on POST /mcp. The facts come from the typed operations graph; the server validates the input schema before it runs a tool.

checkout.payment.instructions

Read recipient instructions for the original customer checkout.

Fact Value
Audience shopper
Writes no
Risk medium
Reversibility reversible
Requires approval no
Cost free
Permissions none
Effects none
Conditions none
Data payment, order · money · pii
Requires none
Argument Type Required
id string yes

A shopper read. Browsers on other origins cannot call POST /mcp (it accepts only the shop's own origin); copy the request into your agent, server or terminal.

curl

curl -fsS -X POST "$VEYNDO_URL/mcp" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H 'content-type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "checkout.payment.instructions", "arguments": {"id": "<string>"}}}'

TypeScript

const result = await client.mcp.call("checkout.payment.instructions", {"id": "<string>"});

Python

result = client.mcp.call("checkout.payment.instructions", {"id": "<string>"})

Rust

let result = client.mcp().call_raw("checkout.payment.instructions", json!({"id": "<string>"})).await?;

checkout.payment.method.revoke

Revoke the owning customer saved method and queue provider cleanup.

Fact Value
Audience shopper
Writes yes
Risk high
Reversibility irreversible
Requires approval yes
Cost provider
Permissions none
Effects externalCall, backgroundJob, event
Conditions none
Data payment · pii
Requires checkout.payment.methods
Argument Type Required
approve boolean yes
id string yes
requestKey string yes

A write. Not executed from the docs. Try it in a private sandbox.

curl

curl -fsS -X POST "$VEYNDO_URL/mcp" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H 'content-type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "checkout.payment.method.revoke", "arguments": {"id": "<string>", "requestKey": "<string>", "approve": false}}}'

TypeScript

const result = await client.mcp.call("checkout.payment.method.revoke", {"id": "<string>", "requestKey": "<string>", "approve": false});

Python

result = client.mcp.call("checkout.payment.method.revoke", {"id": "<string>", "requestKey": "<string>", "approve": False})

Rust

let result = client.mcp().call_raw("checkout.payment.method.revoke", json!({"id": "<string>", "requestKey": "<string>", "approve": false})).await?;

checkout.payment.methods

List redacted saved methods for the current owning customer account.

Fact Value
Audience shopper
Writes no
Risk medium
Reversibility reversible
Requires approval no
Cost free
Permissions none
Effects none
Conditions none
Data payment · pii
Requires none

Input: no arguments.

A shopper read. Browsers on other origins cannot call POST /mcp (it accepts only the shop's own origin); copy the request into your agent, server or terminal.

curl

curl -fsS -X POST "$VEYNDO_URL/mcp" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H 'content-type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "checkout.payment.methods", "arguments": {}}}'

TypeScript

const result = await client.mcp.call("checkout.payment.methods", {});

Python

result = client.mcp.call("checkout.payment.methods", {})

Rust

let result = client.mcp().call_raw("checkout.payment.methods", json!({})).await?;

merchant.payment

Explicitly approved idempotent provider command.

Fact Value
Audience merchant
Writes yes
Risk high
Reversibility irreversible
Requires approval yes
Cost provider
Permissions payments.manage
Effects payment, externalCall, event
Conditions none
Data payment, order · money
Requires merchant.payment.details
Argument Type Required
amountMinor integer (≥ 1) no
approve boolean yes
captureId string no
finalCapture boolean no
id string yes
operation "capture" | "authorize" | "void" | "refund" | "reconcile" | "cancel" yes
requestKey string yes

A write. Not executed from the docs. Try it in a private sandbox.

curl

curl -fsS -X POST "$VEYNDO_URL/mcp" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H "authorization: Bearer $VEYNDO_TOKEN" \
  -H 'content-type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "merchant.payment", "arguments": {"id": "<string>", "operation": "capture", "requestKey": "<string>", "approve": false}}}'

TypeScript

const result = await client.mcp.call("merchant.payment", {"id": "<string>", "operation": "capture", "requestKey": "<string>", "approve": false});

Python

result = client.mcp.call("merchant.payment", {"id": "<string>", "operation": "capture", "requestKey": "<string>", "approve": False})

Rust

let result = client.mcp().call_raw("merchant.payment", json!({"id": "<string>", "operation": "capture", "requestKey": "<string>", "approve": false})).await?;

merchant.payment.details

Read native payment history and provider transaction fees.

Fact Value
Audience merchant
Writes no
Risk low
Reversibility reversible
Requires approval no
Cost free
Permissions payments.read
Effects none
Conditions none
Data payment, order · money
Requires none
Argument Type Required
id string yes

Needs a merchant credential. Run it against your own private sandbox.

curl

curl -fsS -X POST "$VEYNDO_URL/mcp" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H "authorization: Bearer $VEYNDO_TOKEN" \
  -H 'content-type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "merchant.payment.details", "arguments": {"id": "<string>"}}}'

TypeScript

const result = await client.mcp.call("merchant.payment.details", {"id": "<string>"});

Python

result = client.mcp.call("merchant.payment.details", {"id": "<string>"})

Rust

let result = client.mcp().call_raw("merchant.payment.details", json!({"id": "<string>"})).await?;

merchant.payment.instructions

Read owned invoice recipient instructions with order and PII access.

Fact Value
Audience merchant
Writes no
Risk medium
Reversibility reversible
Requires approval no
Cost free
Permissions orders.read, customers.pii, payments.read
Effects none
Conditions none
Data payment, order · money · pii
Requires none
Argument Type Required
id string yes

Needs a merchant credential. Run it against your own private sandbox.

curl

curl -fsS -X POST "$VEYNDO_URL/mcp" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H "authorization: Bearer $VEYNDO_TOKEN" \
  -H 'content-type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "merchant.payment.instructions", "arguments": {"id": "<string>"}}}'

TypeScript

const result = await client.mcp.call("merchant.payment.instructions", {"id": "<string>"});

Python

result = client.mcp.call("merchant.payment.instructions", {"id": "<string>"})

Rust

let result = client.mcp().call_raw("merchant.payment.instructions", json!({"id": "<string>"})).await?;

merchant.payment.onboarding

Approved provider onboarding scoped to merchant and sales channel.

Fact Value
Audience merchant
Writes yes
Risk high
Reversibility irreversible
Requires approval yes
Cost provider
Permissions payments.manage
Effects externalCall, event
Conditions none
Data payment, settings
Requires merchant.payment.providers
Argument Type Required
approve boolean no
channel string no
country string no
environment "sandbox" | "live" | "simulation" | "contract-fixture" no
id string no
operation "start" | "status" | "disconnect" no
requestKey string no

A write. Not executed from the docs. Try it in a private sandbox.

curl

curl -fsS -X POST "$VEYNDO_URL/mcp" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H "authorization: Bearer $VEYNDO_TOKEN" \
  -H 'content-type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "merchant.payment.onboarding", "arguments": {}}}'

TypeScript

const result = await client.mcp.call("merchant.payment.onboarding", {});

Python

result = client.mcp.call("merchant.payment.onboarding", {})

Rust

let result = client.mcp().call_raw("merchant.payment.onboarding", json!({})).await?;

merchant.payment.providers

Read installed payment contracts and merchant account readiness.

Fact Value
Audience merchant
Writes no
Risk low
Reversibility reversible
Requires approval no
Cost free
Permissions payments.read
Effects none
Conditions none
Data payment, settings
Requires none

Input: no arguments.

Needs a merchant credential. Run it against your own private sandbox.

curl

curl -fsS -X POST "$VEYNDO_URL/mcp" \
  -H "x-tenant: $VEYNDO_SHOP" \
  -H "authorization: Bearer $VEYNDO_TOKEN" \
  -H 'content-type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "merchant.payment.providers", "arguments": {}}}'

TypeScript

const result = await client.mcp.call("merchant.payment.providers", {});

Python

result = client.mcp.call("merchant.payment.providers", {})

Rust

let result = client.mcp().call_raw("merchant.payment.providers", json!({})).await?;