> ## Documentation Index
> Fetch the complete documentation index at: https://corridor.udokaam.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Paj: the first ramp partner

> A reference partner adapter built against Paj's public API v2: offramp orders with one-off funding addresses, onramp orders with one-off virtual accounts, normalised statuses, and signed webhooks.

[Paj](https://paj.cash) converts between USDC and Nigerian naira through a business API. Corridor's adapter (`@corridor/partners`, `PajPartner`) is built against Paj's [public API v2 OpenAPI specification](https://docs.paj.cash/api-reference/openapi.json) and implements the [partner interface](/integrations/partner-interface).

## Why Paj

* **Naira both ways:** offramp (USDC → NGN to a bank account) and onramp (NGN into a virtual account → USDC).
* **Settles on Solana**, where most of its USDC liquidity sits. Base appears in Paj's API but is not live for Corridor yet, and the adapter refuses Base orders rather than send one Paj cannot fill.
* **Signed webhooks** with a timestamped HMAC scheme.
* **Zcash on the roadmap:** `ZCASH` already appears in Paj's chain enum (not yet open), a future path for shielded payouts straight to naira.

## Mapping

| Corridor | Paj API v2 | Notes |
| - | - | - |
| `rates(currency)` | `GET /pub/v2/rate` | On-ramp and off-ramp rates per USD |
| `openPayout(req)` | `POST /pub/v2/offramp` | Returns a **one-off funding address**, valid for 2 hours |
| `openCollection(req)` | `POST /pub/v2/onramp` | Returns a **one-off virtual bank account** for the payer |
| `getOrder(id)` | `GET /pub/v2/transaction/{id}` | Polled as a fallback to webhooks |
| `verifyWebhook` / `parseWebhook` | Webhook delivery | `X-PAJ-Timestamp`, `X-PAJ-Signature: v1=…` |

Requests authenticate with an `x-api-key` header. The Corridor Reference rides in Paj's `description` / `userExternalId` fields and is echoed back on webhooks.

## Status normalisation

| Paj | Corridor |
| - | - |
| `INIT` | `open` |
| `PROCESSING` | `processing` |
| `COMPLETED` | `completed` |
| `ERROR` | `failed` |

## The payout lifecycle

```mermaid theme={"dark"}
sequenceDiagram
  participant S as Corridor saga
  participant P as Paj
  participant V as Corridor vault (Base or Solana)
  participant B as Beneficiary bank
  S->>P: POST /pub/v2/offramp (amount, bank, reference)
  P-->>S: order + one-off funding address
  S->>S: record order link (exactly once)
  S->>V: send USDC to funding address (reference in memo)
  S->>S: record funding tx (exactly once)
  P->>B: NGN to the beneficiary account
  P-->>S: webhook COMPLETED (signed)
  S->>S: book partner.payout, observation for recon
```

## Mock partner

For testnet, a Paj-shaped mock implements the same lifecycle and signs its webhooks with the same scheme, delivered over real HTTP to Corridor's webhook server. The mock observes real Solana devnet funding when the devnet vault holds USDC.

<Info>
  Going live needs a Paj business API key. No code changes: the registry selects `PajPartner` instead of the mock.
</Info>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.