Sign in

Confirm Order by confirmToken

POST https://{organization}.myguper.com/api/loyalty/confirmOrder/{confirmToken}

Confirms a pending transaction using the confirmToken returned by Reward by Order. Applies the rewards permanently and records the final sale.

Monetary fields (amountToRedeem, payment value) are sent as integer cents — see Monetary values for the convention.

Try-it values populated from environment ACME (Demo)


Authentication

Token

Send your user token in the x-guper-authorization header. Endpoints that support a Public mode (e.g. acúmulo and resgate previews) accept the same request without the header — Private mode adds customer data and a confirmation token to the response.

Headers

Name Type Description
x-guper-authorization * string User token issued by Guper. Omit only on endpoints that explicitly support a Public mode.
Content-Type * string Always `application/json` for endpoints that accept a JSON body.

Path parameters

Name Type Description
confirmToken * string Token returned by Reward by Order. Identifies the pending prediction to confirm.

Request body

Content-Type: application/json

{
    "id": "order-12345",
    "amountToRedeem": null,                                     // optional, cents
    "waitSettlement": false,                                    // optional
    "client": {                                                 // optional
        "id": "123123",                                         // optional
        "countryCallingCode": 55,                               // optional
        "cellphone": "19954264546",                             // optional
        "email": "tintim@guper.co",                             // optional
        "name": "Tintim"                                        // optional
    },
    "payments": [                                               // optional
        {
            "paymentSystem": "4",                               // optional
            "paymentSystemName": "Mastercard",                  // optional
            "type": "creditCard",                               // optional
            "value": 5447,                                      // optional, cents
            "installments": 3,                                  // optional
            "firstDigits": "550209",                            // optional
            "lastDigits": "2569"                                // optional
        }
    ]
}

Responses

{
    "organization": "acme",
    "orderId": "456",
    "TID": "54eb6281f4e3e13671a5e4c95609f4a69247a5f38d01bef99768399bb6645c49",
    "customerId": 570971,
    "person": 570971,
    "cashback": {
        "redeemedOrder": 12500,
        "accumulatedOrder": 96390
    },
    "confirmedAt": "2025-01-15T16:21:39-03:00",
    "dateTime": "2025-01-15T16:21:44-03:00"
}
Copied to clipboard