HomeGuidesAPI Reference
Guides

Merchant Onboarding API

Overview

The Merchant Onboarding API handles the full registration and approval flow for new merchants. The process consists of three sequential steps:

  1. Signup — Submit merchant details and documents
  2. Search Merchant — Retrieve the merchant record by email
  3. Approve Merchant — Approve the merchant and activate their account

Base URL

https://app-api.edfapay.com

Authentication

All endpoints (except Signup) require a Bearer Token in the Authorization header.

Authorization: Bearer <your_token>

Endpoints


1. Signup

Register a new merchant by submitting their details and required documents.

POST /public/signup

Headers

HeaderValue
Acceptapplication/json
Content-Typeapplication/json
x-langen

Request Body

{
  "fullName": "John Doe",
  "companyName": "My Company",
  "address": "Riyadh",
  "companyWebsite": "https://example.com",
  "domainUrl": "app.edfapay.com",
  "email": "[email protected]",
  "ibanNumber": "SA0380000000608010167510",
  "freelancerCertificateNumber": "324321432",
  "isFreeLance": true,
  "mobileNumber": "+966-501234525",
  "nationalId": "34324234321432",
  "userType": "FreeLance",
  "MethodType": [],
  "unViewed": 0,
  "merchantOnboardDocumentsRequests": [
    {
      "name": "CR_CERTIFICATE_doc",
      "type": "CR_CERTIFICATE",
      "data": {
        "fileSize": 469513,
        "fileName": "cr_certificate.pdf",
        "contentType": "application/pdf",
        "base64": "<base64_encoded_file>"
      }
    },
    {
      "name": "IBAN_CERTIFICATE_doc",
      "type": "IBAN_CERTIFICATE",
      "data": {
        "fileSize": 469513,
        "fileName": "iban_certificate.pdf",
        "contentType": "application/pdf",
        "base64": "<base64_encoded_file>"
      }
    },
    {
      "name": "NATION_ID_doc",
      "type": "NATION_ID",
      "data": {
        "fileSize": 469513,
        "fileName": "national_id.pdf",
        "contentType": "application/pdf",
        "base64": "<base64_encoded_file>"
      }
    },
    {
      "name": "NATION_ADDRESS_doc",
      "type": "NATION_ADDRESS",
      "data": {
        "fileSize": 469513,
        "fileName": "national_address.pdf",
        "contentType": "application/pdf",
        "base64": "<base64_encoded_file>"
      }
    }
  ]
}

Body Parameters

ParameterTypeRequiredDescription
fullNamestring✅ YesFull name of the merchant owner.
companyNamestring✅ YesName of the company.
addressstring✅ YesPhysical address of the merchant.
companyWebsitestringNoCompany website URL.
domainUrlstring✅ YesThe domain URL used for the partner's platform.
emailstring✅ YesMerchant's email address. Used to look up the merchant later.
ibanNumberstring✅ YesMerchant's IBAN number for payouts.
isFreeLanceboolean✅ Yestrue if the merchant is a freelancer, false for a company.
freelancerCertificateNumberstringConditionalRequired if isFreeLance is true.
crNumberstringConditionalCommercial Registration number. Required if isFreeLance is false.
mobileNumberstring✅ YesMobile number in E.164 format (e.g. +966-501234525).
nationalIdstring✅ YesNational ID number of the merchant owner.
userTypestring✅ YesMerchant type. Values: FreeLance, Company.
MethodTypearrayNoPayment method types. Pass empty array [] if not applicable.
merchantOnboardDocumentsRequestsarray✅ YesList of required documents. See Documents below.

Documents

Each document in merchantOnboardDocumentsRequests must follow this structure:

FieldTypeDescription
namestringInternal document name identifier.
typestringDocument type. See supported types below.
data.fileSizenumberFile size in bytes.
data.fileNamestringOriginal file name with extension.
data.contentTypestringMIME type (e.g. application/pdf, image/jpeg).
data.base64stringBase64-encoded file content.

Supported Document Types:

TypeDescription
CR_CERTIFICATECommercial Registration Certificate
IBAN_CERTIFICATEIBAN Bank Certificate
NATION_IDNational ID document
NATION_ADDRESSNational Address document

Response

Success — 200 OK
{
  "status": "success",
  "message": "Merchant registered successfully."
}
Error Responses
Status CodeDescription
400 Bad RequestMissing or invalid fields in the request body.
409 ConflictA merchant with this email already exists.

Example

curl -X 'POST' \
  'https://app-api.edfapay.com/public/signup' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-lang: en' \
  -d '{
    "fullName": "John Doe",
    "companyName": "My Company",
    "email": "[email protected]",
    "isFreeLance": true,
    ...
  }'

2. Search Merchant

Search for a merchant by email to retrieve their record and ID. This is typically called after Signup to get the merchant_id needed for the Approve step.

GET /merchant-onboard/search

Headers

HeaderValue
AuthorizationBearer <your_token>

Query Parameters

ParameterTypeRequiredDescription
textstring✅ YesThe merchant's email address to search for.
pageNumberintegerNoPage number for pagination. Default: 0.
pageSizeintegerNoNumber of results per page. Default: 1.

Response

Success — 200 OK
{
  "data": {
    "content": [
      {
        "id": "d90200e2-1811-4094-a3a4-a85e30fb0898",
        "fullName": "John Doe",
        "email": "[email protected]",
        "mobileNumber": "+966-501234525"
      }
    ]
  }
}
FieldTypeDescription
data.content[].idstring (UUID)Merchant's unique ID. Use this as merchant_id in the Approve request.
data.content[].fullNamestringMerchant's full name.
data.content[].emailstringMerchant's email address.
data.content[].mobileNumberstringMerchant's mobile number.
Error Responses
Status CodeDescription
200 OK with empty contentNo merchant found for the given email.
401 UnauthorizedMissing or invalid Bearer token.

Example

curl -X 'GET' \
  'https://app-api.edfapay.com/merchant-onboard/search?pageNumber=0&pageSize=1&[email protected]' \
  -H 'Authorization: Bearer <your_token>'

3. Approve Merchant

Approve a registered merchant and activate their account. This finalizes the onboarding process.

POST /merchant-onboard/approve/{merchant_id}

Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer <your_token>
x-langen

Path Parameters

ParameterTypeRequiredDescription
merchant_idstring (UUID)✅ YesThe merchant's unique ID retrieved from the Search step.

Request Body

{
  "name": "John Doe",
  "feeProfileId": null,
  "emailAddress": "[email protected]",
  "mobileNumber": "+966-501234525",
  "nameAR": "جون دو",
  "country": "682",
  "city": "1",
  "state": "",
  "active": true,
  "logo": null,
  "registeredMobileNumber": "+966-501234525",
  "currencyCode": "1",
  "businessCategoryId": "e28ae68c-87d3-478d-afdd-f6020f0182a8"
}

Body Parameters

ParameterTypeRequiredDescription
namestring✅ YesMerchant's full name (English).
nameARstring✅ YesMerchant's full name (Arabic).
emailAddressstring✅ YesMerchant's email address.
mobileNumberstring✅ YesMerchant's mobile number.
registeredMobileNumberstring✅ YesMobile number used during registration.
countrystring✅ YesCountry code ID (e.g. 682 for Saudi Arabia).
citystring✅ YesCity code ID.
statestringNoState/region.
activeboolean✅ YesSet to true to activate the merchant account.
currencyCodestring✅ YesCurrency code ID (e.g. 1 for SAR).
businessCategoryIdstring (UUID)✅ YesUUID of the business category.
feeProfileIdstring / nullNoFee profile UUID, or null to use the default profile.
logostring / nullNoLogo URL or null.

Response

Success — 200 OK
{
  "status": "success",
  "message": "Merchant approved successfully."
}
Error Responses
Status CodeDescription
400 Bad RequestMissing or invalid fields.
401 UnauthorizedMissing or invalid Bearer token.
404 Not FoundMerchant with the given ID does not exist.

Example

curl -X 'POST' \
  'https://app-api.edfapay.com/merchant-onboard/approve/d90200e2-1811-4094-a3a4-a85e30fb0898' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <your_token>' \
  -H 'x-lang: en' \
  -d '{
    "name": "John Doe",
    "emailAddress": "[email protected]",
    "mobileNumber": "+966-501234525",
    "nameAR": "جون دو",
    "country": "682",
    "city": "1",
    "active": true,
    "registeredMobileNumber": "+966-501234525",
    "currencyCode": "1",
    "businessCategoryId": "e28ae68c-87d3-478d-afdd-f6020f0182a8",
    "parentBusinessUnitId": "1d1ff5cb-e945-4d5e-a461-ac217f09ed23"
  }'

Full Onboarding Flow

1. POST /public/signup              → Submit merchant details & documents
          ↓
2. GET  /merchant-onboard/search    → Find merchant by email → get merchant_id
          ↓
3. POST /merchant-onboard/approve/{merchant_id}  → Approve & activate merchant

Notes

  • The email field is the primary identifier used to link steps 1 → 2 → 3.
  • All document files must be base64-encoded before submission.
  • The merchant_id returned in the Search response is required for the Approve call.
  • Steps 2 and 3 require a valid Bearer token with admin/operator privileges.