Merchant Registration
API Documentation for Merchant Registration
This document provides detailed instructions for developers to register a new merchant using the provided API.
Endpoint
- URL:
/api/merchants/register
- Method:
POST
- Content-Type:
application/json
Description
This API endpoint allows you to register a new merchant.
Request URL
https://api.paylink.sa/api/merchants/register
HTTP Method
POST
Request Headers
Content-Type: application/json
X-API-KEY: your_api_key
Request Body
The request body must be in JSON format and include the following fields:
- merchantName (string): The name of the merchant. Example:
"Merchant ABC"
- email (string): The email address of the merchant. Example:
"[email protected]"
- phone (string): The phone number of the merchant in the format
966XXXXXXXXX
. Example:"966123456789"
- registrationType (string): The type of registration, either
"freelancer"
or"company"
. Example:"freelancer"
- licenseNumber (string): The license number of the merchant (required if registrationType is
"company"
). Example:"1010123456"
- IBAN (string): The IBAN of the merchant. Example:
"SA123456789012345678901234"
- identityNumber (string): The merchant's national ID or Iqama number. Example:
"1234567890"
- dateOfBirth (string): The date of birth of the merchant in
YYYY-MM-DD
format. Example:"1980-01-01"
- activityDescription (string): Description of the merchant's activities. Example:
"Providing online marketing and web development services"
- city (string): The city of the merchant. Example:
"Riyadh"
- monthlySalesVolume (number): The monthly sales volume in SAR. Example:
50000
- salesScope (string): The sales scope, either
"domestic"
or"global"
. Example:"domestic"
- merchantId (string): any character representing a unique value for the given merchant.
Example Request Body:
{
"merchantId": "cic123",
"merchantName": "Merchant ABC",
"email": "[email protected]",
"phone": "966123456789",
"registrationType": "freelancer",
"licenseNumber": "1010123456",
"IBAN": "SA123456789012345678901234",
"identityNumber": "1234567890",
"dateOfBirth": "1980-01-01",
"activityDescription": "Providing online marketing and web development services",
"city": "Riyadh",
"monthlySalesVolume": 50000,
"salesScope": "domestic",
"configuration": {
"hasInstantSettlement":"false"
}
}
Example curl
Command
curl
Commandcurl -X POST https://api.paylink.sa/api/merchants/register \
-H "Content-Type: application/json" \
-H "X-API-KEY: your_api_key" \
-d '{
"merchantId": "cic123",
"merchantName": "Merchant ABC",
"email": "[email protected]",
"phone": "966123456789",
"registrationType": "freelancer",
"licenseNumber": "1010123456",
"IBAN": "SA123456789012345678901234",
"identityNumber": "1234567890",
"dateOfBirth": "1980-01-01",
"activityDescription": "Providing online marketing and web development services",
"city": "Riyadh",
"monthlySalesVolume": 50000,
"salesScope": "domestic",
"configuration": {
"hasInstantSettlement":"false"
}
}'
Replace your_api_key
with your actual API key in the headers.
Success Response
If the request is successful, you will receive a 201 Created
status code with the following response body:
{
"message": "Merchant registered successfully",
"merchantId": "unique_merchant_id"
}
Error Response
If there is an error in the request, you will receive a 400 Bad Request
status code with an error message:
{
"message": "Invalid request data"
}
By following these steps and using the provided documentation, you should be able to successfully register a new merchant using the API.
Updated 4 months ago