Skip to Content
docs
CheckoutChange Sum Payment

Change Sum Payment

Create a payment where the customer can modify the payment amount before proceeding. The customer is redirected to a page where they can enter a new amount, after which the payment is processed with the updated value.

POST
***

Request Parameters

NameTypeDescription
public_keyRequired
StringMerchant identifier. Example: `i000000001`
amountRequired
NumberInitial payment amount. The customer can change this value. Example: `100`, `20.50`
currencyRequired
StringPayment currency. Values: `AZN`, `USD`, `EUR`, `RUB`
languageRequired
StringPage display language. Values: `az`, `en`, `ru`
order_idRequired
StringUnique order ID in your application. Max 255 characters.
descriptionOptional
StringPayment description. Max 1000 characters.
success_redirect_urlOptional
StringRedirect URL on successful payment.
error_redirect_urlOptional
StringRedirect URL on failed payment.
other_attrOptional
ArrayAdditional payment parameters.

Request Example

Build the JSON payload, encode and sign it, then send as POST. See Authentication for signing details.

Send Request
Payload
{
"public_key": "i000000001",
"amount": "50.00",
"currency": "AZN",
"language": "az",
"description": "Flexible payment",
"order_id": "1"
}
1# Encode & sign
2DATA=$(echo -n '{"public_key":"i000000001","amount":"50.00","currency":"AZN","language":"az","description":"Flexible payment","order_id":"1"}' | base64)
3SIGNATURE=$(echo -n "$PRIVATE_KEY$DATA$PRIVATE_KEY" | openssl dgst -sha1 -binary | base64)
4
5curl -X POST *** \
6-H "Content-Type: application/x-www-form-urlencoded" \
7-d "data=$DATA&signature=$SIGNATURE"

Response Parameters

NameTypeDescription
statusRequired
StringOperation result: `success` or `error`
redirect_urlOptional
StringURL to redirect the customer to the amount change page. The customer can enter a new amount on this page. Present on success.
messageOptional
StringError description. Present on failure.
trace_idRequired
StringUnique request identifier for debugging. Provide this to Epoint support for issue investigation.
Response
1{
2 "status": "success",
3 "redirect_url": "***",
4 "trace_id": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
5}