Send Money

The primary use case of the Veem API is sending money to vendors/suppliers around the world simply by 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

Any funding method can be used to send money, each sending method has a different fee structure, which is applied to the total amount charged once the payment is processed. Fee information is also included once you start the payment process. You can find more details about Veem’s fees at Veem fees and timelines.

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.2/payments

📘

Headers

There are 2 headers necessary for the use of this endpoint:

  • X-request-id: This is a number unique to the current API request, and follows the UUID format. Reusing this header without changing the value will result in a 409 (Conflict) status. An example X-request-id is as follows:

48855846-628d-4177-b071-80332a116f0a

  • Authorization: This header holds the bearer token required to use Veem's public API, and belongs to the owner account. Failure to use a valid bearer token will result in a 404 (Not Found) status. An example of a valid token is as follows:

Bearer c047594b-082c-4da1-be89-08fe3770f4b3

See Get Access Token section to generate your bearerToken

Notes:
X-Request-Id header 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 UUID, and save it for your reference. You cannot create two different payments using the same X-Request-Id value, if you try it, you will get back the date for the first payment created using that value.

{
    "purposeOfPayment": "Goods",
    "paymentAttributes": {
           "type" : [
               "FAST_TRANSFER"
           ]
    },
    "payee":{
        "email": "[email protected]",
        "firstName": "Payee First Name",
        "lastName": "Payee Last Name",
        "countryCode": "US",
        "phoneCountryCode": "+1",
        "phone": "2102102101",
        "type": "Incomplete"
        
    },
    "amount": {
        "number": 100,
        "currency": "USD"
    },
    "fundingMethod": {
        "id": 1591,
        "type": "Bank"
    },
		payerAccountId: 12345 // see Partner Notes
}

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
  4. The money is pulled from the specified funding method, this field is required.

Notes:

  • The paymentAttributes field is optional and supports FAST_TRANSFER and RTP. It is only applicable when the selected funding method is a bank account, and both the payer and the payee are eligible for this type of transaction.
  • You can retrieve fields such purposeOfPayment and countryCode from the Country-Currency-Map endpoint. Please refer to the following link: country-currency-map
  • Emails are sent in Sandbox env so please use test emails accounts using 3rd party provide like mailinator
  • 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.

Partner Notes:

  • A partner account can be configured to make this API request on behalf of their customers. This requires internal configuration for the partner account by Veem. Once the internal configuration is enabled, the API request can be made using partner account bearer token.
  • payerAccountId is an optional parameter, this needs to be included on the request body in case of partner making an API request on behalf of their customer. This is the customer Veem accountId.

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": "51ec1517-fa12-42af-9e8a-1b53cbf78d9b",
    "payee": {
        "email": "[email protected]",
        "countryCode": "US",
        "phone": "tel:+1-210-210-2101"
    },
    "payeeAmount": {
        "number": 100.00,
        "currency": "USD"
    },
    "status": "Sent",
    "id": 452953,
    "exchangeRate": {
        "fromAmount": 100.50,
        "fromCurrency": "USD",
        "toAmount": 100.00,
        "toCurrency": "USD"
    },
    "feeInformation": {
        "payerInfo": {
            "originalAmount": 100.00,
            "feeAmount": 0.50,
            "totalAmount": 100.50,
            "currency": "USD"
        }
    },
    "timeCreated": "2022-20-10T04:17:17.034Z",
    "timeUpdated": "2022-20-10T04:17:18.432Z",
    "claimLink": "https://api.dev.veem.com/api/c/BTxcTGDm"
}

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:

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

{
    "purposeOfPayment": "Goods",
    "payee": {
        "email": "[email protected]",
        "firstName": "Payee Firt Name",
        "lastName": "payee Last Name",
        "countryCode": "MX",
        "phoneCountryCode": "+52",
        "phone": "2102102101",
        "type": "Incomplete"
    },
    "amount": {
        "number": 7000,
        "currency": "MXN"
    },
    "fundingMethod": {
        "id": 96,
        "type": "Card"
    }
}

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)
  4. Funding method information must be provided for the payment to be processed.

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": "08738500-79ea-4479-94a9-085d464e4fa0",
    "payee": {
        "email": "[email protected]",
        "countryCode": "USD",
        "phone": "tel:+1-210-210-2101"
    },
    "payeeAmount": {
        "number": 7000.00,
        "currency": "MXN"
    },
    "status": "Sent",
    "id": 452954,
    "exchangeRate": {
        "fromAmount": 367.33,
        "fromCurrency": "USD",
        "toAmount": 7000.00,
        "toCurrency": "MXN"
    },
    "feeInformation": {
        "payerInfo": {
            "originalAmount": 360.00,
            "feeAmount": 7.33,
            "totalAmount": 367.33,
            "currency": "USD"
        }
    },
    "timeCreated": "2022-20-10T04:19:10.435Z",
    "timeUpdated": "2022-20-10T04:19:11.813Z",
    "claimLink": "https://api.dev.veem.com/api/c/7tQRslmG"
}

Close Payment

After a payment is created, it can be closed using the following call by passing the paymentId

POST https://sandbox-api.veem.com/veem/v1.2/payments/{paymentId}/cancel