BlueDocumentation
repo.blue ↗
Solutions

Conditional payments on existing rails

Use PayNotes to govern requests, conditions, evidence, and lifecycle around one transaction while banks, processors, wallets, and rails remain authoritative for money movement.

The category error to avoid#

Changing a document field to Paid does not move money. A payment request is not payment truth. A deterministic processor should not call a bank API or pretend that a provider outcome occurred.

The Blue pattern#

A commercial document explains why payment should be requested: an Order was accepted, a milestone was completed, a return window closed, or several suppliers confirmed.

A separate PayNote governs one payment process: participants, expected or final amount, conditions, requests, Responses, locks, cancellation, completion, and reversal.

A guarantor or payment provider controls or authoritatively reports the external rail outcome. Its attributed Response enters the PayNote through the configured channel.

Request and Response are different facts#

The payer may request cancellation. The payee may request capture. The Order may request completion after conditions are met. None of those requests prove the rail action succeeded.

The guarantor can respond that funds were secured, completion succeeded, a request was declined, a technical failure occurred, cancellation happened before completion, or reversal happened after completion.

Conditional capture#

Consider a dinner-and-flowers package. The customer authorizes payment. Alice and Bob independently confirm their parts. Only when both confirmations exist does the Order emit a completion or capture request. The payment provider performs the rail action and returns the authoritative result.

The causal chain remains inspectable:

supplier confirmations
→ commercial condition satisfied
→ PayNote request
→ provider rail action
→ provider Response
→ PayNote state and related document events

One PayNote, one transaction#

Separate transactions should normally use separate PayNotes: a supplier payout, referral fee, refund, compensation, or triggered child payment has its own participants, provider evidence, dispute path, and lifecycle.

Agent authority and bank authority remain separate#

A Blue Mandate may authorize an agent to request a payment-related operation. The bank still evaluates its own regulated credentials, consent, risk, compliance, and rail controls. Blue coordinates these layers; it does not erase them.

Status#

PayNote is a broad draft package with a growing repository type catalog. Production rail profiles still need exact transition guards, idempotency, amount invariants, provider signatures, and integration-specific conformance.