Money Request

On this page, the details of Money Requests are shown with examples and API endpoints to work with.

Money requests can be made to the other accounts with AAZZUR contacts. The steps for money request are given below:

  1. Select a contact from the available list

  2. Enter details for the request (Amount, Message, Attachments etc.)

  3. Accept the request (For the recipient)

  4. Cancel the request (For the sender)

Contacts (contacts-controller)

Users must provide Contact Permission to use this feature. The contacts are sent in bulk to check if the data is associated with any account by the middleware.

A person can have multiple accounts, which might have the person's email address or phone number associated with them. For example, One person might have an account associated with email and another account with a phone number.

The in-app contact list will be empty for first-time users as the app doesn't have any contacts imported from the device. The first step is to ask for contact permission on the app so that you can get the list of people and send them to the middleware to check for available accounts. To make a transfer request, you must choose a contact first. To find the available contacts, make a POST request using the /v1/contacts-discovery endpoint.

The phone numbers and email addresses have to be sent using the SHA256 method after hashing. A sample request body is given below:

[    
    // this is a single entry from the contact list of the device
    {
        "id": "dev123",
        "emailHash" : "da4ea0932830481fb85ca8208da7983d7e51d780ec48db49d44ec89b82da2bcc",
        "phoneNumberHash": "653eb668de2d0073a67f01770f6a272861c9976551a018f9058b198b90048787" 
    }, 
    // this is another one
    {
        "id": "dev456",
        "emailHash" : "da4ea0932830481fb85ca8208da7983d7e51d780ec48db49d44ec89b82da2bcc",
        "phoneNumberHash": "653eb668de2d0073a67f01770f6a272861c9976551a018f9058b198b90048787" 
    }
]

The successful response will contain the list of the account with the email or phone associated with the account.

Next is to get the amount, message and optional attachment. After getting this information from the user, make the request money API call.

Here the requestType object value should be "REQUEST"

A successful response will send the id of the transfer.

Accepting the Request

After placing the request, the recipient will get a transfer request, and the user has two options, either accept the request or reject the request. The transfer id can be found by making a GET request from the recipient's account. To accept the request, make a POST request in the below API endpoint:

For this request, you have to make sure that a challenge id is available as 'X-AAZZUR-DEVICE-CHALLENGE' and a signature is available as 'X-AAZZUR-SIGNATURE'. To know more about how to generate it, please read through the process available on the Device Verification Page.

Rejecting the Request

Users can also reject the request if they don't want to send the money to the request coming account. Make a POST request to the below API endpoint to reject the Transfer Money Request, keeping in mind that you will need the transfer id to make the request. The transfer id can be found by making a GET request from the recipient's account.

Cancelling the Transfer Request

The user creating the transfer money request can cancel the request before the request is approved or rejected by the receiver. To cancel the transfer money request, make a DELETE request to the below endpoint:

Last updated