Links

Sadad

Mobile payment service provided by Al-Madar

Send OTP

This request will validate the customer identity, send OTP and register an unpaid invoice.
post
https://api.plutus.ly/api/v1
/transaction/sadadapi/verify
Send OTP
Send the OTP to the customer's phone number to initiate the transaction
Parameters
Header
Authorization*
Bearer: [Access token]
X-API-KEY*
API Key
Body
mobile_number*
String
Almadar mobile number 091XXXXXXX
birth_year*
String
4 digits XXXX
amount*
String
Transaction amount in Libyan dinars.
Formatting is allowed with a maximum of two decimal places: XXX, XX.X, XX.XX
Responses
200: OK
Successful response
400: Bad Request
Error response
CURL
PHP
curl --location --request POST 'https://api.plutus.ly/api/v1/transaction/sadadapi/verify' \
--header 'X-API-KEY: [API_KEY]' \
--header 'Authorization: Bearer [ACCESS_TOEKN]' \
--form 'mobile_number="[MOBILE_NUMBER]"' \
--form 'amount="[AMONUT]"' \
--form 'birth_year="[BIRTH_YEAR]"'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.plutus.ly/api/v1/transaction/sadadapi/verify',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array(
'mobile_number' => '[MOBILE_NUMBER]',
'amount' => '[AMONUT]',
'birth_year' => '[BIRTH_YEAR]'
),
CURLOPT_HTTPHEADER => array(
'X-API-KEY: [API_KEY]',
'Authorization: Bearer [ACCESS_TOEKN]'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Confirm

Pay the unpaid transaction
post
https://api.plutus.ly/api/v1
/transaction/sadadapi/confirm
Confirm
Confirm to pay the transaction
Parameters
Header
Authorization*
String
Bearer: [Access token]
X-API-KEY*
String
API Key
Body
process_id*
String
Process ID is returned in the verify step
code*
String
OTP code is sent to customer's phone number
amount*
String
Transaction amount in Libyan dinars.
Formatting is allowed with a maximum of two decimal places: XXX, XX.X, XX.XX
invoice_no*
String
Invoice number associated with transaction
customer_ip
String
Customer IP address
Responses
200: OK
400: Bad Request
CURL
PHP
curl --location --request POST 'https://api.plutus.ly/api/v1/transaction/sadadapi/confirm'
--header 'X-API-KEY: API_KEY]'
--header 'Authorization: Bearer [ACCESS_TOEKN]'
--form 'code="[OTP]"'
--form 'amount="[AMONUT]"'
--form 'invoice_no="[INVOICE_NO]"'
--form 'process_id="[PROCESS_ID]"'
--form 'customer_ip="[CUSTOMER_IP]"'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.plutus.ly/api/v1/transaction/sadadapi/confirm',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array(
'code' => '[OTP]',
'amount' => '[AMONUT]',
'invoice_no' => '[INVOICE_NO]',
'process_id' => '[PROCESS_ID]',
'customer_ip' => '[CUSTOMER_IP]'
),
CURLOPT_HTTPHEADER => array(
'X-API-KEY: [API_KEY]',
'Authorization: Bearer [ACCESS_TOEKN]'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;