Verify if a transfer has been completed. Use this for:
- Payment verification: Poll after sending funds to a quote’s
depositAddress
- Deposit verification: Check if funds arrived at a static deposit address
Polling pattern — Call this endpoint every 2-3 seconds after initiating a transfer. Once isTransferDone returns true, the payment/deposit is complete.
Authentication
Basic authentication. Value: Basic base64(STABLEYARD_APP_ID). Obtain your STABLEYARD_APP_ID from the Stableyard SDK.
Body Parameters
Use either quoteId (for payments) or chainId + depositAddress (for deposits):
For Payment Verification
Quote ID from the /quote response. Use this to verify payment completion.
For Deposit Verification
Chain ID where the deposit was made
The deposit address to check
Response
Indicates if the request was successful
True if the transfer has been detected and processed
curl -X POST https://api.stableyard.fi/sdk/v1/verify-transfer \
-H "Authorization: Basic $(echo -n $STABLEYARD_APP_ID | base64)" \
-H "Content-Type: application/json" \
-d '{
"quoteId": "86598ce7d40ba910c4709093f33543ec1b1bc32f5cf73663d074615a923f3049"
}'
{
"success": true,
"data": {
"isTransferDone": true
},
"requestId": "req_xyz789"
}
Usage Examples
Payment Verification (after /quote flow)
// Poll for payment completion after sending to depositAddress
async function waitForPayment(quoteId: string): Promise<boolean> {
const maxAttempts = 60; // 2 minutes with 2s intervals
for (let i = 0; i < maxAttempts; i++) {
const response = await fetch('https://api.stableyard.fi/sdk/v1/verify-transfer', {
method: 'POST',
headers: {
'Authorization': 'Basic ' + btoa(STABLEYARD_APP_ID),
'Content-Type': 'application/json'
},
body: JSON.stringify({ quoteId })
});
const { success, data } = await response.json();
if (success && data.isTransferDone) {
console.log('Payment complete!');
return true;
}
// Wait 2 seconds before next check
await new Promise(r => setTimeout(r, 2000));
}
throw new Error('Payment verification timeout');
}
// Usage with quote flow
const quote = await createQuote({ ... });
await sendTokensToDepositAddress(quote.data.quoteData.depositAddress);
await waitForPayment(quote.data.quoteData.quoteId);
Deposit Verification (static deposit address)
// Poll for deposit completion at static address
async function waitForDeposit(chainId: number, depositAddress: string) {
const maxAttempts = 60;
for (let i = 0; i < maxAttempts; i++) {
const response = await fetch('https://api.stableyard.fi/sdk/v1/verify-transfer', {
method: 'POST',
headers: {
'Authorization': 'Basic ' + btoa(STABLEYARD_APP_ID),
'Content-Type': 'application/json'
},
body: JSON.stringify({ chainId, depositAddress })
});
const { data } = await response.json();
if (data.isTransferDone) {
return true;
}
await new Promise(r => setTimeout(r, 5000));
}
throw new Error('Deposit timeout');
}
Recommended polling interval: 2-3 seconds for payments, 5 seconds for deposits.