Entrar

Confirmar pedido por token

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

Confirma uma transação pendente usando o confirmToken retornado por Acúmulo por pedido. Aplica os benefícios definitivamente e registra a venda.

Campos monetários (amountToRedeem, value do pagamento) são enviados como inteiros em centavos — veja Valores monetários.

Try-it values populated from environment ACME (Demo)


Autenticação

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.

Cabeçalhos

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.

Parâmetros do caminho

Name Type Description
confirmToken * string Token retornado por Acúmulo por pedido. Identifica a predição pendente a ser confirmada.

Corpo da requisição

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
        }
    ]
}

Respostas

{
    "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