How to test our APIs

Once you sign up for Mylapay’s Developer Account, you will be able to access the Mylapay Sandbox. This simulation environment allows you to test the APIs by Authenticating Requests and Responses.
The following parameters are essential:


API Request

Mylapay APIs are RESTful. A REST Request message consists of four components:


API Endpoints

Endpoints
https://sandbox.mylapay.com/v1

HTTP Method

This defines a set of request methods corresponding to the action performed by the resource. There are two basic HTTP methods:

  • POST: Submitting data to the source.
  • GET: Retrieve data.

Headers

The header comprises various fields and their corresponding values, delivering essential information about the message to the recipient. It also includes authentication details to verify the legitimacy of the message.

FieldTypeDescription
HostRequiredAPI endpoint for the source (https://sandbox.mylapay.com).
Content-TypeRequiredapplication/json
EntityIdRequiredUnique Id will be created by Mylapay.

Body

The request in JSON format.


API Authentication

To ensure secure communication between your application and our platform, we use robust API authentication mechanisms. Proper authentication is required for accessing all API endpoints to protect data and prevent unauthorized access. Here’s how to authenticate when interacting with our API.

Authentication Method

Our API uses header-based authentication with an assigned Entity ID. This unique identifier must be included in the header of every API request to verify the identity of the client.

Steps for Authentication:

  • Obtain Entity ID: After registering for Sandbox, you will be provided with an Entity ID. This ID will be required to authenticate our API requests.
  • Include Entity ID in the Header: For every API call, include the Entity ID in the request header.

Handling Authentication Response

If the authentication is correct, the API will return a success response. If the authentication is incorrect or missing, the API will return an error response.

CodeStatusDescription
200SuccessThe request has Succeeded.
400 Bad Request This error indicates that the server cannot process the request due to invalid syntax, incorrect parameters, or malformed data.
500 Internal Server Error The server has encountered an unexpected condition that prevented it from fulfilling the request.
401 Unauthorized The request lacks valid authentication credentials.
403 Forbidden The authenticated user does not have the required permissions to access the resource.

Make sure your API request includes the correct Entity ID and has appropriate permissions.

Best Practices for Secure Authentication

  • Keep your Entity ID confidential: Do not expose your Entity ID in client-side code or publicly available repositories.
  • Use HTTPs: Always make requests over HTTPs to ensure secure transmission of authentication details.

Sample Request

Sample Response

Need support? with Mylapay.

We are here to guide you.