FAQ

1. How to set discount?

In order to set discount to payment it is needed to be added as item in Request on transaction:lines part as negative amount value. Keep in mind that total amount written in transaction > amount must be SUM of all lines. Example of Transaction lines with discount.
                                                        
{
      "lines":[
         {
            "name":"26102020-1344",
            "category":"product",
            "brand":"product",
            "description":"Product card 1344",
            "quantity":1,
            "amount":2000
         },
        {
            "name":"Discount name",
            "category":"debt_collection",
            "brand":"alphacomm",
            "description":"Discount desc",
            "quantity":1,
            "amount": -500
         },
    ]
}
                                                        
There is an optional parameter in the request called webhookURL. When the trigger event occurs, the webhookURL will be called by Protectmaxx2 system.

Triggers:

Payment status change At any point when status of payment is updated, webhook will be sent to URL that was placed in webhookURL on request.

Example:

Payment status moving from pending to success webhook like this will be sent

                                                            
{
    "id":"7bb6f1f3-d280-4b0c-a74f-90471ea69426",
    "type":"payment",
    "status":"success",
}
                                                        

If there are multiple lines that were send in request and in case there is a fee or some non-product related items in the lines of request they should always be placed as last and products should always be first one. If you are using our Fraud check system this is necessary thing to do.

Example of correctly set lines in transaction when fee is included in lines:

                                                             

 "lines": [
            {
                "name": "Example Giftcard - Bronze",
                "category": "Voucher",
                "brand": "Example", 
                "quantity": 1 , 
                "amount": 4746 
            },
            {
                "name": "Payment Fee",
                "category": "Payment Fees",
                "brand": "Example", 
                "quantity": 1,
                "amount": 949
            },
        ]