Working with the API
Authentication
Wewire uses bearer authentication to authenticate the API. You can create your keys on the dashboard under settings > Developer Tab. If you don't have access to that, kindly contact your account manager to give you access.
Production keys are prefixed with sk_live_ and test keys are prefixed with sk_test_
To use your API key, you need to use ww-api-key header with your key as the value of the header.
Pagination
When you call an endpoint to retrieve a list of items via the GET method, that endpoint would also support pagination.
Pagination is a technique used to manage and retrieve large datasets efficiently. Instead of returning the entire dataset in a single response, which can be resource-intensive for both the server and the client, pagination divides the data into smaller, manageable subsets called "pages."
We utilise the page and limit fields as query parameters to paginate lists. For more context, here's an example to explain how this would work.
In this example, we're making an API request to a transactions endpoint and fetching a limit list of 2 books from the first page
curl https://wewireapi.com/transactions?limit=2&page=1 We should have a response structured as follows, which is guaranteed across all endpoints.
{
"data": [
{
"id": "93092390482903489084902",
"amount": 200,
"currency": "AED",
"description": "Test transaction 1"
},
{
"id": "93443869823741234242423",
"amount": 100,
"currency": "USD",
"description": "Test transaction 2"
}
],
"page": 1,
"totalItems": 200,
"limit": 2
}Webhooks
Our Webhooks give your app the ability to listen in near real-time notifications of specific events that occur. To listen for events, you must register your webhook via the webhook registration endpoint. Once submitted we send you a POST request with a JSON structure as shown below. We expect that your endpoint return a 200 status to us promptly to avoid side effects like retries and timeouts.
Webhook Events
The list of event definitions supported by the API at the moment is stated below:
subcustomer.kyc_status_updated
virtual_account.status_updated
transaction.created
transaction.status_transitioned
Last updated