Skip to main content

Cash Payments

Introducción

This document provides the specifications for implementing cash payment notifications through the Luka API. This service consists of two parts: the first is the customer debt query, which allows us to know the amount to be paid, and the second step is to process the payment.

The URL is specified in Environments.

Authentication is done via a token (JWT) returned by the login method using the credentials provided by Lukapay. See documentation.

Consult a Transaction

Allows you to query the information of a payment that is pending confirmation.

You can query the transaction through the payment reference sent by the merchant at the time of registering the payment. If the merchant does not send a reference, you can query the transaction using the transaction number returned by Luka or the authorization code returned by the payment method.

Request

GET {URL}/api/v1/transaccion/pagodiferido

Headers

Content-Type: application/json
Authorization: Bearer <token>

Query Params

The following parameters are sent via the query string of the request:

NameTypeDescription
referenciaPagoStringInternal identifier from the merchant associated with the transaction.
transaccionIdNumberTransaction identifier in Luka
codigoAutorizacionStringIdentifier of the transaction returned by the merchant used to apply the payment

Response

Field nameDescriptionType
CanalIndicates the channel being used to apply the payment in LukapayNumber
CargosAdicionalesObject containing additional chargesObject
CuotasObject containing information about installmentsObject
DescripciónContains the application's response to the payment, such as the transaction status and any additional informationString
ExitosoIndicates if the transaction was successful. It is used to validate the responseBoolean
FechaOperacionDate the transaction occurredString
InfoProcesoObject containing more detailed information about the transaction statusObject
InfoTarjetaObject containing information about the credit card used to make the payment. Only applies to card paymentsObject
InfoUsuarioPagadorObject that returns basic information about the user making the paymentObject
MedioDePagoIndicates the payment method usedString
MerchantIdReference for the transaction of the merchant used to apply the paymentString
MonedaCurrency code used to make the paymentString
MontoIndicates the amount of the payment madeNumber
MontoOriginalObject with information about the original amount. It is used when a currency conversion must be appliedObject
MontoUsdValue of the amount in U.S. dollars. It is used when MontoOriginal is specifiedNumber
TarjetaHabienteObject containing information about the payer (if specified)Object
TransaccionIdReference for the transaction in LukapayNumber
TransaccionMerchantIdReference for the transaction of the merchant used to apply the paymentNumber
TrazaIdInternal merchant identifier. If not provided by the merchant, a random code is generatedString

The attributes of the objects are specified in Transaction Response.

Example Usage

Request

GET {URL}api/v1/transaccion/pagodiferido?referenciaPago=6567704

Response body

{
"Monto": 7.99,
"MontoUsd": 0.00,
"InfoProceso": {
"EstatusProcesamiento": "pending",
"CodigoRespuestaCvv": null
},
"InfoUsuarioPagador": {
"Nombre": "Jhon",
"Apellido": "Doe",
"NumeroIdentidad": null,
"NumeroTelefono": null,
"Email": "example@mail.com"
},
"Moneda": "USD",
"TransaccionId": 96336,
"TransaccionMerchantId": 0,
"Descripcion": "transacción en revisión",
"TrazaId": "e6c28df3ae4f",
"Exitoso": true,
"Canal": "Api",
"MedioDePago": "Efectivo",
"MontoOriginal": null,
"MerchantId": "024PeR42",
"FechaOperacion": "2023-09-29 19:25:11.767791+00:00",
"CargosAdicionales": null,
"Cuotas": null
}

Notify Payment

Allows you to update the status of a transaction after receiving the corresponding payment.

Request

PUT {URL}/api/v1/transaccion/pagodiferido/actualizar

Headers

Content-Type: application/json
Authorization: Bearer <token>

Body

NameTypeDescriptionRequired
IdTxNumberIdentifier of the transaction. This value is obtained from the TransaccionId field returned by the transaction query.Yes
IdEstatusNumberIdentifier of the payment status. Possible values: 6 = Approved, 7 = RejectedYes
ObservacionesStringAllows adding a comment related to the payment.No
TerminalStringInformation about the agency or counter where the payment is received.No
CodigoAutorizacionStringAuthorization code of the transaction.No

Response

NameTypeDescription
MontoDecimalAmount of the transaction.
IdIntegerIdentifier of the transaction. This value is obtained from the TransaccionId field returned by the transaction query.
IdTrazaStringValue identifying the transaction in the client's system.
CodigoAutorizacionStringReference of the transaction returned by the merchant used to apply the payment.
EstatusObjectIdentifier of the payment status. Possible values: 6 = Approved, 7 = Rejected
FechaCreacionStringDate of the transaction.

Example Usage

Request body

{
"Idtx": 123456,
"IdEstatus": 6,
"Observaciones": “”,
“Terminal”: “Agencia CCCT, Taquilla 2”,
“CodigoAutorizacion”: “12345”
}

Response body

{
"Monto": 16.03,
"Id": 8357,
"IdTraza": "1234567890",
"CodigoAutorizacion": "kjfkgds874k",
"Estatus": {
"Id": 6,
"Descripcion": "Tx Exitosa"
},
"FechaCreacion": "2022-02-23T18:27:47.1959116Z"
}