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
Header | Required | Description |
---|---|---|
Authorization | Yes | Bearer token provided by Authentication Endpoint |
Accept | Yes | It must be set to application/JSON. |
Content-Type | Yes | It 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:
Field | Type | Required | Description |
---|---|---|---|
profileNo | String | True | The profile number of the partner |
sessionUuid | String | True | The session UUID of the registration |
mobile | String | True | The mobile number of the partner |
callbackUrl | String | True | The callback URL for the Nafath webhook |
header1Name | String | True | The name of the first callback header |
header1Value | String | True | The value of the first callback header |
header2Name | String | True | The name of the second callback header |
header2Value | String | True | The 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
.
Field | Type | Description |
---|---|---|
signature | String | Digital signature of the previous step |
mobile | String | The mobile number of the partner |
sessionUuid | String | The session UUID of the registration |
nafathNumber | String | The Nafath number |
status | Enum NafathStatus | The status of the Nafath |
String | The email of the merchant | |
errorMessage | String | Error message if any |
activatingAccountResponse | ActivatingAccountResponse | Response 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
NafathStatus
EnumThe NafathStatus
enum represents the possible statuses of the Nafath account:
Status | Description |
---|---|
WAITING | The request is waiting for processing |
COMPLETED | The request has been completed successfully |
EXPIRED | The request has expired |
REJECTED | The request has been rejected |
ERROR | There 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.
Updated 6 months ago