Antes de iniciar la integración, asegúrate de preparar los datos de tu transacción:
{
"amount": 2415,
"amountWithoutTax": 0,
"amountWithTax": 2100,
"tax": 315,
"service": 0,
"tip": 0,
"currency": "USD",
"clientTransactionId": "BR260307-1408-4642",
"reference": "Prueba Boton de Pago en https:\/\/payphone.website",
"storeId": "6af15523-2f35-4fae-b935-846167fd9c90",
"responseUrl": "https:\/\/payphone.website\/api-payphone\/API-CONFIRMACION\/Confirmacion.php",
"cancellationUrl": "https:\/\/payphone.website\/api-payphone\/API-CONFIRMACION\/Confirmacion.php",
"order": {
"billTo": {
"address1": "UNSC Infinity",
"address2": "Espacio",
"country": "EC",
"state": "Manabí",
"locality": "Manta",
"firstName": "Master",
"lastName": "Chief",
"phoneNumber": "+593981234567",
"email": "mchief@halo.com",
"postalCode": "EC200101",
"customerId": 11,
"ipAddress": "127.0.0.1"
},
"lineItems": [
{
"productName": "God of War Ragnarök",
"unitPrice": 500,
"quantity": 2,
"totalAmount": 1150,
"taxAmount": 150,
"productSKU": "3342.0004",
"productDescription": "Videojuego de Playstation 5"
},
{
"productName": "Xbox Series X",
"unitPrice": 1100,
"quantity": 1,
"totalAmount": 1265,
"taxAmount": 165,
"productSKU": "4342.0084",
"productDescription": "Consola de Videojuegos"
}
]
},
"documentId": null,
"phoneNumber": null,
"email": null,
"optionalParameter": null,
"lat": null,
"lng": null,
"lang": "es",
"transferTo": null
} {
"message": "Ya existe una transacción con el ClientTransactionId especificado",
"errorCode": 23
}Algo salió mal al enviar la solicitud POST al API de Payphone.
Verifica los datos enviados, el token de autorización o tu conexión.
Consulta la documentación oficial para conocer todos los detalles, parámetros disponibles, estructuras de respuesta y buenas prácticas: