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
            },
        ]
                                                        
Hosted checkout public endpoints are protected with two values together: the checkout public_id in the URL path and the public token in the t query parameter. Both values are required on every public checkout request. If one of them is missing, invalid, or belongs to another session, the request fails with checkout not found. The same middleware also checks session expiry before the request reaches the controller.
Yes. In the checkout flow, a failed or cancelled payment attempt does not automatically make the session terminal. The session is moved back to active so the shopper can retry with the same session as long as the session has not expired. A checkout session becomes terminal when it reaches success or expired.
Use payment_token_mode on checkout session creation to control token behavior.
  • none - token creation and token payment should not be used
  • optional - shopper may either pay normally or use a saved token
  • required - shopper must use a token, direct payment is rejected
If you already know which token ids should be available for that checkout, pass them in available_token_ids when creating the session. The public checkout tokens endpoint will only return confirmed, non-cancelled tokens that belong to the same merchant.
Paymaxx uses dedicated return endpoints for checkout and for token flows. After return, the system loads the latest transaction, fetches provider status if it is still pending, updates the checkout session state, and then redirects the shopper either back to the merchant return_url or back to hosted checkout with a retry result such as failed, cancelled, or error. When the checkout session is expired, a terminal expiry page is shown and the shopper is redirected back to the merchant return URL.
Checkout uses minor units, same as the payment endpoints. Example: 2000 means 20.00 EUR when currency is EUR. This applies to session amount, order item amount, and all pricing totals.