HYBRID-CHAINDEVELOPERS
DOCUMENTATIONv2
POST

Payments

Create request bound payment intent

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

PURPOSE + BUSINESS CONTEXT

Bind an OPEN payment request to the payer’s chosen source and method, creating a pre-settlement intent that still requires a separate future authorization workflow.

WHEN THIS CALL IS USEFUL

Call this only after the payer has verified the request identifier, version, exact amount, currency, payee, and expiry and wants to record how it intends to pay.

OUTCOME · Bind request to intent

What changes

Atomically creates an AUTHORIZATION_REQUIRED intent and moves the request to PAYMENT_PENDING. It does not validate source funds, reserve value, sign, submit, confirm, settle, or mark the request paid.

WHY IT MATTERS

  • Prevents stale or altered request terms from silently becoming a payment intent.
  • Creates a clear handoff between business intent and the separately governed value-moving authorization system.

ISOLATION + AUTHORITY

A named request is payable only by its payer workspace; the payee cannot pay itself. Shareable requests require the unguessable request identifier and exact terms. Source references remain opaque and grant no wallet or ledger authority.

BEFORE YOU CALL

  • A bearer token with payments:write for the named payer, or possession of a deliberately shareable request identifier and exact terms.
  • A unique Idempotency-Key and RFC 9421 signature.
  • The latest expected_request_version, expected_amount, settlement_currency, an opaque payment_source_reference, and an allowed payment_method.

WHAT TO DO NEXT

  • Read the created payment and surface authorization_required=true.
  • Wait for a separately implemented and documented authorization/execution lifecycle before expecting funds or settlement.

AGENT GUIDANCE

  • Send the amount as the exact string last received; any version, amount, currency, expiry, or active-intent mismatch fails closed.
  • AUTHORIZATION_REQUIRED is a proposal. Do not debit a local balance, deliver goods, issue a receipt, or describe the request as paid.
  • After a timeout, reconcile the request and payment collections before retrying the equivalent body and Idempotency-Key.
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_…

request_uuidpathRequired

identifierIncoming OPEN request returned by the payment-request collectionEXAMPLErequest-uuid-01

Idempotency-KeyheaderRequired

ASCII string · 1–128Caller-generated stable key reused for retries of the same logical mutation.EXAMPLEpost-api-v2-payment-requests-request-uuid-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.

expected_amountbodyRequired

positive exact decimal stringExact amount returned by the latest request read; repricing and partial payment are rejected.EXAMPLE125.00

expected_request_versionbodyRequired

integer · ≥1Current payment-request version used for optimistic concurrency.Schema range: 0 to unboundedEXAMPLE1

payment_methodbodyRequired

INTERNAL_BALANCE | HYBRID_WALLET | APPROVED_RAILSelected future authorization path. Recording the intent does not authorize, reserve, or submit through that method.EXAMPLEHYBRID_WALLET

payment_source_referencebodyRequired

owner-safe funding or operational-wallet referenceOpaque source resolved inside the Payments owner. Raw wallet UUIDs, account credentials, seeds, and private keys are forbidden.EXAMPLEfunding-source-01

settlement_currencybodyRequired

uppercase asset or ISO currency codeExact uppercase currency returned by the latest request read.EXAMPLEUSDC

REQUEST

JSON body example

{
  "expected_amount": "100.00",
  "expected_request_version": 0,
  "payment_method": "example-payment-method",
  "payment_source_reference": "example-payment-source-reference",
  "settlement_currency": "USD"
}

RESPONSES

Status and payload examples

201An AUTHORIZATION_REQUIRED payment intent is returned with immutable request, source, amount, currency, method, and state commitments; no value is moved.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 created payment and surface authorization_required=true.
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 version, amount, currency, source, method, request signature, or idempotency key is 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, payer visibility, or a valid RFC 9421 signature.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.
404The payment request or source does not exist in the authenticated owner and network boundary.Resource not visible · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "the supplied Hybrid credential is invalid"
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Verify the canonical identifier and authenticated owner boundary. A 404 may intentionally conceal a resource outside the caller's authority.
RETRY SAFETY
Do not retry the unchanged identifier repeatedly. Refresh the relevant collection or lookup before choosing another identifier.
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.
409The request version, amount, currency, lifecycle, expiry, active-intent state, or Idempotency-Key conflicts.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.
422Payment method, source reference, exact-decimal terms, payer, payee, or request policy validation failed.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 payment intent is created and no value is reserved.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

  • Atomically bind the latest OPEN request terms to an owner-safe source and record an AUTHORIZATION_REQUIRED intent without reserving funds or moving 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