Links

Adfali

Provided by the Bank of Commerce and Development

Send OTP

This request will validate the customer identity, send OTP and register an unpaid invoice.
post
https://api.plutus.ly/api/v1
/transaction/edfali/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
Mobile number 09XXXXXXXX
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
400: Bad Request
CURL
PHP
curl --location --request POST 'https://api.plutus.ly/api/v1/transaction/edfali/verify' \
--header 'X-API-KEY: [API_KEY]' \
--header 'Authorization: Bearer [ACCESS_TOEKN]' \
--form 'mobile_number="[MOBILE_NUMBER]"' \
--form 'amount="[AMONUT]"'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.plutus.ly/api/v1/transaction/edfali/verify',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array(
'mobile_number' => '[MOBILE_NUMBER]',
'amount' => '[AMONUT]',
),
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/edfali/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
Successful response
400: Bad Request
Error response
CURL
PHP
curl --location --request POST 'https://api.plutus.ly/api/v1/transaction/edfali/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/edfali/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;