RU

Pay

https://{Environment}.payture.com/api/Pay

The Pay command is used to make a payment using the one-step flow.

Processing the request charges funds from the Customer's card. The charged funds can be refunded to the Customer's card in full or in part using the Refund command.

Request

curl https://sandbox3.payture.com/api/Pay \
  -X POST \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d Key=Merchant \
  -d Amount=12480 \
  -d OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea \
  --data-urlencode "PayInfo=PAN=4111111111100031;EMonth=12;EYear=22;CardHolder=Ivan Ivanov;SecureCode=123;OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea;Amount=12480" \
  --data-urlencode "CustomFields=IP=241.22.197.12;Product=Ticket"
Get link

Parameter names in requests are case-sensitive

ParameterDescriptionFormat
KeyPayment terminal name
Provided with the test/production access credentials
String
Mandatory
OrderIdUnique payment ID in the Merchant's system
Recommended format: GUID/UUID or alphanumeric. Other formats may cause failures in banking services
String [1..50]
Mandatory
AmountPayment amount in kopecks (or another minor unit of the terminal currency)
Digits only, without decimal or other separators
Integer
Mandatory
PayInfoTransaction parameters
URL-encoded string of key-value pairs separated by “;” (semicolon). Keys and values are separated by “=” (equals sign)
String
Mandatory
CustomFieldsAdditional transaction fields
URL-encoded string of key-value pairs separated by “;” (semicolon). Keys and values are separated by “=” (equals sign)
String
Optional
ChequeFiscal receipt data in JSON format, Base64-encodedString
Optional

PayInfo parameter structure

Important! The OrderId and Amount parameters are passed twice in the same request: among the main request parameters and inside the PayInfo parameter.

ParameterDescriptionFormat
PANCard number
Digits without spaces
String [13..19]
Mandatory
EMonthCard expiration month
2 digits
Integer
Mandatory
EYearCard expiration year
Last 2 digits of the year
Integer
Mandatory
OrderIdUnique payment ID in the Merchant's system
Recommended format: GUID/UUID or alphanumeric. Other formats may cause failures in banking services
String [1..50]
Mandatory
AmountPayment amount in kopecks (or another minor unit of the terminal currency)
Digits only, without decimal or other separators
Integer
Mandatory
SecureCodeCVC2/CVV2 code
3 or 4 digits. Whether it is required depends on the payment type and the payment terminal configuration
Integer
Optional
CardHolderCardholder's last name and first name
Latin letters and spaces only
String [1..30]
Optional

Example of the PayInfo parameter (decoded):

PAN=4111111111100031;
EMonth=12;
EYear=22;
CardHolder=Ivan Ivanov;
SecureCode=123;
OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea;
Amount=12480

Examples of possible CustomFields keys

ParameterDescriptionFormat
IPCustomer's IP address
IPv4 or IPv6
String
Optional
DescriptionAdditional payment descriptionString
Optional

Example of the CustomFields parameter (decoded):

IP=241.22.197.12;
Description=MyTestTransaction

Response

XML string with the Pay element

Response examples

<Pay OrderId="5f63838d-fb03-00c6-c890-c67cfc1c54ea" Key="Merchant" Success="True" Amount="12480"/>
ParameterDescriptionFormat
SuccessOperation success flag. Possible values:
True — the operation succeeded
False — the operation failed
3DS — 3‑D Secure authentication is required
String
Mandatory
OrderIdPayment ID in the Merchant's system
Matches the value passed in the request
String [1..50]
Mandatory
KeyPayment terminal name
Matches the value passed in the request
String
Mandatory
AmountPayment amount in kopecks (or another minor unit of the terminal currency)
Returned if “Success=True” or “Success=3DS”. Matches the value passed in the request
Integer
Optional
ACSUrl3-D Secure authentication server (ACS) URL
Returned if “Success=3DS”
String
Optional
PaReq3-D Secure authentication request
Returned if “Success=3DS”
String
Optional
ThreeDSKeyUnique transaction ID (MD)
Returned if “Success=3DS”
String
Optional
ThreeDSVersion3-D Secure protocol version:
1.0 — version 1
2.1 — version 2
Returned if “Success=3DS”
String
Optional
FinalTerminalFinal terminal on which the payment was processed
Returned if the payment was forwarded to another terminal
String
Optional
AddInfoAdditional transaction parameters that can be returned in the payment gateway response by arrangement with Payture support
The format and possible parameters are described here (in Russian)
Object
Optional
ErrCodeError code. See error codes
Returned if “Success=False”
String
Optional