> ## Documentation Index
> Fetch the complete documentation index at: https://paxos-0ac97319-jg-test-1.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Mint

> Deposit USD. Convert or convert-and-transfer in one API call.

![Mint Workflow](https://mintlify.s3.us-west-1.amazonaws.com/paxos-0ac97319-jg-test-1/images/mint.png)

Minting a [Paxos-issued stablecoin](/guides/developer/blockchains#stablecoins) starts by depositing USD on the Paxos platform using the [Fiat Transfers APIs](/api-reference/endpoints/fiat-transfers) (**A** in the diagram).
Depending on the use case, you can either convert USD to a stablecoin and keep the asset on the Paxos platform using [Create Stablecoin Conversion](/api-reference/endpoints/stablecoin-conversion/create-stablecoin-conversion) (option **B**) or use [Create Crypto Withdrawal](/api-reference/endpoints/crypto-withdrawals/create-crypto-withdrawal) to convert and transfer with the same API request (**C**).

> If you've already authenticated and have a USD balances in a Profile, skip ahead to the [convert](#mint-hold) or [convert and transfer](#mint-transfer) step.

## ➊ Authenticate

Include the following scopes when [authenticating](/guides/developer/authenticate):

```shell
conversion:read_conversion_stablecoin conversion:write_conversion_stablecoin funding:read_profile transfer:write_crypto_withdrawal
```

> If you don't see all the scopes when [creating or editing API credentials](/guides/developer/credentials), contact [Support](https://support.paxos.com).

## ➋ Deposit USD

Use [Create Sandbox Deposit](/api-reference/endpoints/sandbox-deposits/create-sandbox-deposit) to add USD to the Profile (`profile_id`) you want the minting process to be associated with.
See the [First API Request](/guides/developer/request) guide for help retrieving Profile IDs.
You can also use the [Fiat Transfers funding flow](/api-reference/endpoints/fiat-transfers) if you've already set up a Fiat Account.

```shell highlight={2}
curl --request POST \
--location 'https://api.sandbox.paxos.com/v2/sandbox/profiles/0d3172c5-8840-4bae-bdd4-30688f0268fc/deposit' \
--header 'Authorization: Bearer {access_token}' \
--data '{
  "asset": "USD",
  "amount": "1000"
}'
```

## ➌ Convert USD to Stablecoin

See the [convert stablecoin](/guides/developer/convert) guide for details on using [Create Stablecoin Conversion](/api-reference/endpoints/stablecoin-conversion/create-stablecoin-conversion) to mint a [Paxos-issued stablecoin](/guides/developer/blockchains#stablecoins).
Once the conversion is [`SETTLED`](/guides/developer/convert#stablecoin-conversion-statuses), use [List Profile Balances](/api-reference/endpoints/profiles/list-profile-balances) to check updated balances.
To check balances of the assets you are interested in, include the `assets` query parameter in the request.

```shell highlight={1}
curl --location 'https://api.sandbox.paxos.com/v2/profiles/0d3172c5-8840-4bae-bdd4-30688f0268fc/balances?assets=USD&assets=PYUSD&assets=USDG' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access_token}'
```

The response includes the updated USD and Paxos-issued stablecoin balances.

```json
{
    "items": [
        {
            "asset": "USD",
            "available": "600",
            "trading": "0"
        },
        {
            "asset": "PYUSD",
            "available": "100",
            "trading": "0"
        },
        {
            "asset": "USDG",
            "available": "100",
            "trading": "0"
        }
    ]
}
```

## ➍ Convert and Transfer

Use [Create Crypto Withdrawal](/api-reference/endpoints/crypto-withdrawals/create-crypto-withdrawal) to transfer the Paxos-issued stablecoin to an address off the Paxos platform with a single request.
To automatically convert fiat (USD) to stablecoin and transfer to an external address with a single request, set the `asset` to the stablecoin you want to mint, the `balance_asset` to `USD`, and the `crypto_network` to the desired network.

### USDG on Ethereum

```shell
curl --location 'https://api.sandbox.paxos.com/v2/transfer/crypto-withdrawals' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data '{
    "profile_id": "0d3172c5-8840-4bae-bdd4-30688f0268fc",
    "asset": "USDG",
    "destination_address": "0x9acb61E5fcE9B5BdA7B44635d86be19d2790D9a9",
    "crypto_network": "ETHEREUM",
    "ref_id": "cw_usdg_eth_293a8f7c-bcb6-483f-919b-8661ae65f0e6",
    "balance_asset": "USD",
    "amount": "100"
}'
```

### PYUSD on Solana

```shell
curl --location 'https://api.sandbox.paxos.com/v2/transfer/crypto-withdrawals' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data '{
    "profile_id": "0d3172c5-8840-4bae-bdd4-30688f0268fc",
    "asset": "PYUSD",
    "destination_address": "BtXdwoYSWPprQT88ZCLuQcXuTz4dFHB1AJFYqr5uXoAd",
    "crypto_network": "SOLANA",
    "ref_id": "cw_pyusd_293a8f7c-bcb6-483f-919b-8661ae65f0e6",
    "balance_asset": "USD",
    "amount": "100"
}'
```

The request confirmation response has a `status` of `PENDING`, since the on-chain transaction has not yet been confirmed.

### USDG on Ethereum

```json highlight={13}
{
    "id": "7c223577-832b-4235-a77e-ebf36dfe9860",
    "customer_id": "8cbc1177-d982-4750-a435-3c7f36245452",
    "profile_id": "0d3172c5-8840-4bae-bdd4-30688f0268fc",
    "ref_id": "cw_usdg_eth_293a8f7c-bcb6-483f-919b-8661ae65f0e6",
    "amount": "100",
    "total": "126.96",
    "fee": "26.96",
    "asset": "USDG",
    "balance_asset": "USD",
    "direction": "DEBIT",
    "type": "CRYPTO_WITHDRAWAL",
    "status": "PENDING",
    ...
    "destination_address": "0x9acb61E5fcE9B5BdA7B44635d86be19d2790D9a9",
    "crypto_network": "ETHEREUM",
    "auto_conversion": {}
}
```

### PYUSD on Solana

```json highlight={13}
{
    "id": "e655c587-e057-4cf2-88d9-7e19ae13f2ee",
    "customer_id": "8cbc1177-d982-4750-a435-3c7f36245452",
    "profile_id": "0d3172c5-8840-4bae-bdd4-30688f0268fc",
    "ref_id": "cw_pyusd_sol_293a8f7c-bcb6-483f-919b-8661ae65f0e6",
    "amount": "100",
    "total": "100",
    "fee": "0",
    "asset": "PYUSD",
    "balance_asset": "USD",
    "direction": "DEBIT",
    "type": "CRYPTO_WITHDRAWAL",
    "status": "PENDING",
    ...
    "destination_address": "BtXdwoYSWPprQT88ZCLuQcXuTz4dFHB1AJFYqr5uXoAd",
    "crypto_network": "SOLANA",
    "auto_conversion": {}
}
```

To check the transaction status on the Paxos platform, use [List Transfers](/api-reference/endpoints/transfers/list-transfers).
You can create a recurring request that look for completed transactions in the Profile.
For example, filter on `type=CRYPTO_WITHDRAWAL` and `status=COMPLETED` parameters to find all the completed transactions.

```shell
curl --location 'https://api.sandbox.paxos.com/v2/transfer/transfers?type=CRYPTO_WITHDRAWAL&status=COMPLETED' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access_token}'
```

By default, the response includes transactions from newest to oldest.

```json highlight={15,33}
{
    "items": [
                {
            "id": "7c223577-832b-4235-a77e-ebf36dfe9860",
            "customer_id": "8cbc1177-d982-4750-a435-3c7f36245452",
            "profile_id": "0d3172c5-8840-4bae-bdd4-30688f0268fc",
            "ref_id": "cw_usdg_eth_293a8f7c-bcb6-483f-919b-8661ae65f0e6",
            "amount": "100",
            "total": "126.96",
            "fee": "26.96",
            "asset": "USDG",
            "balance_asset": "USD",
            "direction": "DEBIT",
            "type": "CRYPTO_WITHDRAWAL",
            "status": "COMPLETED",
            ...
            "destination_address": "0x9acb61E5fcE9B5BdA7B44635d86be19d2790D9a9",
            "crypto_network": "ETHEREUM",
            "crypto_tx_hash": "0x2a0bac30de037b62502540c18ac22b6d75312cd1508c1df3eb6e38f8b7503f1a",
            "auto_conversion": {}
        },{
            "id": "e655c587-e057-4cf2-88d9-7e19ae13f2ee",
            "customer_id": "8cbc1177-d982-4750-a435-3c7f36245452",
            "profile_id": "0d3172c5-8840-4bae-bdd4-30688f0268fc",
            "ref_id": "cw_pyusd_293a8f7c-bcb6-483f-919b-8661ae65f0e6",
            "amount": "100",
            "total": "100",
            "fee": "0",
            "asset": "PYUSD",
            "balance_asset": "USD",
            "direction": "DEBIT",
            "type": "CRYPTO_WITHDRAWAL",
            "status": "COMPLETED",
            ...
            "destination_address": "BtXdwoYSWPprQT88ZCLuQcXuTz4dFHB1AJFYqr5uXoAd",
            "crypto_network": "SOLANA",
            "crypto_tx_hash": "3ShgmRdcuj2usV3tmLvb3BUrEvhAXNWbUseYgRt24Muyv1tiPkohn8ZQAAdS5KeYNLKR6PhmwUta6CW2ZCAuxHt5",
            "crypto_tx_index": "0",
            "auto_conversion": {}
        },
    ],
    "next_page_cursor": "CAESCwiP-OazBhDgzZYyGLSOkw0"
}
```
