Skip to main content

Method Signature

align.transfers.getOfframpTransfer(
  customerId: string,
  transferId: string
): Promise<Transfer>

Parameters

customerId
string
required
The unique customer identifier (UUID format)
transferId
string
required
The unique offramp transfer identifier

Returns

id
string
Unique transfer identifier
status
string
Current status: pending, processing, completed, failed
type
string
Transfer type: offramp
source_amount
string
Amount of cryptocurrency sent
destination_amount
string
Amount of fiat received

Examples

import Align from "@tolbel/align";

const align = new Align({
  apiKey: process.env.ALIGN_API_KEY!,
  environment: "sandbox",
});

const transfer = await align.transfers.getOfframpTransfer(
  "123e4567-e89b-12d3-a456-426614174000",
  "tr_offramp_abc123"
);

console.log(`Status: ${transfer.status}`);
console.log(`Sent: ${transfer.source_amount} USDC`);
console.log(`Received: $${transfer.destination_amount} USD`);

Full Response Example

{
  "id": "tr_offramp_abc123",
  "status": "completed",
  "type": "offramp",
  "source_amount": "100.00",
  "source_token": "usdc",
  "source_network": "polygon",
  "destination_amount": "98.50",
  "destination_currency": "usd",
  "fee_amount": "1.50",
  "created_at": "2024-01-15T10:30:00Z",
  "completed_at": "2024-01-15T10:45:00Z"
}