Testing Paidy

Paidy does not use a separate test environment. Merchants can test the checkout flow and any new features released with a version of the API using their test keys.

Each new merchant account is given 4 keys: a secret and public key for the production environment and a secret and public key for testing. The test keys work in the same way as your live keys. However, when you authenticate with the test keys, we will not charge “the buyer” for any of the payments. To see your keys, log in to the Merchant Dashboard.


  Testing Paidy Checkout

Before you can test the API, you must first create a test payment using Paidy Checkout and then use this test payment to test the API.

Test data

When testing the checkout flow, you test for successful or unsuccessful test scenarios by changing the values of the buyer email and buyer mobile number. You can set the other buyer data to any values you want, but these attributes must be set as follows:

  • For successful test cases: use successful.payment@paidy.com and 08000000001.
  • For unsuccessful test cases: use rejected.payment@paidy.com and 08000000001.

Creating a test payment

  • Configure Paidy Checkout, making sure to use your test public key.
  • From your web store, use Paidy Checkout to purchase some goods. When prompted for the email address and mobile phone number, use the correct data for your test scenario.
  • When prompted for the authorization code, enter 8888.
  • Paidy Checkout will guide you through the remainder of the checkout process. When complete, the result of the authorization will be displayed immediately. You can also log in to the Merchant Dashboard to see the test payment.

  Testing the Paidy API

You can use the API to capture, refund, retrieve, update, or close a test payment. The status of the payment will determine what kind of actions are valid.

  • A payment that has been successfully authorized (via Paidy Checkout) will have a status of AUTHORIZED. You can capture, retrieve, update, or close this payment.
  • A payment that has been successfully captured or successfully closed (canceled) will have a status of CLOSED. You can only update, retrieve, or refund this payment.
  • If a payment was not successfully authorized, it will have a status of REJECTED and you cannot perform any API requests on it.

Before sending a request:

  • Make sure you are using the test secret key in the request header.
  • Make sure Paidy-Version field is set to the correct API version.
  • Make sure to use the test payment ID in the endpoint URI. (Log in to the Merchant Dashboard to see the payment ID for your test payment and verify the status of the payment.)

For each API request, Paidy returns a response containing an HTTP response code that indicates the result of the request.