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:
Name | Type | Description |
---|---|---|
referenciaPago | String | Internal identifier from the merchant associated with the transaction. |
transaccionId | Number | Transaction identifier in Luka |
codigoAutorizacion | String | Identifier of the transaction returned by the merchant used to apply the payment |
Response
Field name | Description | Type |
---|---|---|
Canal | Indicates the channel being used to apply the payment in Lukapay | Number |
CargosAdicionales | Object containing additional charges | Object |
Cuotas | Object containing information about installments | Object |
Descripción | Contains the application's response to the payment, such as the transaction status and any additional information | String |
Exitoso | Indicates if the transaction was successful. It is used to validate the response | Boolean |
FechaOperacion | Date the transaction occurred | String |
InfoProceso | Object containing more detailed information about the transaction status | Object |
InfoTarjeta | Object containing information about the credit card used to make the payment. Only applies to card payments | Object |
InfoUsuarioPagador | Object that returns basic information about the user making the payment | Object |
MedioDePago | Indicates the payment method used | String |
MerchantId | Reference for the transaction of the merchant used to apply the payment | String |
Moneda | Currency code used to make the payment | String |
Monto | Indicates the amount of the payment made | Number |
MontoOriginal | Object with information about the original amount. It is used when a currency conversion must be applied | Object |
MontoUsd | Value of the amount in U.S. dollars. It is used when MontoOriginal is specified | Number |
TarjetaHabiente | Object containing information about the payer (if specified) | Object |
TransaccionId | Reference for the transaction in Lukapay | Number |
TransaccionMerchantId | Reference for the transaction of the merchant used to apply the payment | Number |
TrazaId | Internal merchant identifier. If not provided by the merchant, a random code is generated | String |
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
Name | Type | Description | Required |
---|---|---|---|
IdTx | Number | Identifier of the transaction. This value is obtained from the TransaccionId field returned by the transaction query. | Yes |
IdEstatus | Number | Identifier of the payment status. Possible values: 6 = Approved, 7 = Rejected | Yes |
Observaciones | String | Allows adding a comment related to the payment. | No |
Terminal | String | Information about the agency or counter where the payment is received. | No |
CodigoAutorizacion | String | Authorization code of the transaction. | No |
Response
Name | Type | Description |
---|---|---|
Monto | Decimal | Amount of the transaction. |
Id | Integer | Identifier of the transaction. This value is obtained from the TransaccionId field returned by the transaction query. |
IdTraza | String | Value identifying the transaction in the client's system. |
CodigoAutorizacion | String | Reference of the transaction returned by the merchant used to apply the payment. |
Estatus | Object | Identifier of the payment status. Possible values: 6 = Approved, 7 = Rejected |
FechaCreacion | String | Date 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"
}