Skip to main content
Skip table of contents

Consulta de PayIn Pago con Tarjeta eCommerce

Este servicio tiene como función recibir un Numero de Operación como parámetro get en la URL para identificar una transacción y devolver los datos asociados.

Ambiente

EndPoint

Método

Desarrollo

https://api.dev.alignet.io/charges

GET

Producción

https://api.alignet.io/charges

GET

 El Numero de Operación se recibe como parámetro en la URL:

Request Headers

Cabecera

Valor

Requerido

Authorization

Bearer <Access_Token>

SI

CODE
"Authorization":"Bearer eyJhbGciOiJSUzI1NsInR5cCI6IkpXVCIsImt………",

Response

CODE
{
    "success": true,
    "result": "notified",
    "error_code": "00",
    "error_message": "Usuario fue notificado",
    "operation_number": "955842029",
    "purchase_amount": "10000",
    "purchase_currency_code": "PEN",
    "purchase_ip_address": "191.1.1.1",
    "transaction": {
        "meta": {
            "commerce_id": "10",
            "internal_operation_number": "955842029",
            "additional_fields": [],
            "metrics": {
                "aggregate": {
                    "start": "1614875661264",
                    "end": "1614875672681",
                    "duration": {
                        "milliseconds": "1000",
                        "seconds": "1"
                    }
                }
            },
            "status": {
                "code": "00",
                "message_ilgn": [
                    {
                        "locale": "es_PE",
                        "value": "Se encontró la información solicitada"
                    }
                ]
            }
        },
        "lifecycle": [
            {
                "step": "Payment Intent",
                "state": "Registered",
                "start": "1614875666264",
                "end": "1614875672681",
                "duration": {
                    "milliseconds": "500",
                    "seconds": "0.5"
                },
                "meta": {
                    "status": {
                        "code": "00",
                        "message_ilgn": [
                            {
                                "locale": "es_PE",
                                "value": "Se registró la transaccion correctamente"
                            }
                        ]
                    }
                }
            },
            {
                "step": "Business Rules",
                "state": "Registered",
                "start": "1614875672681",
                "end": "1614875673681",
                "duration": {
                    "milliseconds": "1000",
                    "seconds": "1"
                },
                "meta": {
                    "status": {
                        "code": "00",
                        "message_ilgn": [
                            {
                                "locale": "es_PE",
                                "value": "La transaccion paso las reglas de negocio satisfactoriamente"
                            }
                        ]
                    }
                }
            },
            {
                "step": "Authentication",
                "state": "Registered",
                "start": "1614875674681",
                "end": "  1614875675681",
                "duration": {
                    "milliseconds": "1000",
                    "seconds": "1"
                },
                "meta": {
                    "status": {
                        "code": "00",
                        "message_ilgn": [
                            {
                                "locale": "es_PE",
                                "value": "Se paso la autenticacion satisfactoriamente"
                            }
                        ]
                    }
                }
            },
            {
                "step": "Authorization",
                "state": "Registered",
                "start": "1614875676681",
                "end": "  1614875677181",
                "duration": {
                    "milliseconds": "500",
                    "seconds": "0.5"
                },
                "meta": {
                    "status": {
                        "code": "00",
                        "message_ilgn": [
                            {
                                "locale": "es_PE",
                                "value": "La transaccion se envio correctamente a la procesadora"
                            }
                        ]
                    }
                }
            },
            {
                "step": "Capture",
                "state": "Authorized",
                "start": "1614875677181",
                "end": "  1614875679181",
                "duration": {
                    "milliseconds": "2000",
                    "seconds": "2"
                },
                "meta": {
                    "status": {
                        "code": "00",
                        "message_ilgn": [
                            {
                                "locale": "es_PE",
                                "value": "{$response de procesadora}"
                            }
                        ]
                    }
                }
            },
            {
                "step": "Notification",
                "state": "Authorized",
                "start": "1614875679181",
                "end": "  1614875680181",
                "duration": {
                    "milliseconds": "1000",
                    "seconds": "2"
                },
                "meta": {
                    "status": {
                        "code": "00",
                        "message_ilgn": [
                            {
                                "locale": "es_PE",
                                "value": "Se envio la notificacion al comercio satisfactoriamente"
                            }
                        ]
                    }
                }
            }
        ]
    }
}

La respuesta expone el ciclo de vida completo y ordenado de la transacción. Para obtener rápidamente el último estado, itera sobre la matriz del ciclo de vida y extrae el último valor.

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.