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

# API Calldata Integration

> Use REST endpoints to get ready-to-sign PAXGy transaction calldata for minting, redemption, and cross-chain transfers

The API Calldata path lets you prepare PAXGy transactions with plain HTTP requests. The server handles ABI encoding, address resolution, fee quoting, and contract selection, and you get back a transaction object ready to sign and broadcast from any language.

<Info>
  For full control over contract calls without an API dependency, see [Direct
  Contract Integration](/v1.0.0/intro/products/paxgy/developers).
</Info>

## Prerequisites

* A Paxos Labs API key (format: `pxl_<public_id>_<secret>`), sent as the `x-api-key` header
* An **approved wallet address**. See [Access](/v1.0.0/intro/products/paxgy/overview#access). Where an unapproved wallet is rejected depends on the flow: cross-chain transfers fail at preparation with a `403`, while mint and redeem prepare successfully and revert when the transaction executes. Gate the action in your UI on approval status rather than relying on either.
* An EVM signer and an HTTP client

## Endpoints at a glance

Every endpoint takes `vaultAddress` (the PAXGy token address) and `chainId`.

### Transaction preparation

| Endpoint                          | Description                                                             |
| --------------------------------- | ----------------------------------------------------------------------- |
| `GET /v2/core/authorization`      | Detect whether PAXG needs a permit, an approval, or is already approved |
| `GET /v2/amplify/deposit`         | Prepare mint calldata (deposit PAXG, receive PAXGy)                     |
| `GET /v2/amplify/withdraw`        | Prepare redemption calldata (offer PAXGy, receive PAXG)                 |
| `GET /v2/amplify/withdraw/cancel` | Prepare cancel-redemption calldata                                      |
| `GET /v2/amplify/bridge`          | Prepare a cross-chain PAXGy transfer                                    |

### Display helpers

| Endpoint                                 | Description                                                 |
| ---------------------------------------- | ----------------------------------------------------------- |
| `GET /v2/amplify/vaults`                 | Per-chain addresses, accepted assets, and current fee rates |
| `GET /v2/amplify/calculateWithdrawalFee` | Authoritative redemption fee for a given amount             |
| `GET /v2/amplify/userPositions`          | PAXGy balance and its value in PAXG                         |
| `GET /v2/amplify/withdrawalRequests`     | Open and historical redemption requests                     |

## Contract addresses

Rather than hard-coding these, read them from `GET /v2/amplify/vaults` at runtime, which returns the current addresses per chain.

**Ethereum mainnet (chain ID 1)**

| Contract                            | Address                                      |
| ----------------------------------- | -------------------------------------------- |
| PAXGy (share token, `vaultAddress`) | `0x6c6494Fd9962eB98B94ffA48F6679058F820700e` |
| PAXG (deposit asset)                | `0x45804880De22913dAFE09f4980848ECE6EcbAf78` |
| Mint entrypoint                     | `0xF6dE922D08cF9Ee4e7cE25ca1f3936EC1AA1f62C` |
| Redemption queue                    | `0x69e0BF658bE5600864A946b4e5B911736D248FB4` |
| Rate source                         | `0x397e38359f169748a02bc11f98D4f451FE88C1fd` |
| Cross-chain transfer entrypoint     | `0x41AB5d8387e60E30AACCF11357C306f6d875A6f7` |

**X Layer (chain ID 196)**

| Contract                        | Address                                      |
| ------------------------------- | -------------------------------------------- |
| PAXGy                           | `0x6c6494Fd9962eB98B94ffA48F6679058F820700e` |
| Cross-chain transfer entrypoint | `0x41AB5d8387e60E30AACCF11357C306f6d875A6f7` |

<Warning>
  **PAXG does not exist on X Layer**, so there is nothing to mint from or
  redeem into there. X Layer is hold-and-transfer only: acquire PAXGy by
  minting on Ethereum and transferring it across, and redeem by transferring
  it back to Ethereum first. `GET /v2/amplify/deposit` and
  `GET /v2/amplify/withdraw` are Ethereum-only for PAXGy.
</Warning>

## Amounts are base units

Every amount in this API is a **decimal string in base units**. PAXG and PAXGy are both 18-decimal, so 1 PAXG is `"1000000000000000000"`. Never send a float or a human-readable string.

## Fees move with the market

PAXGy's mint and redemption fees are derived from the live PAXG:gold price rather than a fixed schedule. In `GET /v2/amplify/vaults`, those fees are marked `"type": "dynamic"`:

```json theme={null}
{
  "depositFees": { "bps": 12, "percentage": "0.1200", "type": "dynamic", "flatFee": "0" },
  "withdrawFees": { "bps": 35, "percentage": "0.3500", "type": "dynamic" }
}
```

A `dynamic` rate is a point-in-time reading and will move. Treat it as indicative for display, and let the prepare endpoints compute the actual limits that go into the transaction.

<Warning>
  Because the fee moves, calldata prepared now can fail if the user takes a long
  time to confirm. Prepare as close to signing as you can, and widen
  `slippageBps` for slow signing flows such as multisig or hardware wallets.
</Warning>

## Next

<CardGroup cols={2}>
  <Card title="Minting" icon="arrow-down" href="/v1.0.0/intro/products/paxgy/api-calldata/minting">
    Deposit PAXG and receive PAXGy.
  </Card>

  <Card title="Redemption" icon="arrow-up" href="/v1.0.0/intro/products/paxgy/api-calldata/redemption">
    Offer PAXGy and receive PAXG.
  </Card>

  <Card title="Cross-chain" icon="arrows-left-right" href="/v1.0.0/intro/products/paxgy/api-calldata/cross-chain">
    Move PAXGy between Ethereum and X Layer.
  </Card>

  <Card title="Direct Contract" icon="file-code" href="/v1.0.0/intro/products/paxgy/developers">
    Call the contracts without the API.
  </Card>
</CardGroup>
