Introduction

This documentation has been written for merchant that has already an account validated by Awdpay.

You can access and check your Awdpay account here

You need to use an API Key and API Secret from your account under the "settings" menu. to generate those informations just click the "generate" button

Firstly you need to make your integration test on our sandbox plateform: HERE. The sandbox mode has been created to let you familiarized with our API. Be aware that all transaction done on sanbox send data to our partners and it consume true money.

Once ready, you can switch to production mode and be able to do real transactions with your customer.

Generate Token

This operation is used to create an access token which can then be used to authorize and authenticate towards the other end-points of the API.

Request

Request URL: https://www.awdpay.com/api/v1/token
Method: POST

Headers

NAME DESCRIPTION
Authorization Basic authentication header containing API user ID and API key. Should be sent in as B64 encoded.

Exemple (curl)

curl --request POST \
  --url https://www.awdpay.com/api/v1/token \
  --header 'Authorization: Basic [userkey:secretkey]'
  • [userkey] generate from your customer area on awdpay.com
  • [secretkey] generate from your customer area on awdpay.com

Responses

200 OK

{
  "access_token": "string",
  "token_type": "string",
  "expires_in": 0
}

401 Unauthorized

{
  "message": "string"
}

500 Internal Server Error

Gateway List

This operation is used to get the list of gateway with their corresponding value. Value to be used for request a deposit

Request

Request URL: https://www.awdpay.com/api/v1/gateways
Method: GET

Headers

NAME DESCRIPTION
Authorization Authorization header used for oauth. Format of the header parameter follows the standard for Bearer. Oauth uses Bearer authentication type where the credential is the received access token.

Exemple (curl)

curl --request GET \
  --url https://www.awdpay.com/api/v1/gateways \
  --header 'Authorization: Bearer [token_access]'
  • [token_access] from generate token api

Responses

200 OK

{
  "data": [
    {
      "id": integer,
      "name": string,
      "value": string,
      "isCrypto": bool,
      "active": bool,
      "isExchangePayment": bool,
      "supportedCurrencies": array,
      "supportedCountries": array
    }
  ],
  "count": integer
}

401 Unauthorized

{
  "message": "string"
}

500 Internal Server Error

Add Money

This operation is used to add money in your awdpay account.

Warning - Special methods

PerfectMoney method:

Using PerfectMoney method, the API will return an url (aka: redirectURL) and an object (aka: redirectObject). Once received, you need to POST request to this url and give the object as data. Your customer will be redirected to perfectMoney paiement.


Moov and Orange method:

Using one of those methods, the API will return a data (aka: extra) and an instruction (aka: instruction). Once received, your customer need to follow the instruction to generate a OTP code. This OTP code + extra need to be forward to use using our Confirmation Api.


Request

Request URL: https://www.awdpay.com/api/v1/deposits
Method: POST

Headers

NAME DESCRIPTION
Authorization Authorization header used for oauth. Format of the header parameter follows the standard for Bearer. Oauth uses Bearer authentication type where the credential is the received access token.

Body Parameters

NAME TYPE MANDATORY DESCRIPTION
payment_method integer Yes ID from gateway api
amount number Yes amount to be send
currency string Yes a value compatible with the payment method choosen
country string No, under condition ISO3166-1-Alpha-2, a value compatible with the payment method choosen. This parameter is mandatory for mtn method
Ref: https://github.com/datasets/country-codes/blob/master/data/country-codes.csv ("ISO3166-1-Alpha-2" column)
customer string Yes email or phone number of your customer. It's used for transaction verification on your side.
number string No, under condition For MTN, phone number with country code and without +. For other method, phone number without country code and +.
For ref: https://github.com/datasets/country-codes/blob/master/data/country-codes.csv (get country code on "Dial" column
agentId integer No, under condition id of a select agent. This parameter is mandatory for agent method
agentInHand boolean No, under condition agent do transaction in direct. This parameter is mandatory for agent method
return_url string No, under condition url to redirect after customer successufly pay on payment method website. This parameter is mandatory for paypal, coinbase, perfectmoney method
cancel_url string No, under condition url to redirect after customer cancel paymebt on payment method website. This parameter is mandatory for paypal, coinbase, perfectmoney method

Exemple (curl)

curl --request POST \
  --url https://www.awdpay.com/api/v1/deposits \
  --header 'Authorization: Bearer [token_access]' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data payment_method=mtn \
  --data amount=200 \
  --data currency=XOF \
  --data country=CI \
  --data number=2250748672248
  • [token_access] from generate token api

Responses

200 OK

{
  "status": string,
  "payment_status": bool,
  "id": integer,
  "payment_method": string,
  "amount": number,
  "depositAmount": number,
  "userId": integer,
  "currency": string,
  "updatedAt": date,
  "createdAt": date,
  "redirect": string,
  "extra": string //only for some gateways
  "instruction": string //only for some gateways
}

400 Bad Request

{
  "message": "string"
}

401 Unauthorized

{
  "message": "string"
}

500 Internal Server Error

Add Money Confirmation

This operation is used to validate your deposit only when "extra" key is present on create Deposit request's response.

Request

Request URL: https://www.awdpay.com/api/v1/deposits/confirm
Method: POST

Headers

NAME DESCRIPTION
Authorization Authorization header used for oauth. Format of the header parameter follows the standard for Bearer. Oauth uses Bearer authentication type where the credential is the received access token.

Body Parameters

NAME TYPE MANDATORY DESCRIPTION
extra string Yes value received by api "create deposit"
otp string Only for orange method otp code received by your customer on their phone

Exemple (curl)

curl --request POST \
  --url https://www.awdpay.com/api/v1/otp \
  --header 'Authorization: Bearer [token_access]' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data otp=123456789 \
  --data extra=46sqdqs4d45d5FDS4544==
  • [token_access] from generate token api

Responses

200 OK

{
  "success": bool
}

400 Bad Request

{
  "message": "string"
}

401 Unauthorized

{
  "message": "string"
}

500 Internal Server Error

Add money Status

This operation is used to get the status of a request to add money. id is the id received after request to add money has been sucessfull.

Request

Request URL: https://www.awdpay.com/api/v1/deposits/{id}
Method: GET

Headers

NAME DESCRIPTION
Authorization Authorization header used for oauth. Format of the header parameter follows the standard for Bearer. Oauth uses Bearer authentication type where the credential is the received access token.

Responses

200 OK

{
  "status": string
}

401 Unauthorized

{
  "message": "string"
}

500 Internal Server Error

Add Money List

This operation is used to get the list of request to add money.

Request

Request URL: https://www.awdpay.com/api/v1/deposits
Method: GET

Headers

NAME DESCRIPTION
Authorization Authorization header used for oauth. Format of the header parameter follows the standard for Bearer. Oauth uses Bearer authentication type where the credential is the received access token.

Responses

200 OK

{
  "count": integer,
  "data": [
    {
      "id": integer,
      "status": string,
      "payment_method": string,
      "payment_status": bool,
      "amount": integer,
      "depositAmount": integer,
      "currency": string,
      "createdAt": date,
      "updatedAt": date,
      "userId": integer,
      "agentId": integer
    },
    {

401 Unauthorized

{
  "message": "string"
}

500 Internal Server Error

Method List

This operation is used to get the list of method with their corresponding value. Value to be used for request a withdraw

Request

Request URL: https://www.awdpay.com/api/v1/methods
Method: GET

Headers

NAME DESCRIPTION
Authorization Authorization header used for oauth. Format of the header parameter follows the standard for Bearer. Oauth uses Bearer authentication type where the credential is the received access token.

Responses

200 OK

{
  "data": [
    {
      "id": integer,
      "name": string,
      "minAmount": number,
      "maxAmount": number,
      "currency": string,
      "fixedCharge": number,
      "percentageCharge": number,
      "active": bool,
      "country": string
    }
  ],
  "count": integer
}

401 Unauthorized

{
  "message": "string"
}

500 Internal Server Error

Wi

This operation is used to Withdraw money in your awdpay account.

Request

Request URL: https://www.awdpay.com/api/v1/withdraws
Method: POST

Headers

NAME DESCRIPTION
Authorization Authorization header used for oauth. Format of the header parameter follows the standard for Bearer. Oauth uses Bearer authentication type where the credential is the received access token.

Body Parameters

NAME TYPE MANDATORY DESCRIPTION
methodId string Yes a value from method api
amount number Yes amount to be send
currency string Yes a value compatible with the payment method choosen
customer string Yes email or phone number of your customer. It's used for transaction verification on your side.
number string No, under condition For MTN, phone number with country code and without +. For other method, phone number without country code and +.
For ref: https://github.com/datasets/country-codes/blob/master/data/country-codes.csv (get country code on "Dial" column
extWallet string No, under condition Wallet number from selected method. This parameter is mandatory for perfectmoney method

Responses

200 OK

{
  "status": string,
  "method": bool,
  "params": array,
  "amount": number,
  "currency": string,
  "fee": number,
  "total": number,
  "userId": integer,
  "updatedAt": date,
  "createdAt": date,
}

400 Bad Request

{
  "message": "string"
}

401 Unauthorized

{
  "message": "string"
}

500 Internal Server Error

Withdraw Status

This operation is used to get the status of a request to withdraw. id is the id received after request to withdraw has been sucessfull.

Request

Request URL: https://www.awdpay.com/api/v1/withdraws/{id}
Method: GET

Headers

NAME DESCRIPTION
Authorization Authorization header used for oauth. Format of the header parameter follows the standard for Bearer. Oauth uses Bearer authentication type where the credential is the received access token.

Responses

200 OK

{
  "status": string
}

401 Unauthorized

{
  "message": "string"
}

500 Internal Server Error

Withdraw List

This operation is used to get the list of requests to withdraw.

Request

Request URL: https://www.awdpay.com/api/v1/withdraws
Method: GET

Headers

NAME DESCRIPTION
Authorization Authorization header used for oauth. Format of the header parameter follows the standard for Bearer. Oauth uses Bearer authentication type where the credential is the received access token.

Responses

200 OK

{
  "count": integer,
  "data": [
    {
      "id": integer,
      "status": string,
      "method": string,
      "amount": number,
      "fee": number,
      "currency": string,
      "createdAt": date
    }
  ]
}

401 Unauthorized

{
  "message": "string"
}

500 Internal Server Error

Transfer Money

This operation is used to send money to an awdpay wallet.

Request

Request URL: https://www.awdpay.com/api/v1/transfers
Method: POST

Headers

NAME DESCRIPTION
Authorization Authorization header used for oauth. Format of the header parameter follows the standard for Bearer. Oauth uses Bearer authentication type where the credential is the received access token.

Body Parameters

NAME TYPE MANDATORY DESCRIPTION
type string yes take 1 possible value "send"
wallet string yes, if email is not used a know wallet from awdpay (starting by X or E or D)
email string yes, if wallet is not used a know email from awdpay
amount number yes amount of the transaction
currency string yes a value available from currency api

Responses

200 OK

{
  "id": integer,
  "type": string,
  "amount": number,
  "currency": string,
  "email": string,
  "trxId": string,
  "userId": integer,
  "updatedAt": date,
  "createdAt": date
}

401 Unauthorized

{
  "message": "string"
}

500 Internal Server Error

Currency list

This operation is used to get all the currencies supported by our API. Please use uppercase value of the 3 digit currency symbol. MinAmout et MaxAmount let you know the amount of money you can use during transactions.

Request

Request URL: https://www.awdpay.com/api/v1/currencies
Method: GET

Headers

NAME DESCRIPTION
Authorization Authorization header used for oauth. Format of the header parameter follows the standard for Bearer. Oauth uses Bearer authentication type where the credential is the received access token.

Exemple (curl)

curl --request GET \
  --url https://www.awdpay.com/api/v1/currencies \
  --header 'Authorization: Bearer [token_access]'
  • [token_access] from generate token api

Responses

200 OK

{
  "count": integer,
  "data": [
    {
      "name": string,
      "symbol": string,
      "crypto": bool,
      "active": bool,
      "minAmount": number,
      "maxAmount": number
    }
  ]
}

401 Unauthorized

{
  "message": "string"
}

500 Internal Server Error