This is only required for offramp transfers where you’re sending crypto from
your own wallet to the platform.
Method Signature
align.transfers.completeOfframpTransfer(
customerId: string,
transferId: string,
data: CompleteOfframpTransferRequest
): Promise<Transfer>
Parameters
The unique customer identifier
The unique transfer identifier
Blockchain transaction hash of the crypto transfer
Example
import Align from "@tolbel/align";
const align = new Align({
apiKey: process.env.ALIGN_API_KEY!,
environment: "sandbox",
});
// After sending crypto to the platform's address
const completed = await align.transfers.completeOfframpTransfer(
"123e4567-e89b-12d3-a456-426614174000",
"tr_123e4567-e89b-12d3-a456-426614174000",
{
deposit_transaction_hash: "0x1234567890abcdef...",
}
);
console.log(`Status: ${completed.status}`);
// Status: processing
const completed = await align.transfers.completeOfframpTransfer(
"123e4567-e89b-12d3-a456-426614174000",
"tr_123e4567-e89b-12d3-a456-426614174000",
{
deposit_transaction_hash: "0x1234567890abcdef...",
}
);
console.log("Status:", completed.status);
Offramp Flow
- Create Quote - Get exchange rate and fees
- Create Transfer - Initialize the transfer
- Send Crypto - Send crypto to the provided address
- Complete Transfer - Submit the tx hash (this step)
- Receive Fiat - Fiat is sent to the bank account
Ensure the transaction is confirmed on the blockchain before calling this
method.