# Testing of payment products

# Test cards

Card data for all payment requests on test (sandbox) environment.

Parameter Value Comment
Term of validity Any time later than the current month in MM/YYY format
CARD Holder name CARD HOLDER
CVV 123
Card number 4929509947106878 To simulate successful transactions without 3DSecure
Card number 4692065455989192 To simulate successful transactions with 3DSecure
Card number 4485913187374384 For simulating unsuccessful transactions without 3DSecure
Card number 4556058936309366 To simulate unsuccessful transactions with 3DSecure
Card number 5192618384533242 To simulate interactive payment with forced card transfer to payout-only

# Collection for Postman

To make the process of testing and getting acquainted with the possibilities of the payment API more convenient, we've prepared collections for Postman. To work with them you need to go through the following steps:

  1. Download and save as a file the mandarin_api (opens new window) collection.

  2. Install and run the [Postman] program (https://www.postman.com/downloads/).

  3. import the collection mandarin_api.postman_collection.json by selecting "File" -> "Import..."

File -> Import...

Then click the "Upload Files" button and select the saved collection file.

Upload Files

  1. Write your authorization information into the collection's variables. To do this, click the "breadcrumbs" next to the collection name, then select the "Edit" menu item.

Edit

In the window that opens, go to the "Variables" tab and type in the values "Merchant id" and "Secret" from your personal account against the merchant_id and ``secret` variables.

If you write the authorization data from the test personal account, the transaction will be executed on the test (sandbox) environment, and if you write it from the live one, it will be executed on the production one.

Editing Collection Variable Values

Finally, you must save the changes with the "Update" button.

  1. You can send inquiries!

We recommend that you run them in order (by pressing the "Send" button). Some requests are prefixed with an exclamation mark:

  • One-stage payment.
  • ! Two-stage payment - Authorization.
  • Tokenization of full card data.

To successfully complete such requests, you need to open a link in the browser which will return in the userWebLink response parameter. Otherwise, some subsequent requests will fail because they refer to their results.

Send request, receive

  1. Open the userWebLink link in your browser.

You will need to enter the card data:

  • For the test environment: use the card number 4692065455989192 for a successful transaction, the rest of the data - any.

  • For a production environment: enter the data of your real card. The card will be charged.

Then click on the "Payment" button.

Filling in the card data on the payment page

If you have requested tokenization, that is the end of the process.

If you have made a payment, a page will open with a successful payment status.

Successful status

  1. Test terminal does not support authorization using card token. Therefore, the request "% Two-step payments - Authorization using card token" will fail. You can discuss the possibility of authorization using a card token with your manager when you set up a battle terminal.

  2. If you are satisfied with the result of your Postman query, you can easily generate code to send the query in any programming language using Postman.

To do this, click on the "Code" button on the right side of the window (as in the figure below). In the window that opens, select the programming language and copy the source code.

Generating code snippet

# Check balance for payments

The query returns a constant 100500 on test (sandbox) environment.

GET https://secure.mandarinpay.com/api/account/channels/{name}/balance

As the value of {name} you must pass the parameter from the table below:

Parameter Parameter description
openbank_direct To inquire about the balance of a current account opened with PJSC Bank FC Otkritie (Otkritie)
psb_direct To inquire about the balance of the current account opened in PSB (PSB)