# Query parameters
You can download collection for Postman, which already contains all the queries from this section.
| Parameter | Type | Description and possible values | Where is it used (action) |
|---|---|---|---|
| payment | object | An object containing transaction data. | pay,auth,preauth,reversal,payout |
| payment.action | string | Transaction type. Possible values: pay- Payment; auth- Authorization; preauth- Pre-authorization; reversal- Cancel transaction; payout- Payment. | pay,auth,preauth,reversal,payout |
| payment.orderId | string | The order number in your system. Must be unique among successful operations! | pay,auth,preauth,reversal,payout |
| payment.price | string | Payment amount. The separator is a dot. | pay,auth,preauth,reversal,payout |
| payment. orderActualTill | string | Reservation period for goods/services. After this date payment will not be possible. Format:2020-02-20 12:34:56+00:00. If the parameter is not specified, then the standard period of 48 hours applies. | pay,auth,preauth |
| customerInfo | object | An object containing user data. | pay,auth,preauth,reversal,payout,card-binding |
| customerInfo. email | string | User email. Format:user@example.com. | pay,auth,preauth,reversal,payout,card-binding |
| customerInfo. phone | string | User's phone number in RF format:+79001234567. | |
| target | object | An object containing a reference to an existing transaction/card token. | pay,reversal,payout,card-binding |
| target.transaction | string | The ID of the existing transaction that the new one refers to. | pay,reversal |
| target.card | string | Card token (for example, for recurring payments). | pay,payout |
| target. knownCardNumber | string | Number of the card to which the payment is made. | payout,card-binding |
| destination | object | An object containing a link to the token/card number to which the transfer is made as part of a card2card transaction. | card2card |
| destination.card | string | Token of the card to which the transfer is made as part of a card2card transaction. | card2card |
| destination.knownCardNumber | string | Number of the card to which the transfer is made as part of the card2card transaction. | card2card |
| source | object | An object containing a link to the token of the card from which the debit is made as part of a card2card transaction. | card2card |
| source.card | string | The token of the card from which the debit is made as part of a card2card transaction. | card2card |
| allowinteractive | boolean | Indicator of interactive (with the participation of the payer) payment, if payment without the participation of the payer is impossible. Only supported in Mandarin Custom Pay. Always equal when usedtrue: "allowinteractive": true | pay |
| interactive | boolean | Indicator of interactive (with the participation of the payer) payment. Only supported in Mandarin Custom Pay. Always equal when usedtrue: "interactive": true | pay |
| customValues[] | array | An array containing additional information about the payment. Can contain up to 8 pairs of parameters. Each parameter is displayed to the payer in the right block of the payment page. | pay,auth,preauth,reversal,payout |
| customValues[]. name | string | Parameter title (displayed in the right block of the payment page). | pay,auth,preauth,reversal,payout |
| customValues[]. value | string | Parameter value (displayed in the right block of the payment page). | pay,auth,preauth,reversal,payout |
| metadata | object | An object containing a list of your parameters with any names and any values that will be sent in a callback notification. The options are not displayed in the payer user interface. Parameter names cannot contain spaces! | pay,auth,preauth,reversal,payout |
| urls | object | An object containing the url. If missing, then the url from the settings is used. | pay,auth,preauth,reversal,payout,card-binding |
| urls.return | string | Url for redirecting the user after payment. The user is redirected to the specified Url after clicking on the “Return to site” button on the payment page, or automatically after successful payment. By default, automatic redirect is disabled; to connect, contact Technical Support Service (opens new window). | pay,auth,preauth,reversal,payout,card-binding |
| urls.callback | string | Url for sending a callback notification about the transaction status. | pay,auth,preauth,reversal,payout,card-binding |
| fiscalInformation | object | An object containing fiscal information for an online cash register. | pay |
| fiscalInformation. taxationSystem | string | Tax system. Possible values: Common- General (OSN); Simplified- Simplified (STS) “Income”; SimplifiedMinusOutlay- Simplified (STS) “Income minus expenses”; UnifiedImputedIncome- Unified tax on imputed income (UTII); UnifiedAgricultural- Unified Agricultural Tax (USAT); Patent- Patent (PSN). | pay |
| fiscalInformation. items[] | array | An array of lines in the receipt. | pay |
| fiscalInformation. items[].description | string | Product name. | pay |
| fiscalInformation. items[].quantity | string | Quantity or weight. The separator is a dot. | pay |
| fiscalInformation. items[].totalPrice | string | Amount (price * quantity). The separator is a dot. | pay |
| fiscalInformation. items[].vat | string | VAT rate. Possible values: None- Without VAT; Vat0- VAT at the rate of 0%; Vat10- VAT at the rate of 10%; Vat20- VAT at the rate of 20%. | pay |
TESTING
Data for testing is located in the Payment services section.
# Saving additional information
You can provide additional payment information in your request.
ArraycustomValuescan contain up to 8 pairs of parameters, which are displayed to the payer in the right block of the payment page. Objectmetadatamay containjsonwith any field names and their values, but they are not displayed to the payer.
For example, a credit institution accepts monthly payments from its customers.
ArraycustomValuesmay contain the contract number and the amount of commission from the payer. Objectmetadatalet contains the source (source), from which the payer opened the payment page, and the date the notification was sent (sent_at).
Synchronous response and asynchronous callback-notification can contain a wider set of parameters compared to the example.
Request
POST https://secure.mandarinpay.com/api/transactions
{
"payment": {
"action": "pay",
"orderId": "your_unique_order_id",
"price": "1030.00"
},
"customerInfo": {
"email": "user@example.com",
"phone": "+79001234567"
},
"customValues": [
{"name": "Номер договора", "value": "К-12345-789"},
{"name": "Комиссия", "value": "30.00"}
],
"metadata": {
"source": "email",
"sent_at": "2020-01-31"
},
"urls": {
"callback": "http://...",
"return": "http://..."
}
}
Response in case of successful transaction creation (200 OK)
{
"id": "43913ddc000c4d3990fddbd3980c1725",
"userWebLink": "https://secure.mandarinpay.com/Pay?transaction=0eb51e74-e704-4c36-b5cb-8f0227621518",
"jsOperationId": "9874694yr87y73e7ey39ed80"
}
Answer if the transaction is not created (400 Bad request)
{
"error": "Invalid request"
}
DATA PROCESSING
Valuesvaluefrom the arraycustomValuessaved in parameterscs2,cs3,cs4,cs5,cs6,cs7,cs8,cs9in the order in which they were transmitted (if not transmitted, then the values are empty). They are part of the payment transaction and are available from your personal account, in callback-notification, etc.
Blockmetadatamay have a complex structure. It is returned only in the callback-notification in exactly the same form in which it was sent. This information is not saved in the future.