RU

Charge

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

The Charge command captures funds on the Customer's card that were previously held with the Block command. It is used as part of the two-step payment flow.

Processing the request charges the Customer's card for an amount that does not exceed the held amount (equal to or less than it).

Important! For the capture to succeed, the payment must have the Authorized status at the time the request is processed.

Request parameters

curl https://sandbox3.payture.com/api/Charge \
-X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d Key=Merchant \
-d OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea \
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
AmountAmount to capture, in kopecks. If the parameter is omitted, the full amount is captured
Digits only, without decimal or other separators
Integer
Optional
ChequeFiscal receipt data in JSON format, Base64-encodedString
Optional

Response

XML string with the Charge element

Response examples

<Charge Success="True" OrderId="5f63838d-fb03-00c6-c890-c67cfc1c54ea" Amount="12564"/>
ParameterDescriptionFormat
SuccessOperation success flag. Possible values:
True — the operation succeeded
False — the operation failed
String
Mandatory
OrderIdPayment ID in the Merchant's system
Matches the value passed in the request
String [1..50]
Mandatory
AmountFinal amount charged to the Customer's card
Returned if “Success=True”
Integer
Optional
AmountFinal amount charged to the Customer's card
Returned if “Success=True”
Integer
Optional
ErrCodeError code. See error codes
Returned if “Success=False”
String
Optional