Entrar

Confirmar pedido por token

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

Confirma una transacción pendiente usando el confirmToken devuelto por Acumulación por pedido. Aplica los beneficios de forma definitiva y registra la venta.

Los campos monetarios (amountToRedeem, value del pago) se envían como enteros en centavos — véase Valores monetarios.

Try-it values populated from environment ACME (Demo)


Autenticación

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.

Encabezados

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 de ruta

Name Type Description
confirmToken * string Token devuelto por Acumulación por pedido. Identifica la predicción pendiente a confirmar.

Cuerpo de la petición

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

Respuestas

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