Skip to main content

Wallet to Account - Requested Webhook

Overview

The walletToAccount.requested webhook fires immediately after an outbound payout (WALLET_PAYOUT) is submitted and accepted for processing by Atlas.

  • Event Name: walletToAccount.requested
  • Target State: requested
  • HTTP Method: POST (Sent from Atlas to your configured webhook listener URL)

Webhook Headers

HeaderDescription
Content-Typeapplication/json
X-Atlas-SignatureHMAC SHA-256 signature and timestamp for message authentication
X-Atlas-Delivery-IdUnique UUID tracking this webhook delivery attempt

Payload Schema

Payload Fields

FieldTypeDescription
idintegerUnique payment transaction ID.
amountstringTransfer amount formatted as string (e.g. "1000.00").
referencestringUnique order tracking reference (e.g. "REF-W2A-003").
statestringLifecycle state ("requested").
currencystringCurrency code (e.g. "USD").
typestringTransaction type ("wallet_to_account").
walletIdintegerDebited funding wallet ID.
createdDatestringCreation timestamp.
accountobjectTarget beneficiary bank account details.
account.idintegerBeneficiary account ID.
account.accountNumberstringBeneficiary bank account number.
account.bankNamestringBeneficiary bank name.
account.beneficiaryFirstNamestringBeneficiary first name (for individual).
account.beneficiaryLastNamestringBeneficiary last name (for individual).
account.beneficiaryEntityTypestring"individual" or "company".
account.currencystringTarget account currency.
account.statusstringAccount status.

Example Payload

{
"id": 10004,
"amount": "1000.00",
"reference": "REF-W2A-003",
"state": "requested",
"currency": "USD",
"type": "wallet_to_account",
"walletId": 4001,
"createdDate": "2024-01-15T12:00:00Z",
"account": {
"id": 502,
"accountNumber": "87654321",
"bankName": "HSBC",
"beneficiaryFirstName": "John",
"beneficiaryLastName": "Smith",
"beneficiaryEntityType": "individual",
"currency": "USD",
"status": "active"
}
}

Expected Response

Your endpoint must respond with an HTTP 200 OK status code within 5 seconds to acknowledge delivery:

HTTP/1.1 200 OK
Content-Type: application/json

{
"status": "received"
}

Handling Example

// Express.js Webhook Handler
app.post('/api/webhooks/atlas', express.raw({ type: 'application/json' }), (req, res) => {
const signature = req.headers['x-atlas-signature'];

try {
// 1. Verify webhook signature
verifySignature(req.body, signature, process.env.ATLAS_WEBHOOK_SECRET);

const event = JSON.parse(req.body.toString());

// 2. Handle walletToAccount.requested
if (event.state === 'requested') {
console.log(`Processing Wallet to Account - Requested Webhook: Reference ${event.reference}, Amount: ${event.amount} ${event.currency}`);
// Update your internal order or ledger state
}

// 3. Acknowledge receipt
res.status(200).json({ status: 'received' });
} catch (err) {
console.error('Webhook verification failed:', err.message);
res.status(400).send('Invalid signature');
}
});

Interactive Payload Schema & Example

Review the full JSON schema and test response handling: