Send Money

The primary use case of the Veem API is sending money to vendors/suppliers across the world simply using an email. Users of the API can make a request that initiates a bill payment process and then follow up on its status.

There are 2 main types of Send Money:

  • Send money in domestic currency
  • Send money in foreign currency

Send Money in Domestic Currency

If the money being sent is in the same currency as the sender's bank account, then the only client call that should be made is createPayment. For example:

POST https://sandbox-api.veem.com/veem/v1.1/payments

Headers:

X-Request-Id:
Authorization: Bearer <access_token>

Notes:
X-Request-Id can be any string, but it must be unique for each different transaction you do using the same account. We recommend generating this value as a GUID, and save it for reference. You cannot create two different payments using the same X-Request-Id value, if you try it, you simple get the date for the first payment created using that value.

{
  "notes": "Delivery Bill",
  "payee": {
    "type":"Business",
    "firstName":"Joe",
    "lastName":"Doe",
    "businessName": "ABC Co",
    "countryCode": "US",
    "email": "[email protected]",
    "phone": "16139987705"
  },
  "payeeAmount": {
    "currency": "USD",
    "number": "1001.40"
  },
  "purposeOfPayment": "Goods"
}

When the Veem services receive the request, the following actions are triggered:

  1. Payee account (Guest) is created if it doesn't already exist
  2. Payment is created in Veem
  3. An email is sent to the payee

Note: emails are sent in Sandbox env so please use test emails accounts using 3rd party provide like mailinator
Note: we use E.164 standard for phone numbers. You can use following google-library to validate your customer's phone-number before you send to Veem via API.

The response returned to the client will include all the input fields included in the request, as well as a payment id field that can be used to fetch the status of the payment:

{
    "requestId": "31778a43-50d5-4243-b829-1391e628913b",
    "notes": "Delivery Bill",
    "payee": {
        "email": "[email protected]",
        "countryCode": "US",
        "phone": "tel:+1-613-998-7705"
    },
    "payeeAmount": {
        "number": 1001.4,
        "currency": "USD"
    },
    "status": "Sent",
    "id": 53655,
    "exchangeRate": {
        "fromAmount": 1001.4,
        "fromCurrency": "USD",
        "toAmount": 1001.4,
        "toCurrency": "USD"
    },
    "claimLink": "https://sandbox.veem.com/redirect?to=http%3A%2F%2Fsandbox-api.veem.com%2Fapi%2Fpayments%2Faccounts%2F6311%2Fpayment%2F53655%2Fredirect%3Fsecret%3Da60c9001-84f8-4970-bf13-9835228151da"
}

Send Money in Foreign Currency

If the money being sent is in a different currency from the sender's bank account, then the createPayment should be preceded by a createQuote call . For example:

{
  "fromCurrency": "USD",
  "recipientAccountEmail": "[email protected]",
  "toAmount": 1000.00,
  "toCountry": "CA",
  "toCurrency": "CAD"
}

The createQuote response will include the converted amounts, exchange rate, expiry time, as well as an id for the price quote. For example:

{
  "fromAmount": 812.49,
  "fromCurrency": "USD",
  "toAmount": 1000,
  "toCurrency": "CAD",
  "rate": 1.230786,
  "expiry": 1507396485429,
  "id": "DdwRb1"
}

Prior to the expiry of the priceQuote, the createPayment call should then be made with the price quote id. For example:

{
  "notes": "Delivery Bill",
  "payee": {
    "type":"Business",
    "firstName":"Joe",
    "lastName":"Doe",
    "businessName": "ABC Co",
    "countryCode": "US",
    "email": "[email protected]",
    "phone": "16139987705"
  },
  "payeeAmount": {
    "currency": "USD",
    "number": "1001.40"
  },
  "purposeOfPayment": "Goods",
  "exchangeRateQuoteId": "DdwRb1"
}

When the Veem services receive the request, the following actions are triggered:

  1. Payee account is created if it doesn't already exist
  2. Payment is created in Veem
  3. An email is sent to the payee
    Note: emails are sent in Sandbox env so please use test emails accounts (ie @mailinator)

The response returned to the client will include all the input fields included in the request, as well as a payment id field that can be used to fetch the status of the payment:

{
    "requestId": "3966bc3a-965d-42bd-b99e-c135c81fd91c",
    "notes": "Delivery Bill",
    "payee": {
        "email": "[email protected]",
        "countryCode": "US",
        "phone": "tel:+1-613-998-7705"
    },
    "payeeAmount": {
        "number": 1001.4,
        "currency": "USD"
    },
    "status": "Sent",
    "id": 53656,
    "exchangeRate": {
        "fromAmount": 1001.4,
        "fromCurrency": "USD",
        "toAmount": 1001.4,
        "toCurrency": "USD"
    },
    "claimLink": "https://sandbox.veem.com/redirect?to=http%3A%2F%2Fsandbox-api.veem.com%2Fapi%2Fpayments%2Faccounts%2F6311%2Fpayment%2F53656%2Fredirect%3Fsecret%3Da1d36d1d-85ec-4b1c-8146-f3ba8005f2d4"
}