HYBRID-CHAINDEVELOPERS
DOCUMENTATIONv2
POST

Payments

Create payment request

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

PURPOSE + BUSINESS CONTEXT

Create a durable exact-decimal request for another workspace—or an intentionally shareable request—without creating an invoice or moving money.

WHEN THIS CALL IS USEFUL

Call this when the active workspace needs to ask for a specific amount and currency, retain a reconciliation reference, and optionally bind the request to one payer and expiry.

OUTCOME · Request

What changes

Creates one OPEN request and hash-chained evidence. It does not authorize a payer, reserve or debit funds, create a payment intent, settle value, or notify fulfillment.

WHY IT MATTERS

  • Separates a request for payment from authorization, source selection, rail execution, and settlement.
  • Retains exact terms, expiry, version, and commitments for later reconciliation without exposing financial credentials.

ISOLATION + AUTHORITY

The authenticated workspace is always the payee and cannot be supplied in the body. A named payer is enforced at payment creation; a shareable request is usable only by a caller that already possesses its opaque identifier and exact current terms.

BEFORE YOU CALL

  • A bearer token with payments:write.
  • A unique Idempotency-Key and RFC 9421 signature covering the exact request.
  • A positive exact-decimal amount and uppercase currency; payer_workspace_id, memo, external_reference, and expires_at are optional.

WHAT TO DO NEXT

  • Deliver the request identifier and terms to the intended payer through an approved channel.
  • Monitor the outgoing request until it expires, is cancelled, is satisfied by a future settlement lifecycle, or enters PAYMENT_PENDING.

AGENT GUIDANCE

  • Set payer_workspace_id when only one workspace should be able to pay. Omit it only for a deliberately shareable request whose opaque identifier and exact terms will be delivered through a trusted channel.
  • Use external_reference for reconciliation—not as authority or proof of an invoice.
  • After an ambiguous response, reuse the same Idempotency-Key only with the byte-equivalent body or list outgoing requests before creating another.
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-payment-requests-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 exact decimal string. Binary floating-point JSON numbers are rejected.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

expires_atbodyOptional

future RFC 3339 timestamp · ≤365 days · nullableOptional future RFC 3339 expiry, no more than 365 days away.Explicit null acceptedEXAMPLE2026-12-31T23:59:59Z

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 context, limited to 500 characters.Explicit null acceptedEXAMPLEInvoice 2026-0042

payer_workspace_idbodyOptional

workspace identifier · nullableOptional workspace allowed to pay this request; omission creates a shareable request.Explicit null acceptedEXAMPLEworkspace-payer

REQUEST

JSON body example

{
  "amount": "100.00",
  "currency": "USD",
  "expires_at": "2026-09-02T18:30:00Z",
  "external_reference": "example-external-reference",
  "memo": "example-memo",
  "payer_workspace_id": "01K4A7M4N8Y2Q6R9T3V5W7X1ZB"
}

RESPONSES

Status and payload examples

201An OPEN exact-decimal payment request is returned with request and state commitments; no value is reserved or moved.Mutation completed · JSON RESPONSE+
{
  "amount": "100.00",
  "balance_mutation_performed": true,
  "created_at": "2026-09-02T18:30:00Z",
  "currency": "USD",
  "expires_at": "2026-09-02T18:30:00Z",
  "external_reference": "example-external-reference",
  "memo": "example-memo",
  "payee_workspace_id": "01K4A7M4N8Y2Q6R9T3V5W7X1ZB",
  "payer_workspace_id": "01K4A7M4N8Y2Q6R9T3V5W7X1ZB",
  "pending_payment_uuid": "01K4A7M4N8Y2Q6R9T3V5W7X1ZB",
  "request_commitment": "example-request-commitment",
  "request_uuid": "01K4A7M4N8Y2Q6R9T3V5W7X1ZB",
  "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 deliver the request identifier and terms to the intended payer through an approved channel.
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 request.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.
422Amount, currency, payer, expiry, memo, or reconciliation policy rejected the request.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 request 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

  • Create an owner-isolated exact-decimal request for a named payer workspace or a shareable request with an optional expiry and reconciliation reference. 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