Other features

amount_max_delta

This is a parameter of the Register voucher API. It is included inside of the extra field.

Limits how much the amount field can be changed in order to match the voucher with the payment. For example, if you send amount=100 and amount_max_delta=10, the amount will be allowed to change to anything between 90 and 110.

Affects the automatic matching process and the ability to edit the amount manually in the dashboard.

This parameter is optional. If you don't include it while registering a voucher, the amount will be able to change freely. Set to zero if you want to force an exact match of the voucher amount with the payment amount.

This increases the risk of a wrong match

Imagine you have an order of S/100, but your customer pays S/90. Then you send amount=S/100 and amount_max_delta=S/0. The payment of S/90 won't be matched to the voucher, so there is a bigger risk of matching the paymentof S/90 to some other voucher incorrectly.

Example CURL

curl 'https://apurata.com/apagos/unchecked_payment/register' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer {secret_token}' \
    --data-raw $'{
        "amount": 123.30,
        "order_id": "1001",
        "operation_number": "696",
        "bank_account_id": "BBVA",
        "date": "2020-10-30",
        "webhook": "https://3f5c6c449e2208bbe977709b902b742c.m.pipedream.net",
        "receipt": "https://img.freepik.com/free-vector/realistic-receipt-template_23-2147938550.jpg",
        "detail": "testing INVALID request",
        "customer_dni": "12345678",
        "customer_fullname": "Juan Pérez Aguilar",
        "extra": {
            "amount_max_delta": 1
        }
    }'