Create account
The account is created by submitting a request to the Create Account API (see example below). This requires an access token (see Authentication). An access token is required for all requests that need to be made as part of the onboarding process. The same access token can be used for multiple requests - it is valid for 60 minutes from time of issue.
curl -i -X POST \
'https://api.hubpay.ae/v1/account' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"accountType": "BUSINESS",
"accountName": "ACME Co.",
"email": "enquiries@acme.com",
"phoneNumber": "+9771234567890",
"countryCode": "AE",
"externalId": "AE00000001"
}'
An example response for a successful create account request:
{
"id": "f8d7f528-87b9-426a-918d-e3f0552e88e4",
"accountType": "BUSINESS",
"accountName": "ACME Co.",
"email": "enquiries@acme.co",
"phoneNumber": "+9771234567890",
"countryCode": "AE",
"externalId": "AE00000001",
"accountStatus": "CREATED"
}
In this response, 'id' is the account id that will need to be provided in subsequent onboarding requests.