# 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.