Initiate FX Conversion and Payout

Initiating a conversion between two currency pairs (using their wallets) is easy and straightforward on Verto. You need to pass.

  • The wallet id of the currencyFrom (sourceWalletId) and the currencyTo currency should match the targetAccountId currency, as entered when getting rates.
  • targetAccountId refers to the id of the beneficiary gotten after beneficiary creation.
  • The vfx token gotten from the get rates API response (not expired)
  • The amount
  • A unique uuid that is unique to the exchange transaction

The wallet id for the currency you want to convert from should serve as the sourceWalletId.

The payment type should be specified as convertWalletPayout.

{
"paymentType": "convertWalletPayout",
"sourceWalletId": 3529,
"sourceAmount": 5,
"purposeId": 14,
"vfxToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXJyZW5jeUZyb20iOiJVU0QiLCJjdXJyZW5jeUZyb21JZCI6bnVsbCwiY3VycmVuY3lUbyI6Ik5HTiIsImN1cnJlbmN5VG9JZCI6bnVsbCwiYnlwYXNzQ2hlY2tzIjpmYWxzZSwiY29tcGFueUlkIjoiNTI1IiwicmF0ZSI6MTYwNywic3ByZWFkIjowLCJwYXltZW50TW9kZSI6ImltbWVkaWF0ZSIsImlhdCI6MTczMDAzODE1MCwiZXhwIjoxNzMwMDM4MTgwfQ.77Cv_vnS9mSAtdWd-NJB37zDA_WQOhsUH_c1PT3Cty4",
"customPaymentReference": "9dc2ee8a15cd44e5",
"targetAccountId": 3786,
"paymentId": "9dc2ee8a-15cd-44e5-8ba8-b757c7a3b141",
​​"sender": {
    "country": "NG",
    "type": "individual",
    "name": "John Suit",
    "dob": "1990-03-15",
    "customerIdentificationNumber": "45jtjy",
    "address Line 1": "house street",
    "nationality": "NG",
    "address_city": "London",
    "origination_country": "US",
    "zipCode": "83888"
  }
}

//response
{
    "id": "4202",
    "reference": "EN-23112024-002",
    "userId": "584",
    "companyId": "525",
    "currencyFrom": "GBP",
    "amountFrom": 110,
    "currencyTo": "EUR",
    "amountTo": 132.3,
    "rate": 1.202693,
    "pricing": {
        "overageFee": 0,
        "usageId": "67416975ebd0e9cb7b3e552f",
        "subscriptionId": "65e1b1808fb7fd27802542be"
    },
    "state": "outwardSettlementDone",
    "source": "wallet",
    "sourceId": 2559,
    "target": "account",
    "targetId": 4637,
    "depositAccountId": 4637,
    "description": null,
    "inwardSettlementTime": "2024-11-23T05:35:05.000Z",
    "outwardSettlementTime": "2024-11-23T05:36:36.000Z",
    "purpose": "Purchase of Good(s)",
    "scheduledAt": null,
    "expiredAt": null,
    "createdAt": "2024-11-23T05:34:38.000Z",
    "updatedAt": "2024-11-23T05:36:36.000Z",
    "transaction": {
        "receiver": {
            "accountNumber": "12312312312311",
            "bankName": "Banque BIA",
            "name": "SandBene Corp",
            "bankCode": "BIARFRPP",
            "reference": "RP-23112024-001"
        },
        "shortURL": "https://pay.vertofx.com/p3m1lrv"
    },
     "paymentId": "9dc2ee8a-15cd-44e5-8ba8-b757c7a3b141"

}

Once the order is created, it will get the webhook notification - with the transaction state inward_remittance_confirmed. This means your source wallet has been debited and the transaction confirmed.

{
  "payload": {
    "id": 3791,
    "reference": "EN-22092024-004",
    "amountFrom": "10000000.00",
    "amountTo": "7506100.00",
    "rate": "0.7506100000",
    "transactionState": "inward_remittance_confirmed",
    "status": "deposit_recorded",
    "createdDate": "2024-09-22T14:18:51.000Z",
    "completedDate": "2024-09-22T14:20:08.278Z",
    "archivedDate": null,
    "clientReference": null,
    "currencyFrom": "USD",
    "currencyTo": "KES"
  }

Once the order is confirmed, you will receive a webhook notification with the transaction state as outward_remittance_complete. This means funds have been sent to target beneficiary account.