Crypto-to-Fiat Transactions
Learn how to convert crypto holdings into fiat currency and pay out to bank accounts using the Skyline Digital API
Crypto-to-fiat (C2F) is the most common transaction type on the Skyline Digital platform. A C2F transaction converts crypto tokens from your wallet into fiat currency that is paid out to a bank account. This tutorial walks through the complete transaction lifecycle from creating a draft through to monitoring the final settlement.
Prerequisites
Before starting this tutorial, you should have completed:
- Bank Account Setup -- you need at least one bank account registered for the receiver who will receive the fiat payment.
- Wallet Management -- you need a verified wallet that holds the crypto tokens you want to convert.
Your organisation must have an onboarding status of APPROVED and the member initiating the transaction must be AUTHORIZED.
Transaction lifecycle
Every transaction on the platform follows a status progression. Understanding these statuses helps you track where a transaction is in the process.
| Status | Description |
|---|---|
| DRAFT | The transaction has been created but not yet submitted. You can still modify its details. |
| WAITING_ACCEPTANCE | The transaction has been submitted and is awaiting final acceptance from the user. |
| PROCESSING | The transaction has been accepted and Skyline is processing the conversion and payout. |
| RELEASED | The fiat funds have been released to the banking network for delivery to the receiver's bank account. |
| COMPLETED | The transaction is fully settled and the receiver has received the fiat payment. |
| FAILED | The transaction could not be completed due to an error during processing. |
| REJECTED_BY_SKYLINE | The transaction was reviewed and rejected by Skyline's compliance or operations team. |
Step 1: Create a draft transaction
To start a C2F transaction, send a request to POST /transactions with the transaction type set to FIAT. The request includes both transaction-level details and a payments array describing one or more payment instructions.
Transaction-level fields
| Field | Description |
|---|---|
| type | Must be set to FIAT for crypto-to-fiat transactions. |
| token | The crypto token you are converting, such as USDT, USDC, or DAI. |
| walletAddress | The blockchain address of the wallet you are sending crypto from. |
| network | The identifier of the blockchain network. Optional if the wallet is already associated with a specific network. |
Payment-level fields
The payments array can contain up to 30 individual payments. Each payment within a C2F transaction uses the FIAT payment type and specifies the receiver, bank account, and fiat currency details.
| Field | Type | Description |
|---|---|---|
| type | PaymentType | Must be set to FIAT. |
| receiver | Object | The receiver details for this payment, identifying who will receive the fiat funds. |
| bankAccount | Object | The bank account details where the fiat payment will be sent. |
| amount | String | The amount to pay in the target fiat currency. |
| currencyIsoCode | String | The ISO currency code of the target fiat currency (for example, USD, EUR, or GBP). |
| reason | String | A description of the payment reason. Required for all FIAT payments. |
| instructions | String | Optional additional instructions for the payment. |
| documentS3Key | String | Optional reference to a supporting document uploaded to the platform. |
| estimatedRate | String | Optional estimated exchange rate at the time of creation. |
| bankingFeesOption | String | Optional preference for how banking fees are handled. |
The API returns the newly created transaction in DRAFT status, including a unique identifier that you will use in subsequent steps.
Step 2: Validate the transaction
Before submitting, validate the transaction to check for any issues with the provided details. Send a request to POST /transactions/:id/validate, replacing :id with the transaction identifier.
The validation step checks that the selected network is compatible with the token and wallet address, that all required fields are present and correctly formatted, and that the payment details are consistent. If validation fails, the response describes the specific issues that need to be corrected. You can update the draft transaction and validate again.
Step 3: Check token allowance
For crypto-to-fiat transactions, the platform's smart contract needs permission to transfer tokens from your wallet. Send a request to POST /transactions/:id/check-allowance to verify that your wallet has approved a sufficient token spending allowance.
If the allowance is insufficient, you will need to approve the smart contract to spend the required amount of tokens using your wallet software. For Safe multisig wallets, this approval must go through the Safe's multi-signature process.
Step 4: Submit the transaction
Once validated and the allowance is confirmed, submit the transaction by sending a request to POST /transactions/:id/submit. This moves the transaction from DRAFT to WAITING_ACCEPTANCE status.
After submission, the transaction details are locked and can no longer be modified. The platform prepares the transaction for final acceptance.
Step 5: Accept the transaction
To finalise the transaction, send a request to POST /transactions/:id/accept. This step requires that your organisation has APPROVED status and that the member making the request is AUTHORIZED.
Once accepted, the transaction moves to PROCESSING status and Skyline begins executing the conversion. The crypto tokens are transferred from your wallet and the fiat payout is initiated to the receiver's bank account.
Monitoring status
After accepting a transaction, you can track its progress by sending a request to GET /transactions/:id. The transaction will move through the following statuses:
- PROCESSING -- Skyline is converting the crypto and initiating the fiat payout.
- RELEASED -- The fiat funds have been released to the banking network.
- COMPLETED -- The receiver has received the fiat payment and the transaction is fully settled.
If something goes wrong during processing, the status may change to FAILED with details about the issue. In rare cases, the transaction may be set to REJECTED_BY_SKYLINE if it does not pass compliance review.
You can also list all your transactions by sending a request to GET /transactions with pagination parameters.
Documents
The platform can generate PDF documents for completed transactions. Two document types are available:
- Invoice -- send a request to POST /transactions/:id/invoice to generate an invoice PDF for the transaction.
- Statement -- send a request to POST /transactions/:id/statement to generate a transaction statement PDF.
These documents are useful for record-keeping and reconciliation purposes.
Endpoint reference
The table below summarises all endpoints used in the crypto-to-fiat transaction flow.
| Endpoint | Method | Purpose |
|---|---|---|
| /transactions | POST | Create a new draft transaction |
| /transactions/:id | GET | Get transaction details and current status |
| /transactions/:id | PUT | Update a draft transaction |
| /transactions/:id | DELETE | Delete a transaction |
| /transactions/:id/validate | POST | Validate transaction details |
| /transactions/:id/check-allowance | POST | Check token spending allowance |
| /transactions/:id/submit | POST | Submit the transaction for processing |
| /transactions/:id/accept | POST | Accept and finalise the transaction |
| /transactions/:id/invoice | POST | Generate a transaction invoice PDF |
| /transactions/:id/statement | POST | Generate a transaction statement PDF |
| /transactions | GET | List all transactions (paginated) |
What's next
To learn about sending crypto directly to other wallets, continue to the Crypto-to-Crypto tutorial.