# API Sequence

To implement a high-value interbank settlement rail, you must provide the bank’s IT team with a clear API Sequence that connects their internal fiat ledger to the Circle Mint and CCTP protocols.

As of 2026, the global standard for these messages is ISO 20022, which ensures that the blockchain data is "readable" by the bank's legacy reconciliation systems.

***

### 🛠️ The "Interbank Mint & Transfer" Sequence

This blueprint shows how the Hub orchestrates a transfer of EURC from Bank A to Bank B using a "Hold-and-Mint" pattern.

#### Step 1: Initialize Fiat Hold (Bank A Internal)

Before any crypto moves, the Hub notifies Bank A's system to lock the customer's funds.

* Endpoint: `POST /api/v1/settlement/initiate`
* Payload (ISO 20022 `pacs.008` mapping):

  JSON

  ```
  {
    "instrId": "TX-99823-XYZ",
    "dbtr": { "nm": "Client Alpha", "lei": "549300..." },
    "cdtr": { "nm": "Client Beta", "lei": "123456..." },
    "intrBkSttlmAmt": { "amt": "10000.00", "ccy": "EUR" }
  }
  ```

#### Step 2: Trigger Circle Mint (AdonisJS Hub)

Once the Hub receives a `HOLD_CONFIRMED` webhook from Bank A, it calls the Circle Mint API to generate the EURC on Solana.

* Circle Endpoint: `POST /v1/payouts`
* Logic: The Hub uses the Bank's authorized vLEI Signature to authenticate the request to Circle.

#### Step 3: Cross-Chain Settlement (Circle CCTP)

If Bank B is on a different blockchain (e.g., Ethereum or Base), the Hub triggers CCTP to "burn" the EURC on Solana and "mint" it on the destination.

* Action: Hub fetches the Circle Attestation for the burn event.
* Action: Hub submits the attestation to the destination chain to finalize the transfer.

#### Step 4: Final Reconciliation (Bank B Internal)

When the EURC arrives in Bank B's wallet, the Hub sends a "Settlement Finalized" webhook to Bank B's core system.

* Webhook Payload:

  JSON

  ```
  {
    "status": "SETTLED",
    "blockchain_tx_hash": "5uR9...zKx",
    "vlei_signature": "SIG_CEO_BANK_A",
    "final_amount": "10000.00 EURC"
  }
  ```

***

### 📊 Summary of System Roles

| **System**   | **Role**                                  | **Technology**           |
| ------------ | ----------------------------------------- | ------------------------ |
| Bank Core    | Fiat Ledger & "Hold" Authority            | REST API (Temenos/Mambu) |
| AdonisJS Hub | Transaction Orchestrator & vLEI Validator | Node.js / Credo-TS       |
| Circle API   | Stablecoin Minting & Cross-chain Routing  | Circle Mint / CCTP       |
| Solana       | Real-time Settlement Layer (400ms)        | Token-2022               |

***

### 🛡️ Why ISO 20022 Matters in 2026

Regulators now require that every stablecoin transaction has "Rich Metadata." \* The Hub's Job: It maps the raw Solana Transaction ID to an ISO 20022 `camt.053` (Bank Statement) message.

* The Result: The bank’s internal auditors can see the *purpose* of the $10k transfer (e.g., "Invoice Payment #123") directly in their legacy reporting tools.

#### Implementation Next Step:

Would you like me to generate the "Webhook Listener" code for AdonisJS? This will allow your Hub to automatically process "Payment Success" notifications from Circle and update both banks' dashboards in real-time.
