Skip to content

Allawee API Reference

The Allawee API lets you interact with Allawee resource objects like cards, customers, webhook, events, accounts, simulation. Allawee API is RESTful. You can use it with REST clients like Postman, in your client-side code, in your server-side code, or from your command line with CURL. Every request you make needs an Authorization token.

There are two base URLs for requests:

  • https://api.allawee.com: This is the base url for all request that doesn’t share sensitive customer data
  • https//secure.allawee.com: This is the base url for all requests that share sensitive customer data like Reset Card Pin

Response Format

The Allawee API endpoints provide responses in JSON, formatted for your easy use. You can consume the API the same way you would with any other RESTful API. There are three uppermost attributes you can access in the endpoints:

  • code
  • data
  • metadata
  • ATTRIBUTESDATA TYPE

    DESCRIPTION

  • codestring

    Lets you know whether your request was successful or not.

  • dataobject

    Provides the response object to your request

  • metadataobject

    Provides additional infromation about the response


Testing

When using the Allawee API, you may need to test your implementation before you go live. Ensure your secret key is set to test mode and get familiar with using the API before integration to live.


Errors

When the Allawee API processes a request, it will return a success or failure response to you. A successful response will return a code of “SUCCESS”. Any other response code is a failure, although the code may vary depending on why the request failed.


Response Codes

You can use the response code you receive to determine if your request was properly processed and your response is what you expect. If the request is unsuccessful, the response code can let you know what went wrong.

  • RESPONSE CODEDATA TYPE

    DESCRIPTION

  • SUCCESSstring

    Your request was successful.

  • AUTHORIZATION_REQUIREDstring

    You did not include an authentication token in your request.

  • INVALID_AUTHORIZATION_KEYstring

    The authentication token you used for your request is invalid.

  • INVALID_AUTHORIZATION_TYPEstring

    Ensure that you are using “Bearer ” before your authentication token in your request.

  • MALFORMED_AUTHORIZATION_KEYstring

    There are missing elements in your authentication token.

  • APPLICATION_TIMEOUTstring

    The Allawee API took too long to process your request.

  • REQUEST_TIMEOUTstring

    There is a network or service problem preventing your request from being completed.

  • SERVICE_UNAVAILABLEstring

    The server is currently unavailable.

  • TRIAL_ENDEDstring

    Your trial has ended.


Customers

The Customers API lets you Create a customer, Fetch customers, Update info on your customers and perform various actions on them.

  • ARGUMENTREQUIRED

    DESCRIPTION

  • customersrequired

    The id of the customers to perform the action on.


Create Customers

This section assumes that you have gotten your authentication token. Use your token to make a POST request to the Create customer endpoint like so:

Endpoint

To create a customer, make a POST request to https://api.allawee.com/customers.

The data in the payload of your request should include:

  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • namestring

    Your customer’s name.

  • referencestring

    To identify your customer

  • claimsarray[object]

    individualInformation

  • verificationarray[object]

    [object]

  • metadata[object]

    [object]

If your request is successful, you will get a response with a 200 status code and a data field with information on your cards. Your response should look something like this.

Any other status code besides 200 is an error response. You can check our error responses to determine how you want to handle errors.


Get Customer

The Get customer endpoint allows you get specific details or information about a customer

GETcustomers/{id}
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • idstring

    Your customer id.


Update Customers

The Update Customers endpoint allows you update the data of a customer.

This section assumes that you have gotten your authentication token. Use your token to make a PATCH request to the Update customer endpoint like so:

Endpoint

To update a customer, make a PUT request to https://api.allawee.com/customers/{id}.

Response

The data in the payload of your request should include:

  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • namestring

    Your customer’s name.

  • referncestring

    To identify your customer.

  • claimsarray[object]

    individualInformation

  • verificationarray[object]

    [object]

  • metadata[object]

    [object]

If your request is successful, you will get a response with a 200 status code and a data field with information on your customers. Your response should look something like this.

Any other status code besides 200 is an error response. You can check our error responses to determine how you want to handle errors.


Get All Cards

Getting all cards will show you all cards under your account.

GET/cards
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • limitnumber

    A limit on the number of card objects to be returned.

  • sortstring

    Sort by state

  • beforestring

    you can use “before” as a cursor, which is the object ID that indicates the end of the previous page, enabling you to fetch the preceding page of the list by specifying it in your next call.

  • afterstring

    in order to navigate through a list of objects using pagination, you can use “after” as a cursor, which is the object ID indicating the start of the next page, and by including it in your next call, you can fetch the next page of the list.


Linking a card links a customer and pan to a card. This endpoint requires the secure base url https://secure.allawee.com

POST/cards/link
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • panstring

    The pan of the card.

  • customerstring

    The card id

  • controlsobject

    The control features to be set on the card’s spending.


Activate Card

Activating a card allows the card holder to use that card. This involves changing the card’s default pin. This endpoint requires the secure base url https://secure.allawee.com

POST/cards/{id}/activate
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • cvvstring

    The 3 digits at the back of the card.

  • pinstring

    The card’s new pin code.


Update Card

The update card endpoint allows you to update the data of a particular card using the id.

PUT/cards/{id}
  • idstring

    The unique identifier of the card to update

Body params

  • controlsobject

    The control features to be set on the card’s spending.

  • shippingAddressobject

    The shipping address for the card’s delivery.


Block Card

Blocking one card temporarily prevents the card from being used for payments until it is unblocked.

POST/cards/{id}/block
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • idstring

    Unique identifier of the object.


Unblock Card

You can unblock a card that has been blocked to begin making payments with it again.

POST/cards/{id}/block
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • idstring

    unique identifier of the card


Terminate Card

Terminating a card permanently blocks the card, and refunds the card balance to the customer account.

DELETE/cards/{id}
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • idstring

    unique identifier of the card.


Reset Card Pin

This endpoint lets you reset the pin of the card.

POST/cards/{id}/reset-pin
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • idstring

    Unique identifier of the card.


Fetch Card

Fetch Card lets you retrieve details about a specific card stored on the customer.

GET/cards/{id}
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • idstring

    Unique identifier of the card


Read Card Secrets

This endpoint lets you get the secrets of the card.

GET/cards/{id}/secrets
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • idstring

    Unique identifier of the card.


Create a virtual Card

This Create card endpoint allows you create a virtual card. Note that you have to create a virtual card program before creating a virtual card.

See here: Card Program

Endpoint

To create a virtual card, make a POST request to https://api.allawee.com/cards.

Body

The data in the payload of your request should include:

  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • programstring

    The virtual card program id

  • fxHashstring

    The exchange rate hash.

  • debitCurrencystring

    The type of currency to be debited.

  • amountnumber

    The amount you want to fund the card with.

  • customerstring

    The id of the customer

  • metadata[object]

    meta key and value

Create a virtual card

This section assumes that you have gotten your authentication token. Use your token to make a POST request to the Create a virtual card like so:

If your request is successful, you will get a response with a 200 status code and a data field with information on your virtual card. Your response should look something like this.

Any other status code besides 200 is an error response. You can check our error responses to determine how you want to handle errors.


Fund virtual card

This allows you find a specific virtual card. The fund virtual card endpoint url https://api.allawee.com/cards/id/fund

POST/cards/{id}/fund
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • fxHashstring

    The exchange rate hash.

  • debitCurrencystring

    The currency of the amount to be funded with

  • amountnumber

    The amount you want to fund with


FX Rate

FX Rate allows you to fetch the exchange rate from USD to NGN and viceversa. The endpoint for FX rate url https://api.allawee.com/tools/fx/rate?from=NGN&to=USD

POST/tools/fx/rate?from=NGN&to=USD
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • fromstring

    The main currency

  • tostring

    The currency to be exchanged with


Webhooks

The Webhooks API lets you listen for events and perform actions when those events occur.


Create a Webhook

The create a webhook endpoint registers a url for the Allawee API to call when the chosen event occurs.

POSTwebhooks
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • namestring

    Any name of your choice to easily identity the webhook.

  • descriptionstring

    A description of the webhook.

  • apiVersionstring

    The Allawee API version you are subscribed to.

  • events[array]

    An array of events you wish to listen for.

  • urlstring

    The URL the Allawee API should make a post request to when the registered event occurs.


Update Webhook

To Update your webhook, make a PUT request to https://api.allawee.com/webhooks/{id}

PUTwebhooks
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • namestring

    Any name of your choice to easily identity the webhook.

  • descriptionstring

    A description of the webhook.

  • apiVersionstring

    The Allawee API version you are subscribed to.

  • events[string]

    An array of events you wish to listen for.

  • urlstring

    The URL the Allawee API should make a post request to when the registered event occurs.


Delete Webhook

The Delete Webhook API lets you deletes a webhook on your account.

Endpoint

To Delete a Webhook, make a DELETE request to https://api.allawee.com/webhook/{id}.

Response

The data in the payload of your request should include:

  • ARGUMENTREQUIRED

    DESCRIPTION

  • webhookrequired

    The id of the webhook to perform the action on.


Webhook Signing Key

The Webhook Signing Key API lets you get the secret signing key of the webhook created.

Endpoint

To get the Webhook Signing Key, make a GET request to https://api.allawee.com/webhooks/{id}/secret.

Query params

  • ARGUMENTREQUIRED

    DESCRIPTION

  • webhookrequired

    The id of the webhook to perform the action on.


Roll Webhook Signing Secret

The Roll Webhook Signing Secret API lets you roll the secret signing key of the webhook created.

Rolling the signing key on a regular basis helps ensure that any previously obtained keys are no longer valid, and that only authorized parties have access to the new key.

Endpoint

To get the Webhook Signing Key, make a POST request to https://api.allawee.com/webhooks/{id}/secret/roll.

Query params

  • ARGUMENTREQUIRED

    DESCRIPTION

  • webhookrequired

    The id of the webhook to perform the action on.


Card Programs

The Card Programs API allows you to create, control, update and scale a commercial card program for your users.


Create a Card Program

The Create card program allows you create a card program.

Endpoint

To create a card program, make a POST request to https://api.allawee.com/card-programs.

Response

The data in the payload of your request should include:

  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • namestring

    Your customer’s name.

  • descriptionstring

    The description of the card program.

  • quantitynumber

    The quantity of cards for the card program

  • distribution[object]

    How cards created in this card program are delivered

  • personalization[object]

    Custom design/artwork for cards in this card program

  • authorization[object]

    Authorized accounts and webhooks to service cards in the program

  • networkstring

    The card network

Create a card program

This section assumes that you have gotten your authentication token. Use your token to make a POST request to the Create a card program like so:

If your request is successful, you will get a response with a 200 status code and a data field with information on your card program. Your response should look something like this.

Any other status code besides 200 is an error response. You can check our error responses to determine how you want to handle errors.


Create a Card Program(Virtual Card)

The Create card program allows you create a virtual card program.

Endpoint

To create a virtual card program, make a POST request to https://api.allawee.com/card-programs.

Response

The data in the payload of your request should include:

  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • namestring

    Name of the card program

  • currencystring

    The currency for the card program

  • personalization[object]

    Custom name for cards in this card program

  • authorization[object]

    Authorized accounts to service cards in the program

  • networkstring

    The card network

Create a card program

This section assumes that you have gotten your authentication token. Use your token to make a POST request to the Create a card program like so:

If your request is successful, you will get a response with a 200 status code and a data field with information on your card program. Your response should look something like this.

Any other status code besides 200 is an error response. You can check our error responses to determine how you want to handle errors.


Get Card Programs

Getting all card programs will show you all card programs created under your account.

GET/card-programs
  • ATTRIBUTE

    DATA TYPE

    DESCRIPTION

  • limit

    number

    The number of card programs to fetch

  • sort

    string

    sort by state

  • before

    string

    you can use “before” as a cursor, which is the object ID that indicates the end of the previous page, enabling you to fetch the preceding page of the list by specifying it in your next call.

  • after

    string

    in order to navigate through a list of objects using pagination, you can use “after” as a cursor, which is the object ID indicating the start of the next page, and by including it in your next call, you can fetch the next page of the list.


Update Card Programs

The update card endpoint will update a particular card using the id.

PUT/card-programs/{id}
  • idstring

    The unique identifier of the card program to update

Body params

  • namestring

    Your customer’s name.

  • descriptionstring

    The description of the card program.

  • quantitynumber

    The quantity of cards from the card program

  • distribution[object]

    How cards created in this card program are delivered

  • personalization[object]

    Custom design/artwork for cards in this card program

  • authorization[object]

    Authorized accounts and webhooks to service cards in the program

Update a card program

This section assumes that you have gotten your authentication token. Use your token to make a PUT request to the Update a card program like so:

If your request is successful, you will get a response with a 200 status code and a data field with information on your card program. Your response should look something like this.

Any other status code besides 200 is an error response. You can check our error responses to determine how you want to handle errors.


Delete Card Programs

Deleting a card program deletes the card program and the details no longer exists.

DELETE/card-programs/{id}
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • idstring

    unique identifier of the card program.


Create Accounts

The Accounts API allows you to create a new account

Endpoint

To create an Account, make a POST request to https://api.allawee.com/accounts.

Response

The data in the payload of your request should include:

  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • namestring

    Name of the account

  • typestring

    The type of account

  • currencynumber

    The currency of the account

  • enableDepositstring

    Enable deposits on the account

  • metaDatastring

    meta data


Get All Accounts

Retrieves current accounts based on specified query parameters.

Query params

  • limitnumber

    The number of accounts to fetch

  • sortstring

    sort by state

  • beforestring

    you can use “before” as a cursor, which is the object ID that indicates the end of the previous page, enabling you to fetch the preceding page of the list by specifying it in your next call.

  • afterstring

    in order to navigate through a list of objects using pagination, you can use “after” as a cursor, which is the object ID indicating the start of the next page, and by including it in your next call, you can fetch the next page of the list.


Get Balance

The Get Balance History API allows you to Fetch the balance of the specified account..

  • idstring

    unique identifier of the specified account.


Card Program (Go live)

Endpoint

To go live, make a POST request to https://api.allawee.com/simulation/card-programs/{id}/go-live.

Query params

  • ARGUMENTREQUIRED

    DESCRIPTION

  • idrequired

    The id of the card program to perform the action on.


Request Authorization Check

This Authorization request check API checks the request from the card and you can make decision based on the requests coming from the webhook.

Query params

  • ARGUMENTREQUIRED

    DESCRIPTION

  • idrequired

    The id of the card to perform the action on.

  • channelstring

    This paramenter specifies the channel through which the authorization is being made.


Request Capture Authorization

This endpoint allows the merchant to request authorization for a captured transaction, which means the transaction is ready to be settled.

Endpoint

To call the API, make a POST request to https://api.allawee.com/simulation/cards/{id}/capture.

Query params

  • ARGUMENTREQUIRED

    DESCRIPTION

  • idrequired

    The id of the card to perform the action on.

  • amountnumber

    This parameter specifies the amount of the captured transaction.

  • feesnumber

    This parameter specifies any fees assosciated with the captured transaction.

  • updateAmountnumber

    This parameter specifies any updated fees associated with the captured transaction. If the transaction amount has changed since the authorization was requested, the merchant can update the amount here.

  • updateFeesnumber

    This parameter specifies any updated fees associated witht the captured transaction.

  • channelstring

    This channel parameter specifies the channel through which the authorization request was made. The channel parameter can helps to understand the context of the authorization request and make more informed decisions about whether to approve or decline the captured transaction


Request Reverse Capture

This endpoint allows the merchant to request a reversal of a previously authorized transaction. This can be useful in cases where the transaction needs to be cancelled or refunded.

Endpoint

To call the API, make a POST request to https://api.allawee.com/simulation/cards/{id}/request-authorization/reverse-capture.

Query params

  • ARGUMENTREQUIRED

    DESCRIPTION

  • idrequired

    The id of the card to perform the action on.

  • amountnumber

    This parameter specifies the amount of the captured transaction that the merchant wants to reverse. This indicates that the merchant wants to reverse the entire captured amount.

  • feesnumber

    This parameter specifies any fees associated with the captured transaction that the merchant wants to reverse.

  • channelstring

    This paramenter specifies the channel through which request was made.


Request Update Capture Authorization

This endpoint allows the merchant to request an updated capture for a previously authorized transaction. This can be useful in cases where the final amount of the transaction has changed, or additional items need to be added to the transaction.

Endpoint

To call the API, make a POST request to https://api.allawee.com/simulation/cards/{id}/update-capture.

Query params

  • ARGUMENTREQUIRED

    DESCRIPTION

  • idrequired

    The id of the card to perform the action on.

  • amountnumber

    This parameter specifies the amount of the captured transaction.

  • feesnumber

    This parameter specifies any fees assosciated with the captured transaction.

  • updateAmountnumber

    This parameter specifies any updated fees associated with the captured transaction. If the transaction amount has changed since the authorization was requested, the merchant can update the amount here.

  • updateFeesnumber

    This parameter specifies any updated fees associated witht the captured transaction.

  • channelstring

    This channel parameter specifies the channel through which the authorization request was made. The channel parameter can helps to understand the context of the authorization request and make more informed decisions about whether to approve or decline the captured transaction


Receive a bank transfer payment

This endpoint allows you test the bank transfer pay-in process using the specified account number as the destination for the funds.

To call the API, make a POST request to https://api.allawee.com/simulation/payments/pay-in.

Query params

  • ARGUMENT

    REQUIRED

    DESCRIPTION

  • method

    string

    This key is set to “bank-transfer”, which indicates that the pay-in is being made through a bank transfer.

  • accountNumber

    number

    This is the account number for the recipient of the bank transfer.



Events

Events keep you informed about significant happenings in your account.


Get Events

This event API retrieves the list of events .

Query params

  • limitnumber

    The number of events to fetch

  • sortstring

    sort by state

  • beforestring

    you can use “before” as a cursor, which is the object ID that indicates the end of the previous page, enabling you to fetch the preceding page of the list by specifying it in your next call.

  • afterstring

    in order to navigate through a list of objects using pagination, you can use “after” as a cursor, which is the object ID indicating the start of the next page, and by including it in your next call, you can fetch the next page of the list.


Get One Event

The Get Event API allows you to Fetch the details of the specific event.

  • idstring

    unique identifier of the event.


Retry Events

This event API retries an event.

Query params

  • idstring

    Unique identifier of the event


Get Card Transaction

This Get Card Transaction API retrieves all card transactions.

Query params

  • limitnumber

    The number of card transactions to fetch

  • sortstring

    sort by state

  • beforestring

    you can use “before” as a cursor, which is the object ID that indicates the end of the previous page, enabling you to fetch the preceding page of the list by specifying it in your next call.

  • afterstring

    in order to navigate through a list of objects using pagination, you can use “after” as a cursor, which is the object ID indicating the start of the next page, and by including it in your next call, you can fetch the next page of the list.


Get One Card Transaction

The Get One Transaction API allows you to Fetch the details of the specified card transaction.

  • idstring

    unique identifier of the specified card transaction.


Get Card Authorizations

This Get Card Authorizations API retrieves all authorizations made on cards.

Query params

  • limitnumber

    The number of card authorizations to fetch

  • sortstring

    sort by state

  • beforestring

    you can use “before” as a cursor, which is the object ID that indicates the end of the previous page, enabling you to fetch the preceding page of the list by specifying it in your next call.

  • afterstring

    in order to navigate through a list of objects using pagination, you can use “after” as a cursor, which is the object ID indicating the start of the next page, and by including it in your next call, you can fetch the next page of the list.


Get One Card Authorization

The Get One Transaction API allows you to Fetch the details of the specific card authorization.

  • idstring

    unique identifier of the specified card authorization.


Disputes

This Disputes endpoint allows you dispute a transaction. You can dispute a transaction that the cardholder finds unfamiliar, considers potentially fraudlent, or faces any other concerns about.


Create a dispute

This section assumes that you have gotten your authentication token. Use your token to make a POST request to the Create a dispute like so:

Endpoint

To create a dispute, make a POST request to https://api.allawee.com/disputes.

Body

The data in the payload of your request should include:

  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • sourcestring

    The transaction id

  • reasonstring

    The reason for reporting the dispute

If your request is successful, you will get a response with a 200 status code and a data field with information on your disputes. Your response should look something like this.

Any other status code besides 200 is an error response. You can check our error responses to determine how you want to handle errors.


Update a Dispute

The update card endpoint allows you to update the data of a particular card using the id.

PUT/disputes/{id}
  • idstring

    The unique identifier of the dispute

Body params

  • textstring

    A text requesting for an update of the dispute reported or inputting adding information to the disputes


Close a Dispute

Close disputes let’s you close a dispute.

POST/disputes/{id}/close
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • textstring

    Added information concerning the dispute


Get All Disputes

Getting all disputes will show you all disputes under your account.

GET/disputes
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • limitnumber

    A limit on the number of card disputes to be returned.

  • sortstring

    Sort by state

  • beforestring

    you can use “before” as a cursor, which is the object ID that indicates the end of the previous page, enabling you to fetch the preceding page of the list by specifying it in your next call.

  • afterstring

    in order to navigate through a list of objects using pagination, you can use “after” as a cursor, which is the object ID indicating the start of the next page, and by including it in your next call, you can fetch the next page of the list.


Get One Dispute

Get one dispute lets you retrieve details about a specific dispute.

GET/disputes/{id}
  • ATTRIBUTEDATA TYPE

    DESCRIPTION

  • idstring

    Unique identifier of the dispute