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.
Request Parameters
| Name | Type | Description |
|---|---|---|
public_keyRequired | String | Merchant identifier. Example: `i000000001` |
amountRequired | Number | Initial payment amount. The customer can change this value. Example: `100`, `20.50` |
currencyRequired | String | Payment currency. Values: `AZN`, `USD`, `EUR`, `RUB` |
languageRequired | String | Page display language. Values: `az`, `en`, `ru` |
order_idRequired | String | Unique order ID in your application. Max 255 characters. |
descriptionOptional | String | Payment description. Max 1000 characters. |
success_redirect_urlOptional | String | Redirect URL on successful payment. |
error_redirect_urlOptional | String | Redirect URL on failed payment. |
other_attrOptional | Array | Additional 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 & sign2DATA=$(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
| Name | Type | Description |
|---|---|---|
statusRequired | String | Operation result: `success` or `error` |
redirect_urlOptional | String | URL to redirect the customer to the amount change page. The customer can enter a new amount on this page. Present on success. |
messageOptional | String | Error description. Present on failure. |
trace_idRequired | String | Unique 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}