Skip to content

Sandbox

Info

Testing on a production server creates additional load. Accounts associated with malfunctioning applications are blocked.

About sandbox

Sandboxenvironment for safe testing of the implemented Merchant API. Sandbox tests will help verify the interaction of the implemented API with Payme Business. Sandbox testing allows you to get a detailed description of the errors.

Info

The merchant developer initiates testing and runs tests. Testing is carried out using requests and responses. Requests are sent by the Payme Business server, responses are sent by the merchant server.

Preparing for testing

Add a web cash register in the merchant's account. After creating a web cash register, Payme Business will issue 2 keys:

  • key for cabinet — key;
  • key for sandbox — TEST_KEY.

Go to sandbox. In the sandbox, enter Merchant ID (web cash register ID) and TEST_KEY.

Info

Merchant ID is stored in the web cash register developer settings.

Info

It is important that the Endpoint URL is specified in the cash register settings - the billing web address. Payme Business will send inquiries to this address.

When creating transactions in the sandbox, it is important to correctly specify the account type:

  • Money can be transferred to your savings account an unlimited number of times. An example of a savings account is a mobile operator account;
  • To a one-time account, money can be received only 1 time. An example of a one-time invoice is an order in an online store.

Info

Testing of payment initialization is recommended to be carried out only after successful completion of testing in the sandbox: first test the payment initialization in the sandbox, then in production.

Sandbox url: https://test.paycom.uz

URL for sending a check to the sandbox: https://test.paycom.uz

URL for sending a check to the production: https://checkout.paycom.uz

Testing

Testing is carried out according to 2 scenarios:

  1. Creating and canceling an unconfirmed transaction
  2. Creating, confirming and canceling a confirmed financial transaction

The first scenario includes a security check, so the first scenario is tested first, then the second.

Info

The Merchant API has already been implemented in the payment plugin, so testing of the payment plugin is carried out according to the same scenarios.

Creating and canceling an unconfirmed transaction

Log in to the store as a customer. Add the item to your cart and pay for your order using Payme. After payment there will be an automatic transition to the “Sandbox” to the page for creating a financial transaction.

Check authorization with incorrect credentials

In the “Invalid Data” section, click on the “Invalid Authorization” link and run the test.

Info

For requests to implemented methods, the implemented Merchant API returns responses with error -32504: “Insufficient privileges to execute the method.”

Check payment with incorrect or invalid amount

In the “Incorrect Data” section, click on the “Invalid Amount” link.

In the test parameters, specify a valid order number, an incorrect amount and run the test.

Info

For requests to the implemented methods CheckPerformTransaction and CreateTransaction, implemented by the Merchant API returns responses with error -31001: "Invalid amount."

Check payment of a non-existent invoice

In the “Invalid data” section, click on the “Nonexistent account” link.

In the test parameters, specify the actual order amount, an incorrect order number and run the test.

Info

For requests to the implemented methods CheckPerformTransaction and CreateTransaction, implemented by the Merchant API returns responses with errors -31050 - -31099: “Invalid order code.”

Check the possibility of creating a financial transaction

Info

Checking the possibility of creating a financial transaction is ensured by the implemented method CheckPerformTransaction.

In the “Payment Requests” section, click on the “CheckPerformTransaction” link.

Make sure that the test parameters include the value of the Account parameter and the payment amount in tiyins and run the test.

When a request is made to the implemented CheckPerformTransaction method, the implemented Merchant API returns a response without errors.

Create a transaction

Info

The creation of a transaction is ensured by the implemented method CreateTransaction.

In the Payment Requests section, click on the “CreateTransaction” link.

Make sure that in the test launch parameters the account type is “One-time” and the account status is “Awaiting payment” and run the test.

Info

Requests for the CreateTransaction, PerformTransaction, and CancelTransaction methods are sent twice. If the first request fails, the second one will definitely pass. When repeated calls to the CreateTransaction, PerformTransaction, CancelTransaction methods, the response must match the response from the first request.

The implemented Merchant API returns:

  • to a request to the implemented method CheckPerformTransaction - response with the result “allow”: true;
  • to a request to the implemented method CreateTransaction - response without errors;
  • for a repeated request to the implemented method CreateTransaction - response without errors;
  • to a request to the implemented method CheckTransaction - response without errors;
  • to a request to the implemented method CreateTransaction with a new transaction and the account status “Waiting for payment” - a response with error -31008: “The operation cannot be completed.”

Cancel an unconfirmed transaction

Info

Transaction cancellation is ensured by the implemented CancelTransaction method.

Cancellation of a transaction is ensured by the implemented one. In the “Payment requests” section, click on the “CancelTransaction” link. method CancelTransaction.

Make sure that the test launch parameters include the transaction id and transaction status “1” (transaction created) and run the test.

Info

For requests to the implemented methods CancelTransaction and CheckTransaction, implemented by the Merchant API returns responses without errors.

Creating, confirming and canceling a confirmed financial transaction

Log in to the store as a customer. Add the item to your cart and pay for your order using Payme. After payment there will be an automatic transition to the “Sandbox” to the page for creating a financial transaction.

Check the possibility of creating a financial transaction

Info

Checking the possibility of creating a financial transaction is ensured by the implemented method CheckPerformTransaction.

In the “Payment Requests” section, click on the “CheckPerformTransaction” link.

Make sure that the test parameters include the value of the Account parameter and the payment amount in tiyins and run the test.

When a request is made to the implemented CheckPerformTransaction method, the implemented Merchant API returns a response without errors.

Create a transaction

Info

The creation of a transaction is ensured by the implemented method CreateTransaction.

In the Payment Requests section, click on the “CreateTransaction” link.

Make sure that in the test launch parameters the account type is “One-time” and the account status is “Awaiting payment” and run the test.

The implemented Merchant API returns:

  • to a request to the implemented method CheckPerformTransaction - response with the result “allow”: true;
  • to a request to the implemented method CreateTransaction - response without errors;
  • for a repeated request to the implemented method CreateTransaction - response without errors;
  • to a request to the implemented method CheckTransaction - response without errors;
  • to a request to the implemented method CreateTransaction with a new transaction and the account status “Waiting for payment” - a response with error -31008: “The operation cannot be completed.”

Confirm the transaction

Info

Transaction confirmation is provided by the implemented PerformTransaction method.

In the “Payment Requests” section, click on the “PerformTransaction” link.

Make sure that the test launch parameters include the transaction id and transaction status “1” (created) and run the test.

The implemented Merchant API returns a response without errors:

Cancel a confirmed transaction

Info

Transaction cancellation is ensured by the implemented CancelTransaction method.

In the Payment Requests section, click on the “CancelTransaction” link.

Make sure that the test launch parameters include the transaction id and transaction status “1” (transaction created) and run the test.

Info

For requests to the implemented methods CancelTransaction and CheckTransaction, implemented by the Merchant API returns responses without errors.