4. Retry Nafath Request

This endpoint retries the Nafath request for a given partner. It uses the provided callback URL and headers to send a retry request for the Nafath process.

❗️

Authorization

This endpoint requires the user to have the role MERCHANT_API_ACCOUNT

Endpoint

POST  /api/partner/register/retry-nafath

Request Headers

HeaderRequiredDescription
AuthorizationYesBearer token provided by Authentication Endpoint
AcceptYesIt must be set to application/JSON.
Content-TypeYesIt must be set to application/JSON.
{
  "Authorization": "Bearer [id_token]",
  "Accept": "application/json",
  "Content-Type": "application/json"
}

Request Body Parameters

The request body must be a JSON object containing the following fields:

FieldTypeRequiredDescription
profileNoStringTrueThe profile number of the partner
sessionUuidStringTrueThe session UUID of the registration
mobileStringTrueThe mobile number of the partner
callbackUrlStringTrueThe callback URL for the Nafath webhook
header1NameStringTrueThe name of the first callback header
header1ValueStringTrueThe value of the first callback header
header2NameStringTrueThe name of the second callback header
header2ValueStringTrueThe value of the second callback header

An example of the request:

{
  "profileNo": "1234567890abcdef",
  "sessionUuid": "1234567890abcdef",
  "mobile": "0500000000",
  "callbackUrl": "https://example.com",
  "header1Name": "header1",
  "header1Value": "value1",
  "header2Name": "header2",
  "header2Value": "value2"
}

Success Response

The response will be a JSON object of type NafathResponse.

FieldTypeDescription
signatureStringDigital signature of the previous step
mobileStringThe mobile number of the partner
sessionUuidStringThe session UUID of the registration
nafathNumberStringThe Nafath number
statusEnum NafathStatusThe status of the Nafath
emailStringThe email of the merchant
errorMessageStringError message if any
activatingAccountResponseActivatingAccountResponseResponse of the activating account

Example of the response:

{
  "signature": "ae135f2506dc3c44152d62265419c09e****",
  "mobile": "00966512345678",
  "sessionUuid": "96ea8e22-edef-414b-9724-3bd2d494b710",
  "nafathNumber": "26",
  "status": "Waiting",
  "email": "[email protected]",
  "errorMessage": null,
  "activatingAccountResponse": null
}

NafathStatus Enum

The NafathStatus enum represents the possible statuses of the Nafath account:

StatusDescription
WAITINGThe request is waiting for processing
COMPLETEDThe request has been completed successfully
EXPIREDThe request has expired
REJECTEDThe request has been rejected
ERRORThere was an error processing

HTTP Status Codes

  • 200 OK: The Nafath request was successfully retried.
  • 400 Bad Request: The request body is invalid or missing required fields.
  • 401 Unauthorized: The user is not authorized to perform this action.
  • 500 Internal Server Error: An unexpected error occurred on the server.