API Documentation

API Endpoints & Authentication

All requests to the DroppCash API are sent via the HTTP POST method to one of our API endpoint URLs.

All calls to the DroppCash API require user authentication and user access key. Sign up for an account to quickly get started.
Sandbox payment can also be initiated when user set the service mode as test in user dashboard. It will be live when the mode is set as active mode.

API Access Key

Register as a user in our system. In your user dashboard you will find the option for API access key.

Example access key : 51a4bd18-5bc1-4eaa-97b0-c09323398883

Payment Transaction Initiate

The following example code enables you to initiate a payment,depending on how you structure it. The perameter details are also below.

Param Name Param Type Description
custom string Identification of your end Required
amount decimal The amount you want to transact Required
details string Purchase details Required
web_hook string Instant payment notification url Required
cancel_url string Payment cancel return url Required
success_url string Payment success return url Required
customer_email string Customer email address Required
access_key string Send access_key as bearer token with header Required
                                
    
            <?php
                $parameters = [
                    'custom' => 'DFU80XZIKS',
                    'currency_code' => 'USD',
                    'amount' => 280.00,
                    'details' => 'Digital Product',
                    'web_hook' => 'http://yoursite.com/web_hook.php',
                    'cancel_url' => 'http://yoursite.com/cancel_url.php',
                    'success_url' => 'http://yoursite.com/success_url.php',
                    'customer_email' => 'customer@mail.com',
                ];
                
                $url = 'https://droppcash.app/payment/process';
                
                $headers = [
                    "Accept: application/json",
                    "Authorization: Bearer access_key",
                ];
                
                $ch = curl_init();
                curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
                curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
                curl_setopt($ch, CURLOPT_URL, $url);
                curl_setopt($ch, CURLOPT_POSTFIELDS,  http_build_query($parameters));
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                $response = curl_exec($ch);
                curl_close($ch);
            ?>
    
                            

Example Response after initiating payment

                                
        
        
            //Success Response.
            {
                "code": 200,
                "status": "ok",
                "payment_id": "AIYmQIOAz0GlmsjfhgiOeu304",
                "message": "Your payment has been processed. Please follow the URL to complete the payment.",
                "url":"https://droppcash.app/process-checkout?payment_id=AIYmQIOAz0GlmsjfhgiOeu304"
            }

            //Error Response.
            {
                "code": 401,
                "status": "error",
                "message": "Invalid API credentials."
            }
            
            
        
                            

Response after successful payment

                                
        
        
            //Success Response.
            {
                "code": 200,
                "status": "ok",
                "payment_id": "AIYmQIOAz0GlmsjfhgiOeu304",
                "transaction": "AIYmQIOAz0G",
                "amount": 100.00,
                "charge": 5.00,
                "currency": "USD",
                "custom": "BVSUZ545XCS",
                "date"  : "22-05-2022"
            }

            
        
                            

Verify Payment

You can verify the payment whether it is valid or not. After successful payment transaction you will have the response where you find the Payment ID. With this payment id and your access key you need to make a request to our server to verify the payment. Example code is below.

Payment verify end point : https://droppcash.app/payment/check-validity

                                
    
            <?php
                $parameters = [
                    'payment_id' => 'AIYmQIOAz0GlmsjfhgiOeu304',
                ]
                
                $url = 'https://droppcash.app/payment/check-validity';
                
                $headers = [
                    "Accept: application/json",
                    "Authorization: Bearer access_key",
                ];
                
                $ch = curl_init();
                curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
                curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
                curl_setopt($ch, CURLOPT_URL, $url);
                curl_setopt($ch, CURLOPT_POSTFIELDS,  $parameters);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                $response = curl_exec($ch);
                curl_close($ch);
            ?>
    
                            

Validity Response

                                
        
        
            //Success Response.
            {
                "code": 200,
                "status": "ok",
                "message": "Transaction is valid",
                
            }

            //Error Response.
            {
                "code": 401,
                "status": "error",
                "message": "Invalid API credentials."
            }

            //or
            {
                "code": 404,
                "status": "error",
                "message": "Transaction not found"
            }

            
        
                            

Escrow Payments

Escrow Payment is a good option for marketplace websites.The following code enables you to initiate an Escrow Payment,depending on how you structure it. The perameter details are also below.

Param Name Param Type Description
currency_code string/currency Currency Used For Escrow Payment Required
amount decimal The amount you want to escrow Required
description string Description For Escrow Required
pay_charge Boolean True If You Want To Pay the Charge Yourself, False If Not Required
receiver_email string/email Receiver Email For Escrow Required
                                
    
            <?php
            $parameters = [
                'currency_code' => 'NGN', // currency code
                'amount' => 20, // amount
                'description' => 'Digital Product', // description
                'pay_charge' => true, // true, false
                'receiver_email' => 'reciever_email'
            ];
            
            $url = 'https://droppcash.app/payment/make-escrow';
            
            $headers = [
                "Accept: application/json",
                "Authorization: Bearer api_key",
            ];
            
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
            curl_setopt($ch, CURLOPT_URL, $url);
            curl_setopt($ch, CURLOPT_POSTFIELDS,  http_build_query($parameters));
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            $response = curl_exec($ch);
            curl_close($ch);

            var_dump($response);
            ?>
    
                            

Example Response after initiating Escrow

                                
        
        
            //Success Response.
          {
            "code":200,
            "status":"OK",
            "message":"An Escrow Has Been Made to [email]"
        }
          
            //Error Response.
            {
                "code": 401,
                "status": "error",
                "message": "Invalid API credentials."
            }
            
            
        
                            

Invoice Payments

Invoice Payments is a good option for an Ecommerce website. With DroppCash you will get everything setup with a good clean minimial checkout page, you just only need to tell api which items are in cart, thats it!. User will get an email after an invoice is intiated

Param Name Param Type Description
invoice_to string Name Of The Person To Which Invoice is Being Intiated Required
currency_code string/currency The Currency In Which Invoice will be Paid (E.g NGN) Required
amount decimal Amount Per Each Item, Should Be In Array Respective To Item Required
address String/Address Address Of The User who is doing checkout Not Required
item array Items For Checkout Required
email string/email User Email Required
invoice_status string publish for Publishing The Invoice, cancel for Cancelling, by default its draft Not Required
allow_escrow boolean For Allowing Escrow Payments Not Required
pay_charge boolean true/false if you want the pay charge given by sender Not Required
success_url url where to redirect after successful payment Not Required
cancel_url boolean where to go after payment is cancelled Not Required
                                
    
            <?php
            $parameters = [
                'invoice_to' => 'Test User Name',
                'currency_code' => 'NGN',
                'amount' => [10,20,30],
                'address' => 'Nigeria',
                'item' => ['baby doll','good dooll','thats'],
                'email' => 'email_here',
                'allow_escrow' => true, //false for not allowing escrow Payments
                'pay_charge' => true, // if you want the charge to be paid by sender
                'invoice_status' => 'publish', //publish,cancel, default: unpublished
                'success_url' => 'yoursite.com/success',
                'cancel_url' => 'yoursite.com/cancel'
                ];
            
            $url = 'https://droppcash.app/payment/create-invoice';
            
            $headers = [
                "Accept: application/json",
                "Authorization: Bearer api_key",
            ];
            
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
            curl_setopt($ch, CURLOPT_URL, $url);
            curl_setopt($ch, CURLOPT_POSTFIELDS,  http_build_query($parameters));
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            $response = curl_exec($ch);
            curl_close($ch);

            $url = json_decode($response)->url;

            header("location: $url");
            ?>
    
                            

Example of Response after initiating Escrow

                                
        
        
            //Success Response.
            {
                "code":200,
                "status":"OK",
                "message":"Invoice Has Been Made",
                "url":"http://https://droppcash.app/view-invoice/eyJpdiI6InhGd1JOVitrYVpDT0kzV1hEc1pxb2c9PSIsInZhbHVlIjoiVTh4elo0dDcrNTMvWHpsNnVwekdLam42WjV0SGt0M3BWNWhXTnlDbzNvTT0iLCJtYWMiOiIxZmI0NDc3MDI2NjAxMWY0M2Y3YjUwZjRkYThiYjlkZjBkNDI3MTIxY2NlYjNhMmU1N2E2Zjc2MmZlYTJkZTRmIiwidGFnIjoiIn0="
            }
          
            //Error Response.
            {
                "code": 401,
                "status": "error",
                "message": "Invalid API credentials."
            }
            
            
        
                            

Supported Currencies

Following currencies are currently supported in our system. It may update furthur.

Currency Name Currency Symbol Currency Code
US Dollar $ USD
European Euro EUR
British Pound £ GBP
Bangladeshi Taka BDT
Bitcoin BTC BTC
Indian Rupee INR
Japanese Yen ¥ JPY
Nigerian naira N NGN
Chinese Yuan CN¥ CNY
South African Rand R ZAR
Kenyan Shilling Ksh KES
Emirati Dirham د.إ AED
Ghanaian Cedi GH₵ GHS
Canadian Dollar Can$ CAD
Egyptian Pound EGP
Rwandan franc R₣ RWF
Singapore Dollar S$ SGD
Ugandan Shilling USh UGX
Turkish Lira TRY
Australian Dollar A$ AUD
Malaysian Ringgit RM MYR
Romanian leu lei RON
New Zealand Dollar NZD NZD
Hungarian forint Ft HUF
Mexican Peso Mex$ MXN
Hong Kong Dollar HK$ HKD
Brazilian Real R$ BRL
Swiss Franc CHf CHF
Bulgarian Lev Лв. BGN
Czech Koruna CZK
Danish Krone Kr. DKK
Norwegian Krone kr NOK
Thai Baht ฿ THB
Ukrainian hryvnia UAH
Polish Zloty PLN
Swedish Krona skr SEK
Dogecoin Ɖ DOGE
Litecoin Ł LTC
Kucoin Token KCS KCS
Solana SOL SOL
Binance Coin BNB BNB
USDT USDT
Ethereum ETH ETH