Skip to content

Fiat to Stablecoin

This guide walks you through how to initiate a fiat-to-stablecoin wire using FSCO. These transfers are typically used to on-ramp users from traditional banking into stable digital assets like USDC or PHPX.

This flow typically completes in minutes depending on the provider and fiat processing time.

  • You must have a verified FSCO wallet (walletId) or a target address to receive stablecoins.
  • Your organisation must be KYC/AML-approved with supported on-ramp providers.
  • Your API key must include wire:write and wallet:read permissions.

Use the following endpoint to fetch deposit instructions for the source currency. Your API key’s country of registration will determine the available on-ramp provider.

deposit-instructions.sh
curl -X GET https://api.fsco.io/v2/wires/deposit-instructions/PHP \
-H "Authorization: Bearer $FSCO_API_KEY" \
-H "Content-Type: application/json"

Response:

response.json
{
"currency": "PHP",
"bankName": "UnionBank",
"accountNumber": "1234567890",
"accountHolderName": "FSCO On-Ramp",
"reference": "fsco-abc123",
"instructions": "Include this reference when making the deposit"
}
create-wire.sh
curl -X POST https://api.fsco.io/v2/wires \
-H "Authorization: Bearer $FSCO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sourceType": "fiat",
"sourceCurrency": "PHP",
"sourceAmount": "10000",
"sourceDetails": {
"note": "Deposit for on-ramp"
},
"destinationType": "stablecoin",
"destinationCurrency": "PHPX",
"destinationDetails": {
"walletId": "123e4567-e89b-12d3-a456-426614174000"
}
}'

Response:

response.json
{
"id": "123e4567-e89b-12d3-a456-123e4567e89b",
"status": "pending",
"type": "on-ramp",
"sourceType": "fiat",
"sourceCurrency": "PHP",
"sourceAmount": "10000",
"sourceDetails": {
"note": "Deposit for on-ramp"
},
"destinationType": "stablecoin",
"destinationCurrency": "PHPX",
"destinationAmount": null,
"destinationDetails": {
"walletId": "123e4567-e89b-12d3-a456-426614174000"
},
"createdAt": "2025-05-05T12:34:56.000Z",
"updatedAt": null,
"completedAt": null,
"txHashes": [],
"externalReferences": {
"depositReference": "FSCO123456789"
},
"reference": null,
"notes": null
}

This creates the wire. The user should now make a deposit to the bank account specified in the deposit instructions.

Once the deposit is made, the provider will notify FSCO automatically.

After the user deposits fiat using the provided reference code:

  • FSCO is notified by the provider once funds are received.
  • FSCO matches the deposit to the correct wire via reference.
  • FSCO converts the fiat to the selected stablecoin.
  • The stablecoins are transferred to the target wallet.
  • The wire status is updated and a wire.completed webhook is emitted (if configured).

To check the wire status at any time:

create-wire.sh
curl -X GET https://api.fsco.io/v2/wires/<wireId> \
-H "Authorization: Bearer $FSCO_API_KEY"

Which will return a response similar to the following:

response.json
{
"id": "123e4567-e89b-12d3-a456-123e4567e89b",
"status": "processing",
"type": "on-ramp",
"sourceType": "fiat",
"sourceCurrency": "PHP",
"sourceAmount": "10000",
"sourceDetails": {
"note": "Deposit for on-ramp"
},
"destinationType": "stablecoin",
"destinationCurrency": "PHPX",
"destinationAmount": null,
"destinationDetails": {
"walletId": "123e4567-e89b-12d3-a456-426614174000"
},
"createdAt": "2025-05-05T12:34:56.000Z",
"updatedAt": null,
"completedAt": null,
"txHashes": [],
"externalReferences": {
"depositReference": "FSCO123456789"
},
"reference": null,
"notes": null
}

The status will reflect the current state (e.g. processing, completed, failed).

Once processing is complete, the stablecoins are transferred on-chain to the destination wallet.

  • Funds arrive in the wallet (walletId or raw address).
  • The wire is marked as completed.
  • A wire.completed webhook is triggered with full details of the transaction.
  • Use the wireId returned from creation to fetch status, generate receipts, or view history.
  • Deposit instructions expire after a short time — delays may result in rejection or failure.
  • Funds will only be matched if the correct reference code is used during deposit.
  • Destination wallets must support the selected stablecoin and be funded on supported chains.
  • Use webhooks for real-time updates, or poll the status endpoint if needed.