In order to test our SoftPay API, you’ll need to generate:
 A test invoice : it will provide to you an invoice token; Your API Test Keys : will be used to fill your headers; At least one fictitious customer account or test account : we shall need its email address your phone number;
    https://app.paydunya.com/sandbox-api/v1/checkout-invoice/create
curl -H "Content-Type: application/json" \
-H "PAYDUNYA-MASTER-KEY: wQzk9ZwR-Qq9m-0hD0-zpud-je5coGC3FHKW" \
-H "PAYDUNYA-PRIVATE-KEY: test_private_rMIdJM3PLLhLjyArx9tF3VURAF5" \
-H "PAYDUNYA-TOKEN: IivOiOxGJuWhc5znlIiK" \
-X POST -d '{"invoice": {"total_amount": 5000, "description": "Chaussure VANS dernier modèle"},"store": {"name": "Magasin le Choco"}}' \
"https://app.paydunya.com/sandbox-api/v1/checkout-invoice/create"
{
    "response_code":"00",
    "response_text":"https://app.paydunya.com/sandbox-checkout/invoice/test_6BaZCm7FXS",
    "description":"Checkout Invoice Created",
    "token":"test_6BaZCm7FXS"
}
To receive the complete payment information structure, you can make a request with the received token in the above response.
https://app.paydunya.com/sandbox-api/v1/softpay/checkout/make-payment
{
    "phone_phone": "97403627",
     "customer_email": "[email protected]",
     "password": "Miliey@2121",
     "invoice_token": "test_6BaZCm7FXS"
}
                phone_phone : is a test account phone number.
            
              customer_email : is a test account email address.
            
              password : is the test account password.
            
              invoice_token : is the token you got after generating your test invoice
            
{
    "success": true,
    "message": "Paiement effectué avec succès."
}
In cases the "success" key is set to  "false" , please, make sure