> For the complete documentation index, see [llms.txt](https://documentation.voguepay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.voguepay.com/command-api.md).

# Command API

The command API allows you to directly perform several actions on VoguePay from your application.

With command API, you can:

**Fetch:** Query our database for a list of transaction ids which can subsequently be processed with the notification API.

**Withdraw:** You can make withdrawals to one or several bank accounts.

**Pay:** You can transfer money to other VoguePay members.

The Command API works for server-to-server communication.

The Command API can be consumed with the secure url:

```
https://integration.voguepay.com
```

The command API accepts json, xml, yaml or ini formated parameter via HTTP POST. Your query should conform to the format specified below.

|    Key   | Value                                                                                                                                                                                                                                                                                         |
| :------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   task   | fetch or pay or withdraw(Required)                                                                                                                                                                                                                                                            |
| merchant | Your VoguePay Merchant ID (Required)                                                                                                                                                                                                                                                          |
|    ref   | Unique id for each request (Required)                                                                                                                                                                                                                                                         |
|   hash   | <p>Required Security code generated by concatenating the following and passing the result through a sha512 encryption<br><strong>your command api token</strong><br><strong>task specified above</strong><br><strong>your voguepay email</strong><br><strong>ref specified above</strong></p> |
|   list   | Used as a parent container for non-fixed key/value pairs where multiple requests are made in a single call                                                                                                                                                                                    |
|    id    | unique ID for each item in a list if multiple requests are made in a single call                                                                                                                                                                                                              |

**Response**

Command API returns the result as key/pair values in the format that it receives them (json, xml, yaml or ini).

The fields returned as explained below:

|     Key     | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| :---------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|      id     | The original ID submitted for each item in a list of multiple items                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|   username  | Username of the merchant on voguepay is returned                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|     salt    | String used for calculating the returned hash code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|     hash    | <p>Security code for verifying the authenticity of the result.<br>Generated by concatenating the following and passing the result through a sha512 encryption<br><strong>your command api token</strong><br><strong>your voguepay email</strong><br><strong>salt specified above</strong></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|     list    | Used as a parent container for status, response, values and description where multiple requests are made in a single call                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|    status   | <p><strong>OK</strong> for successful operations or<br><strong>FAIL</strong> for unsuccessful operations</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|   response  | <p><strong>OK</strong> = successful operation<br><strong>X001</strong> = Invalid Merchant ID<br><strong>X002</strong> = Invalid Reference<br><strong>X003</strong> = Invalid hash<br><strong>X004</strong> = Invalid task<br><strong>X005</strong> = Invalid Merchant ID<br><strong>X006</strong> = Invalid hash<br><strong>C001</strong> = Unauthorised access<br><strong>C002</strong> = Invalid Email<br><strong>C003</strong> = Invalid username<br><strong>C004</strong> = Invalid phone number<br><strong>C005</strong> = Invalid firstname<br><strong>C006</strong> = Invalid lastname<br><strong>C007</strong> = Invalid country<br><strong>C008</strong> = Unable to create member<br><strong>C009</strong> = Currency not supported by country provided<br><strong>C010</strong> = Password must contain at Least one numeric value (0-9), one Uppercase, one Lowercase and one special character<br><strong>C011</strong> = Invalid Currency<br><strong>W001</strong> = Invalid amount<br><strong>W002</strong> = Operation Failed.<br><strong>W003</strong> = Amount is below minimum allowed<br><strong>W004</strong> = Insufficient balance<br><strong>W005</strong> = Withdrawal failed<br><strong>W006</strong> = Withdrawal failed<br><strong>P001</strong> = Invalid amount<br><strong>P002</strong> = Operation Failed.<br><strong>P003</strong> = Seller and buyer are one and the same<br><strong>P004</strong> = Invalid beneficiary<br><strong>P005</strong> = Invalid memo<br><strong>P006</strong> = payment amount is below minimum allowed<br><strong>P007</strong> = payment amount exceeds maximum allowed<br><strong>P008</strong> = Insufficient balance for payment<br><strong>P009</strong> = Payment failed<br><strong>P010</strong> = Payment failed<br><strong>P011</strong> = Payment failed<br><strong>WL000</strong> = System error<br><strong>WL001</strong> = Invalid Parameters<br><strong>WL002</strong> = Validation Error<br><strong>WL003</strong> = Transaction Request Declined<br><strong>WL004</strong> = Currency is not allowed<br><strong>WL3D</strong> = 3D Authorization required<br></p> |
|    values   | Comma separated transaction IDs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| description | Description of the response                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

Download sample PHP files for command API implementation below:

{% file src="/files/-Mhm5dnC77rZ7AvZXZJI" %}
Fetch
{% endfile %}

{% file src="/files/-Mhm5dn3\_\_Tf2sAzMy36" %}
Query
{% endfile %}

{% file src="/files/-Mhm5dnDdT7P27SSZxz2" %}
Withdraw
{% endfile %}

{% file src="/files/-Mhm5dn8-q-PvRSrevFt" %}
Country and Currency List
{% endfile %}

{% file src="/files/-Mhm5dnBRW06H9ro1E4G" %}
Pay
{% endfile %}

{% file src="/files/-Mhm5dnAAe7KlBqxx1wp" %}
Account Query
{% endfile %}
