HYBRID-CHAINDEVELOPERS
DOCUMENTATIONv2
POST

Payments

Create direct payment intent

/api/v2/payments
AUTHENTICATIONBearer token · payments:writeAUTHORITATIVE OWNERpayment-serviceCONTRACT AUTHORITYGenerated Rust OpenAPISTATUSSource ready · production listed

PURPOSE + BUSINESS CONTEXT

Create a direct workspace-to-workspace payment intent with exact terms and a selected source reference, without first creating a payment request.

WHEN THIS CALL IS USEFUL

Call this for a direct business obligation when the payer already knows the payee, amount, currency, purpose, source reference, and intended method and will complete authorization separately.

OUTCOME · Create intent

What changes

Creates one AUTHORIZATION_REQUIRED intent and immutable commitments. It performs no source validation, reservation, debit, signing, rail submission, confirmation, settlement, refund, or notification.

WHY IT MATTERS

  • Records business intent without prematurely coupling it to a rail or ledger mutation.
  • Purpose codes and external references support downstream audit and reconciliation while authority stays with the payer workspace.

ISOLATION + AUTHORITY

The payer workspace and actor derive from authentication; neither can be selected in the body. The payee and source are opaque references, and the created record grants no access to either workspace’s wallet or balance.

BEFORE YOU CALL

  • A bearer token with payments:write.
  • A unique Idempotency-Key and RFC 9421 signature.
  • A different payee workspace, opaque source reference, supported method, structured purpose code, positive decimal-string amount, and uppercase currency.

WHAT TO DO NEXT

  • Read the returned intent and present its authorization-required state.
  • Continue only when a future production OpenAPI contract explicitly provides the separate authorization or execution step.

AGENT GUIDANCE

  • Use a payment request instead when the payee must author and version the terms.
  • Never submit account credentials, private keys, seed phrases, MPC shares, caller-authored balance claims, or settlement assertions.
  • Reconcile a timeout with GET /api/v2/payments before reusing the same Idempotency-Key and equivalent body.
MACHINE CONTRACT

The exact deployed parameters, schemas, responses, security requirements, and Hybrid-Chain agent metadata are authoritative at this operation's production OpenAPI JSON Pointer. The readable tables below add integration guidance; the deployed OpenAPI controls if guidance and the machine contract ever differ.

Open the authoritative production contract

EXTENDED INTEGRATION GUIDANCE

Readable request and response reference

Examples illustrate integration intent; the referenced OpenAPI operation and component schemas define the executable shape.

PARAMETERS

Headers, path, query, and body

NAMELOCATIONPRESENCETYPE / RULES / PURPOSE
AuthorizationheaderRequired

Bearer tokenCredential containing payments:write authority.EXAMPLEBearer hc_live_…

Idempotency-KeyheaderRequired

ASCII string · 1–128Caller-generated stable key reused for retries of the same logical mutation.EXAMPLEpost-api-v2-payments-request-001

X-Request-IDheaderOptional

stringOptional caller correlation identifier. The gateway emits the effective value on the response.

Content-DigestheaderRequired

stringRFC 9530 sha-256 digest of the exact transmitted request-body bytes.

Signature-InputheaderRequired

stringRFC 9421 sig1 input covering @method, @path, content-digest, content-type, and idempotency-key, with created, expires, nonce, keyid, and alg=ed25519.

SignatureheaderRequired

stringRFC 9421 sig1 Ed25519 signature made by an active key registered to the bearer client.

amountbodyRequired

positive exact decimal stringPositive amount with no more than 18 decimal places.EXAMPLE125.50

currencybodyRequired

uppercase asset or ISO currency codeUppercase asset or ISO currency code. It is validated as part of the request body before any operation is attempted.EXAMPLEUSDC

external_referencebodyOptional

string · max 128 · nullableOptional caller-owned reconciliation reference, limited to 128 characters.Explicit null acceptedEXAMPLEinvoice-2026-0042

memobodyOptional

string · max 500 · nullableOptional recipient-visible memo, limited to 500 characters.Explicit null acceptedEXAMPLEInvoice 2026-0042

payee_workspace_idbodyRequired

workspace identifierRecipient workspace resolved by Payments; it cannot equal the payer workspace.EXAMPLEworkspace-payee

payment_methodbodyRequired

INTERNAL_BALANCE | HYBRID_WALLET | APPROVED_RAILFuture authorization path; intent creation does not invoke it.EXAMPLEHYBRID_WALLET

payment_source_referencebodyRequired

owner-safe funding or operational-wallet referenceOpaque source reference resolved by Payments; never submit credentials or custody secrets.EXAMPLEwallet-operating

purpose_codebodyRequired

uppercase identifierStructured accounting/compliance purpose code. It is validated as part of the request body before any operation is attempted.EXAMPLEINVOICE

REQUEST

JSON body example

{
  "amount": "100.00",
  "currency": "USD",
  "external_reference": "example-external-reference",
  "memo": "example-memo",
  "payee_workspace_id": "01K4A7M4N8Y2Q6R9T3V5W7X1ZB",
  "payment_method": "example-payment-method",
  "payment_source_reference": "example-payment-source-reference",
  "purpose_code": "example-purpose-code"
}

RESPONSES

Status and payload examples

201An AUTHORIZATION_REQUIRED direct payment intent is returned with immutable commitments and explicit false value-movement flags.Mutation completed · JSON RESPONSE+
{
  "amount": "100.00",
  "authorization_required": true,
  "balance_mutation_performed": true,
  "cancellation_reason_code": "example-cancellation-reason-code",
  "cancelled_at": "2026-09-02T18:30:00Z",
  "created_at": "2026-09-02T18:30:00Z",
  "currency": "USD",
  "external_reference": "example-external-reference",
  "memo": "example-memo",
  "payee_workspace_id": "01K4A7M4N8Y2Q6R9T3V5W7X1ZB",
  "payer_workspace_id": "01K4A7M4N8Y2Q6R9T3V5W7X1ZB",
  "payment_method": "example-payment-method",
  "payment_request_uuid": "01K4A7M4N8Y2Q6R9T3V5W7X1ZB",
  "payment_source_reference": "example-payment-source-reference",
  "payment_uuid": "01K4A7M4N8Y2Q6R9T3V5W7X1ZB",
  "purpose_code": "example-purpose-code",
  "rail_submission_created": true,
  "reconciliation_required": true,
  "request_commitment": "example-request-commitment",
  "reservation_created": true,
  "settlement_authority_granted": true,
  "state_commitment": "example-state-commitment",
  "status": "example-status",
  "updated_at": "2026-09-02T18:30:00Z",
  "version": 0
}
INTEGRATION DECISION
CALLER ACTION
Accept the returned representation or receipt, then read the returned intent and present its authorization-required state.
RETRY SAFETY
Do not repeat a successful mutation merely to confirm it. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Persist returned identifiers, versions, commitments, and receipts. Re-read the owner-visible request or payment record and compare its status, version, exact decimal terms, commitments, and explicit safety flags before reusing the same Idempotency-Key with an equivalent mutation.
400The body, request signature, or Idempotency-Key is missing or malformed.Request must change · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "the supplied Hybrid credential is invalid"
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Rebuild the request from the live OpenAPI operation and correct the rejected method, media type, header, parameter, or body field.
RETRY SAFETY
Do not retry the same invalid request. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Compare the submitted values with the documented constraints before another call. Re-read the owner-visible request or payment record and compare its status, version, exact decimal terms, commitments, and explicit safety flags before reusing the same Idempotency-Key with an equivalent mutation.
ESCALATE WHEN
Escalate when a record progressed beyond AUTHORIZATION_REQUIRED, source or rail state is ambiguous, a linked request cannot be reconciled, or a caller needs value movement, settlement, refund, or receipt authority that the implemented Payments control plane does not provide.
401The bearer credential is missing, expired, or invalid.Authentication required · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "the supplied Hybrid credential is invalid"
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Discard the rejected credential, complete the documented authentication or reassertion flow, and rebuild any request signature with fresh timestamps and nonces.
RETRY SAFETY
Retry only with a newly valid credential and fresh replay-protection values. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Assume the outcome is unknown only when the connection failed after transmission; otherwise authentication failed before domain work. Re-read the owner-visible request or payment record and compare its status, version, exact decimal terms, commitments, and explicit safety flags before reusing the same Idempotency-Key with an equivalent mutation.
ESCALATE WHEN
Escalate when a record progressed beyond AUTHORIZATION_REQUIRED, source or rail state is ambiguous, a linked request cannot be reconciled, or a caller needs value movement, settlement, refund, or receipt authority that the implemented Payments control plane does not provide.
403The principal lacks payments:write or the RFC 9421 signature is invalid.Authority or policy denied · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "the supplied Hybrid credential is invalid"
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Verify the exact scope, tenant or workspace membership, owner boundary, step-up purpose, feature policy, and resource eligibility. Never broaden authority automatically.
RETRY SAFETY
Do not retry until the missing authority or policy condition has been deliberately resolved with least privilege.
STATE RECONCILIATION
Confirm the caller and resource resolve to the same authority boundary for the owner-isolated payment-request and authorization-required intent control plane; authorization, reservation, rail execution, settlement, refunds, and receipts remain separate capabilities.
ESCALATE WHEN
Escalate when a record progressed beyond AUTHORIZATION_REQUIRED, source or rail state is ambiguous, a linked request cannot be reconciled, or a caller needs value movement, settlement, refund, or receipt authority that the implemented Payments control plane does not provide.
409The Idempotency-Key conflicts with a different logical payment.State reconciliation required · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "the supplied Hybrid credential is invalid"
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Stop the mutation sequence and fetch the latest authoritative resource, lifecycle state, version, ETag, reservation, or existing idempotency result.
RETRY SAFETY
Retry only after reconciling the conflict. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Re-read the owner-visible request or payment record and compare its status, version, exact decimal terms, commitments, and explicit safety flags before reusing the same Idempotency-Key with an equivalent mutation.
ESCALATE WHEN
Escalate when a record progressed beyond AUTHORIZATION_REQUIRED, source or rail state is ambiguous, a linked request cannot be reconciled, or a caller needs value movement, settlement, refund, or receipt authority that the implemented Payments control plane does not provide.
422Payee, source reference, method, purpose, amount, currency, memo, or reconciliation policy rejected the intent.Request must change · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "the supplied Hybrid credential is invalid"
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Rebuild the request from the live OpenAPI operation and correct the rejected method, media type, header, parameter, or body field.
RETRY SAFETY
Do not retry the same invalid request. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions.
STATE RECONCILIATION
Compare the submitted values with the documented constraints before another call. Re-read the owner-visible request or payment record and compare its status, version, exact decimal terms, commitments, and explicit safety flags before reusing the same Idempotency-Key with an equivalent mutation.
ESCALATE WHEN
Escalate when a record progressed beyond AUTHORIZATION_REQUIRED, source or rail state is ambiguous, a linked request cannot be reconciled, or a caller needs value movement, settlement, refund, or receipt authority that the implemented Payments control plane does not provide.
503The Payments control plane is unavailable; no intent is created.Dependency unavailable or outcome uncertain · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "the supplied Hybrid credential is invalid"
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Preserve the exact request and treat the outcome as uncertain until authoritative state proves whether it committed.
RETRY SAFETY
Reconcile before retrying. For one logical mutation, retain the same Idempotency-Key and byte-equivalent request. Never reuse that key for changed instructions. Use bounded backoff with jitter.
STATE RECONCILIATION
Re-read the owner-visible request or payment record and compare its status, version, exact decimal terms, commitments, and explicit safety flags before reusing the same Idempotency-Key with an equivalent mutation.
ESCALATE WHEN
Escalate when a record progressed beyond AUTHORIZATION_REQUIRED, source or rail state is ambiguous, a linked request cannot be reconciled, or a caller needs value movement, settlement, refund, or receipt authority that the implemented Payments control plane does not provide.

OPERATIONAL NOTES

Security and lifecycle guarantees

  • Record one direct exact-decimal AUTHORIZATION_REQUIRED intent between workspaces without reserving, signing, submitting, confirming, or settling value. Authoritative owner: payment-service.
  • The Rust gateway validates the public contract and routes only to the authoritative owner; clients never address internal services directly.
  • Mutations are retry-safe only when the same Idempotency-Key and canonical request body are reused.
  • The tables and examples are derived from the current gateway source OpenAPI. Re-fetch the deployed OpenAPI before execution; deployment status is shown separately on this page.
  • Only parameters present in the OpenAPI operation are accepted; undocumented query keys fail closed with HTTP 422.
DOCUMENTATION STATUS

This route is implemented in canonical gateway source and appears in the production OpenAPI snapshot observed 2026-09-11T06:35:11.572Z. Authentication, tenant, feature, venue, and market policy still apply.

Verify the exact production OpenAPI operation Return to the V2 directory