Transfer Auto Flow

📘

Note

We recommend you use this endpoint to initiate a payment. It works exactly as Create Transfer endpoint, but abstracts all the custom processing business logic and validations required, to make process as simple as possible.

Method is used to initiate a new payment from one account to another account. It is identical to Create Transfer endpoint but in this case all the bank required validations and custom processes are handled on the API side.

The result of successfully performed operation is a new transaction registered on users bank account.

👍

Pre-Requirement

You have obtained user's permanent access token from Exchange Token endpoint

To read more about authentication process and access token please refer to Authentication Documentation

📘

Note

Method does not require specification of the currency in which transaction must be performed. API automatically performs the payment in the currency of user account specified in senderID

Request

https://api.dapi.com/v2/payment/transfer/autoflow

Headers

Parameter

Type

Description

Authorization
REQUIRED

String

Set type to bearer token and the value to the accessToken obtained using the Exchange Token request.

Body Parameters

📘

Note

Please note that only difference from Create Transfer endpoint, is that this method does not require specification of receiverID. If required it will be automatically generated by the API.

Parameter

Type

Description

appSecret
REQUIRED

String

Private token generated at application creation.

userSecret
REQUIRED

String

Returned when user authenticates in Dapi system using Connect layer

beneficiary
Optional

Beneficiary Object

Details of amount receiver. See description of the object further in the document.

amount
REQUIRED

Number

Amount of money to be sent. Must be number rounded to up to 2 decimal points.

senderID
REQUIRED

String

An identifier for the bank account the user will send money from.

Obtained from the Account - GetAccounts endpoint.

remark
OPTIONAL

String

A message associated with the transfer.

Beneficiaries schema

Parameter

Type

Description

name
REQUIRED

String

Name of the beneficiary.

nickname
REQUIRED

String

Nickname of the beneficiary.

accountNumber
REQUIRED

String

Account number of the beneficiary.

type
REQUIRED

String

Type of beneficiary. Can be set to same if the beneficiary's bank is the same as the sender's, local if the beneficiary's bank is in the same country, or intl if the beneficiary's bank is in a different country.

address
REQUIRED

Object<Address>

An object containing the address information of the beneficiary.

country
REQUIRED

String

Name of the country in all uppercase letters (e.g. “AE”).

sortCode
OPTIONAL

String

Financial institution’s sort code.

branchAddress
REQUIRED

String

Address of the financial institution’s specific branch.

bankName
REQUIRED

String

Name of the financial institution.

branchName
REQUIRED

String

Name of the financial institution’s specific branch.

phoneNumber
REQUIRED

String

Beneficiary's phone number.

iban
REQUIRED

String

Beneficiary's IBAN number.

swiftCode
REQUIRED

String

Beneficiary's financial institution's SWIFT code.

email
OPTIONAL

String

Only required for Local transfers in Canada

branchCode
OPTIONAL

String

Only required for Same bank transfers in Candata

addresses
OPTIONAL

Array<String>

Specify which webhook URL(s) defined in app settings to send data to. If empty, an update will be sent to all defined webhook URL(s).

Address schema

Parameter

Type

Description

line1
REQUIRED

String

Street name and number. Note: value should not contain any commas or special characters.

line2
REQUIRED

String

City name. Note: value should not contain any commas or special characters.

line3
REQUIRED

String

Country name. Note: value should not contain any commas or special characters.

Request Example

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
    "userSecret": "DSv56dS/PB7QGJI/IGX4qKDhGVhIvQQhWo4zxTDT0gn079JlHnUSSq8NAtavX4fpHj7PGQ74BzVXBO9pFHXdSeLCMnayKLTLD0+zmMu7wfGzy+ZhkYTBe040CXWQ+AYaPhGTzfVWu3Lz6oM2QnqM9X56BbvpC80tN8Zg72VJHWC6YjazdQQ2NK0pl9+ePbmqn7PNjFKLhipgpTl7Hw3kvnLrSIC9AcXzVYQeSWYAv3LAEbECB1aNLXC0glMG2W7L2iLTMwy54wHbXXfSQlK9S6X7wmnZ0tn28H0MwMqWdLLtxvcFyYlMr3E0hqYnK4a5sU0IvF1yJAMHMBCbjw2Trnx2VMuX5IWjdxScfh+8IxWGvKl6RypksJTyNg100H+Q+j0vfKW/bOijFolZgHJtAxUowPlewK9JwoWahkbX2KTGoqQbSCh6KSzaCxdbg7ykNI5n+m6vdoWzGfZGFYjfgMX6aMInAM3b32ZAp9DlfFxRkg3oeoLBuTGTz73E51bZj9mGgD0FxkIXFPIWGx0WyxoYpMEesJeT8phNy0G82Bd7qzWCPGP4gK70jGpqfCWsvj1XZKMMMjReCdUrhtXKB4spQIFi+63WcGV7vDyWQdUTINOhmR8QfZOJoVm+VZgFiqCLI3Aa8AnoYw3UIPiheVjE5lxMulPNIP0QGMR31VY=",
    "amount": 1,
    "senderID": "ntV7rbYoexYaGDRfLCAo8vw1xXgu2VaXXtqvNoMU0sfy6aNErfUEGMD+P6lAlkzu/GKxPeoef7d7eNoxlHKyRw==",
    "beneficiary": {
        "name": "John Doe",
        "nickname": "John Doe ENBD",
        "address": {
            "line1": "Baker Street",
            "line2": "Abu Dhabi",
            "line3": "United Arab Emirates"
        },
        "country": "AE",
        "branchAddress": "Deira",
        "branchName": "Main Branch",
        "swiftCode": "FGBMAEAA",
        "iban": "AE770351001004432453627",
        "accountNumber": "1001004437564656",
        "bankName": "ENBD"
    }
}

Response

📘

Note

Your responses may differ from those listed below on a case-by-case basis.

Parameter

Type

Description

operationID

String

Unique ID generated to identify a specific operation.

success

Boolean

Returns true if request is successful and false for all else.

status

Enum

The status of the job. For further explanation see Job Status

done - Transaction has been completed successfully

failed - Transaction failed

user_input_required - Transaction is pending user action to continue

initialized - Transaction is in progress

reference
OPTIONAL

String

A reference number for the transfer as provided by the financial institution.

Is only returned if the transaction was completed successfully (status is done)

remark
OPTIONAL

String

The remark that was passed in the initial request body for autoflow. If nothing was passed, it will be an empty string.

userInputs
OPTIONAL

Array<userInputs>

Specifies the type of further information required from the user before the job can be completed.

userInputs Object

Parameter

Type

Description

id

Enum

Type of input required. Can be one of the following:

otp

secret_question

captcha

index

Number

query

String

Textual description of what is required from the user side

answer

String

User input that must be submitted. In the response it will always be empty.

"userInputs": [
    {
      "id": "otp",
      "index": 0,
      "query": "Please enter the One Time Password sent to your registered mobile number"
    }

For more information on handling user input, please see User Inputs.

Response Example

{
    "operationID": "74521eb4-34e3-4b49-9161-0edfe4683be7",
    "success": true,
    "status": "done",
    "reference": "119421587",
    "remark": "ABC123"
}

Successful Request / Response - For Banks That Require Beneficiary

Request - For Banks That Require Beneficiary

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
    "userSecret": "DSv56dS/PB7QGJI/IGX4qKDhGVhIvQQhWo4zxTDT0gn079JlHnUSSq8NAtavX4fpHj7PGQ74BzVXBO9pFHXdSeLCMnayKLTLD0+zmMu7wfGzy+ZhkYTBe040CXWQ+AYaPhGTzfVWu3Lz6oM2QnqM9X56BbvpC80tN8Zg72VJHWC6YjazdQQ2NK0pl9+ePbmqn7PNjFKLhipgpTl7Hw3kvnLrSIC9AcXzVYQeSWYAv3LAEbECB1aNLXC0glMG2W7L2iLTMwy54wHbXXfSQlK9S6X7wmnZ0tn28H0MwMqWdLLtxvcFyYlMr3E0hqYnK4a5sU0IvF1yJAMHMBCbjw2Trnx2VMuX5IWjdxScfh+8IxWGvKl6RypksJTyNg100H+Q+j0vfKW/bOijFolZgHJtAxUowPlewK9JwoWahkbX2KTGoqQbSCh6KSzaCxdbg7ykNI5n+m6vdoWzGfZGFYjfgMX6aMInAM3b32ZAp9DlfFxRkg3oeoLBuTGTz73E51bZj9mGgD0FxkIXFPIWGx0WyxoYpMEesJeT8phNy0G82Bd7qzWCPGP4gK70jGpqfCWsvj1XZKMMMjReCdUrhtXKB4spQIFi+63WcGV7vDyWQdUTINOhmR8QfZOJoVm+VZgFiqCLI3Aa8AnoYw3UIPiheVjE5lxMulPNIP0QGMR31VY=",
    "amount": 1,
    "senderID": "ntV7rbYoexYaGDRfLCAo8vw1xXgu2VaXXtqvNoMU0sfy6aNErfUEGMD+P6lAlkzu/GKxPeoef7d7eNoxlHKyRw==",
    "beneficiary": {
        "name": "John Doe",
        "nickname": "John Doe ENBD",
        "address": {
            "line1": "Baker Street",
            "line2": "Abu Dhabi",
            "line3": "United Arab Emirates"
        },
        "country": "AE",
        "branchAddress": "Deira",
        "branchName": "Main Branch",
        "swiftCode": "FGBMAEAA",
        "iban": "AE770351001004432453627",
        "accountNumber": "1001004437564656",
        "bankName": "ENBD"
    }
}

Response - For Banks That Require Beneficiary

{
    "operationID": "74521eb4-34e3-4b49-9161-0edfe4683be7",
    "success": true,
    "status": "done",
    "reference": "119421587",
    "remark": "ABC123"
}

Request / Response - When User Input Is Required

Request - When User Input Is Required

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
    "userSecret": "DSv56dS/PB7QGJI/IGX4qKDhGVhIvQQhWo4zxTDT0gn079JlHnUSSq8NAtavX4fpHj7PGQ74BzVXBO9pFHXdSeLCMnayKLTLD0+zmMu7wfGzy+ZhkYTBe040CXWQ+AYaPhGTzfVWu3Lz6oM2QnqM9X56BbvpC80tN8Zg72VJHWC6YjazdQQ2NK0pl9+ePbmqn7PNjFKLhipgpTl7Hw3kvnLrSIC9AcXzVYQeSWYAv3LAEbECB1aNLXC0glMG2W7L2iLTMwy54wHbXXfSQlK9S6X7wmnZ0tn28H0MwMqWdLLtxvcFyYlMr3E0hqYnK4a5sU0IvF1yJAMHMBCbjw2Trnx2VMuX5IWjdxScfh+8IxWGvKl6RypksJTyNg100H+Q+j0vfKW/bOijFolZgHJtAxUowPlewK9JwoWahkbX2KTGoqQbSCh6KSzaCxdbg7ykNI5n+m6vdoWzGfZGFYjfgMX6aMInAM3b32ZAp9DlfFxRkg3oeoLBuTGTz73E51bZj9mGgD0FxkIXFPIWGx0WyxoYpMEesJeT8phNy0G82Bd7qzWCPGP4gK70jGpqfCWsvj1XZKMMMjReCdUrhtXKB4spQIFi+63WcGV7vDyWQdUTINOhmR8QfZOJoVm+VZgFiqCLI3Aa8AnoYw3UIPiheVjE5lxMulPNIP0QGMR31VY=",
    "amount":1,
    "senderID": "ntV7rbYoexYaGDRfLCAo8vw1xXgu2VaXXtqvNoMU0sfy6aNErfUEGMD+P6lAlkzu/GKxPeoef7d7eNoxlHKyRw==",

}

Response - When User Input Is Required

{
    "operationID": "32d05c2e-e1c3-458c-a59f-209488629f16",
    "success": true,
    "status": "user_input_required",
    "userInputs": [
    {
      "answer": "",
      "id": "otp",
      "index": 0,
      "query": "Please enter a Smart Pass Token from your ENBD mobile application"
    }
    ]
}

For more information on handling user input, please see User Inputs.

Failed Response - Beneficiary Cool Down

Request - Missing Mandatory Parameters

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
    "userSecret": "DSv56dS/PB7QGJI/IGX4qKDhGVhIvQQhWo4zxTDT0gn079JlHnUSSq8NAtavX4fpHj7PGQ74BzVXBO9pFHXdSeLCMnayKLTLD0+zmMu7wfGzy+ZhkYTBe040CXWQ+AYaPhGTzfVWu3Lz6oM2QnqM9X56BbvpC80tN8Zg72VJHWC6YjazdQQ2NK0pl9+ePbmqn7PNjFKLhipgpTl7Hw3kvnLrSIC9AcXzVYQeSWYAv3LAEbECB1aNLXC0glMG2W7L2iLTMwy54wHbXXfSQlK9S6X7wmnZ0tn28H0MwMqWdLLtxvcFyYlMr3E0hqYnK4a5sU0IvF1yJAMHMBCbjw2Trnx2VMuX5IWjdxScfh+8IxWGvKl6RypksJTyNg100H+Q+j0vfKW/bOijFolZgHJtAxUowPlewK9JwoWahkbX2KTGoqQbSCh6KSzaCxdbg7ykNI5n+m6vdoWzGfZGFYjfgMX6aMInAM3b32ZAp9DlfFxRkg3oeoLBuTGTz73E51bZj9mGgD0FxkIXFPIWGx0WyxoYpMEesJeT8phNy0G82Bd7qzWCPGP4gK70jGpqfCWsvj1XZKMMMjReCdUrhtXKB4spQIFi+63WcGV7vDyWQdUTINOhmR8QfZOJoVm+VZgFiqCLI3Aa8AnoYw3UIPiheVjE5lxMulPNIP0QGMR31VY=",
    "amount":1,
    "senderID": "ntV7rbYoexYaGDRfLCAo8vw1xXgu2VaXXtqvNoMU0sfy6aNErfUEGMD+P6lAlkzu/GKxPeoef7d7eNoxlHKyRw==",
}

Response - Missing Mandatory Parameters

{
    "operationID": "DAPIBANK_AE_LIV:8a17fac5-xxxx-47b2-9b87-5d544fd993d9",
    "success": false,
    "status": "failed",
    "type": "BENEFICIARY_COOL_DOWN_PERIOD",
    "msg": "You are attempting a transfer to a newly added beneficiary. Please try to make the transfer again after 6 hours.",
    "coolDownPeriod": {
        "value": 6,
        "unit": "hrs"
    }
}

Failed Request/Response - Invalid SenderID Specified

Failed Request - Invalid SenderID Specified

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
    "userSecret": "DSv56dS/PB7QGJI/IGX4qKDhGVhIvQQhWo4zxTDT0gn079JlHnUSSq8NAtavX4fpHj7PGQ74BzVXBO9pFHXdSeLCMnayKLTLD0+zmMu7wfGzy+ZhkYTBe040CXWQ+AYaPhGTzfVWu3Lz6oM2QnqM9X56BbvpC80tN8Zg72VJHWC6YjazdQQ2NK0pl9+ePbmqn7PNjFKLhipgpTl7Hw3kvnLrSIC9AcXzVYQeSWYAv3LAEbECB1aNLXC0glMG2W7L2iLTMwy54wHbXXfSQlK9S6X7wmnZ0tn28H0MwMqWdLLtxvcFyYlMr3E0hqYnK4a5sU0IvF1yJAMHMBCbjw2Trnx2VMuX5IWjdxScfh+8IxWGvKl6RypksJTyNg100H+Q+j0vfKW/bOijFolZgHJtAxUowPlewK9JwoWahkbX2KTGoqQbSCh6KSzaCxdbg7ykNI5n+m6vdoWzGfZGFYjfgMX6aMInAM3b32ZAp9DlfFxRkg3oeoLBuTGTz73E51bZj9mGgD0FxkIXFPIWGx0WyxoYpMEesJeT8phNy0G82Bd7qzWCPGP4gK70jGpqfCWsvj1XZKMMMjReCdUrhtXKB4spQIFi+63WcGV7vDyWQdUTINOhmR8QfZOJoVm+VZgFiqCLI3Aa8AnoYw3UIPiheVjE5lxMulPNIP0QGMR31VY=",
    "senderID": "invalid_sender_id",
  "amount": 1
}

❗️

Why invalid senderID ?

If you think you are passing a correct senderID into the request, but the request keeps failing. This is an indicator that you should call getAccounts endpoint again in order to retrieve up to date accountIDs to use as senderIDs

Failed Response - Invalid SenderID

{
    "operationID": "EBILAEAD_L:6b859dba-8ea1-43fc-b913-f9c3ed5039a8",
    "msg": "Account ID is invalid.",
    "type": "INVALID_ACCOUNT_ID",
    "success": false,
    "status": "failed"
}

Failed Request/Response - Invalid Token Specified

Request - Invalid Token Specified

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
    "userSecret": "DSv56dS/PB7QGJI/IGX4qKDhGVhIvQQhWo4zxTDT0gn079JlHnUSSq8NAtavX4fpHj7PGQ74BzVXBO9pFHXdSeLCMnayKLTLD0+zmMu7wfGzy+ZhkYTBe040CXWQ+AYaPhGTzfVWu3Lz6oM2QnqM9X56BbvpC80tN8Zg72VJHWC6YjazdQQ2NK0pl9+ePbmqn7PNjFKLhipgpTl7Hw3kvnLrSIC9AcXzVYQeSWYAv3LAEbECB1aNLXC0glMG2W7L2iLTMwy54wHbXXfSQlK9S6X7wmnZ0tn28H0MwMqWdLLtxvcFyYlMr3E0hqYnK4a5sU0IvF1yJAMHMBCbjw2Trnx2VMuX5IWjdxScfh+8IxWGvKl6RypksJTyNg100H+Q+j0vfKW/bOijFolZgHJtAxUowPlewK9JwoWahkbX2KTGoqQbSCh6KSzaCxdbg7ykNI5n+m6vdoWzGfZGFYjfgMX6aMInAM3b32ZAp9DlfFxRkg3oeoLBuTGTz73E51bZj9mGgD0FxkIXFPIWGx0WyxoYpMEesJeT8phNy0G82Bd7qzWCPGP4gK70jGpqfCWsvj1XZKMMMjReCdUrhtXKB4spQIFi+63WcGV7vDyWQdUTINOhmR8QfZOJoVm+VZgFiqCLI3Aa8AnoYw3UIPiheVjE5lxMulPNIP0QGMR31VY=",
    "amount": 1,
    "senderID": "ntV7rbYoexYaGDRfLCAo8vw1xXgu2VaXXtqvNoMU0sfy6aNErfUEGMD+P6lAlkzu/GKxPeoef7d7eNoxlHKyRw==",
    "beneficiary": {
        "name": "John Doe",
        "nickname": "John Doe ENBD",
        "address": {
            "line1": "Baker Street",
            "line2": "Abu Dhabi",
            "line3": "United Arab Emirates"
        },
        "country": "AE",
        "branchAddress": "Deira",
        "branchName": "Main Branch",
        "swiftCode": "FGBMAEAA",
        "iban": "AE770351001004432453627",
        "accountNumber": "1001004437564656",
        "bankName": "ENBD"
    }
}

Response - Invalid Token Specified

{
  "success": false,
  "status": "failed",
  "msg": "Invalid/expired token or invalid secret"
}

Failed Request / Response - Token Is Not Passed

Request - - Token Is Not Passed

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
    "userSecret": "DSv56dS/PB7QGJI/IGX4qKDhGVhIvQQhWo4zxTDT0gn079JlHnUSSq8NAtavX4fpHj7PGQ74BzVXBO9pFHXdSeLCMnayKLTLD0+zmMu7wfGzy+ZhkYTBe040CXWQ+AYaPhGTzfVWu3Lz6oM2QnqM9X56BbvpC80tN8Zg72VJHWC6YjazdQQ2NK0pl9+ePbmqn7PNjFKLhipgpTl7Hw3kvnLrSIC9AcXzVYQeSWYAv3LAEbECB1aNLXC0glMG2W7L2iLTMwy54wHbXXfSQlK9S6X7wmnZ0tn28H0MwMqWdLLtxvcFyYlMr3E0hqYnK4a5sU0IvF1yJAMHMBCbjw2Trnx2VMuX5IWjdxScfh+8IxWGvKl6RypksJTyNg100H+Q+j0vfKW/bOijFolZgHJtAxUowPlewK9JwoWahkbX2KTGoqQbSCh6KSzaCxdbg7ykNI5n+m6vdoWzGfZGFYjfgMX6aMInAM3b32ZAp9DlfFxRkg3oeoLBuTGTz73E51bZj9mGgD0FxkIXFPIWGx0WyxoYpMEesJeT8phNy0G82Bd7qzWCPGP4gK70jGpqfCWsvj1XZKMMMjReCdUrhtXKB4spQIFi+63WcGV7vDyWQdUTINOhmR8QfZOJoVm+VZgFiqCLI3Aa8AnoYw3UIPiheVjE5lxMulPNIP0QGMR31VY=",
    "amount": 1,
    "senderID": "ntV7rbYoexYaGDRfLCAo8vw1xXgu2VaXXtqvNoMU0sfy6aNErfUEGMD+P6lAlkzu/GKxPeoef7d7eNoxlHKyRw==",
    "beneficiary": {
        "name": "John Doe",
        "nickname": "John Doe ENBD",
        "address": {
            "line1": "Baker Street",
            "line2": "Abu Dhabi",
            "line3": "United Arab Emirates"
        },
        "country": "AE",
        "branchAddress": "Deira",
        "branchName": "Main Branch",
        "swiftCode": "FGBMAEAA",
        "iban": "AE770351001004432453627",
        "accountNumber": "1001004437564656",
        "bankName": "ENBD"
    }
}

Response - - Token Is Not Passed

{
  "success": false,
  "status": "failed",
  "msg": "The 'jwt' field is required.",
  "type": "VALIDATION_ERROR"
}

📘

Note

For more information and detailed breakdown of possible errors, please see Errors.