• Francia
página de estado
demo
asistencia
FAQContacte el soporte tecnico
Buscar
Categoria
Tags
España
Francia
España
Europa (Inglés)
India
Página principal
Casos de uso
Crear un pago
Crear un pago en vencimientos
Crear un pago multitarjeta
Crear un pago por token
Crear un enlace de pago
Crear una suscripción
Gestione sus suscripciones
Gestione sus transacciones
Analizar los diarios
Docs API
Formulario incrustado
API REST
Formulario en redirección
Pago móvil
Intercambio de ficheros
Ejemplo de código
Medios de pago
Plugins
Guías
Back office Experto
Guías funcionales

Obtener los detalles de una solicitud de pago

Casos de uso

El vendedor desea recibir el detalle de una solicitud de pago y su estado.

El Web Service Charge/PaymentOrder/Get permite consultar solamente las solicitudes de pago creadas con el Web Service Charge/CreatePaymentOrder.

Testear

Testee el Web Service Charge/PaymentOrder/Get desde nuestro playground:.

Solicitud

Ejemplo de solicitud

Le paramètre paymentOrderId est généré lors de l'appel au Web Service Charge/CreatePaymentOrder dans la réponse PaymentOrder.

CARACTERÍSTICAS OBLIGATORIO Descripción
paymentOrderId Sí Referencia única de la solicitud de pago generada por la plataforma.
/es/rest/V4.0/api/kb/authentication.html
https://github.com/lyra/rest-php-examples/blob/master/www/minimalEmbeddedForm.php#L9-L44
https://api.lyra.com/api-payment/V4/Charge/PaymentOrder/Get
{
    "paymentOrderId": "d63e7f507a6f4dfa86cb40a833ecfd85"
}
/**
 * I initialize the PHP SDK
 */
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/keys.php';
require_once __DIR__ . '/helpers.php';

/** 
 * Initialize the SDK 
 * see keys.php
 */
$client = new Lyra\Client();

/**
 * I create a formToken
 */
$store = array("amount" => 250, 
"currency" => "EUR", 
"orderId" => uniqid("MyOrderId"),
"customer" => array(
  "email" => "sample@example.com"
));
$response = $client->post("V4/Charge/CreatePayment", $store);

/* I check if there are some errors */
if ($response['status'] != 'SUCCESS') {
    /* an error occurs, I throw an exception */
    display_error($response);
    $error = $response['answer'];
    throw new Exception("error " . $error['errorCode'] . ": " . $error['errorMessage'] );
}

/* everything is fine, I extract the formToken */
$formToken = $response["answer"]["formToken"];

?>
/**
 * I initialize the PHP SDK
 */
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/keys.php';
require_once __DIR__ . '/helpers.php';

/** 
 * Initialize the SDK 
 * see keys.php
 */
$client = new Lyra\Client();

/**
 * I create a formToken
 */
$store = array("amount" => 250, 
"currency" => "EUR", 
"orderId" => uniqid("MyOrderId"),
"customer" => array(
  "email" => "sample@example.com"
));
$response = $client->post("V4/Charge/CreatePayment", $store);

/* I check if there are some errors */
if ($response['status'] != 'SUCCESS') {
    /* an error occurs, I throw an exception */
    display_error($response);
    $error = $response['answer'];
    throw new Exception("error " . $error['errorCode'] . ": " . $error['errorMessage'] );
}

/* everything is fine, I extract the formToken */
$formToken = $response["answer"]["formToken"];

?>

Respuesta

Ejemplo de respuesta
{
    "webService": "Charge/PaymentOrder/Get",    
    "version": "V4",
    "applicationVersion": "5.5.0",
    "status": "SUCCESS",
    "answer": {
        "paymentOrderId": "fd8f6060f824427ba687d0161e46af8f",
        "paymentURL": "https://secure.lyra.com/t/328zq5so",
        "paymentOrderStatus": "RUNNING",
        "creationDate": "2020-03-31T15:06:49+00:00",
        "updateDate": null,
        "amount": 10000,
        "currency": "EUR",
        "locale": "fr_FR",
        "strongAuthentication": "AUTO",
        "orderId": "myOrderId-1234",
        "channelDetails": {
            "channelType": "MAIL",
            "mailDetails": {
                "subject": "Votre ordre de paiement",
                "body": "<b>Message envoyé par DEMO STORE</b> <p>Bonjour,</p> <p>Cet e-mail comporte un ordre de paiement d'un montant de 2000.50 EUR valable jusqu'au 20/04/2020. Pour confirmer le paiement, veuillez cliquer sur le lien suivant : </p> <p>https://secure.lyra.com/t/328zq5so</p> <p>En cas de problème, ou si ce message ne s'affiche pas correctement, merci de contacter support@demostore.com.</p>",
                "template": null,
                "recipient": "sample@example.com",
                "bcc": null,
                "_type": "V4/MailDetails"
            },
            "smsDetails": null,
            "whatsAppDetails": null,
            "_type": "V4/ChannelDetails"
        },
        "paymentReceiptEmail": "sample@example.com",
        "taxRate": null,
        "taxAmount": null,
        "expirationDate": "2020-04-20T18:13:26+00:00",
        "transactionDetails": {
            "cardDetails": {
                "manualValidation": "NO",
                "captureDelay": 0,
                "_type": "V4/CardDetails"
            },
            "_type": "V4/PaymentOrderTransactionDetails"
        },
        "dataCollectionForm": false,
        "merchantComment": null,
        "message": "<b>Message envoyé par DEMO STORE</b> <p>Bonjour,</p> <p>Cet e-mail comporte un ordre de paiement d'un montant de 2000.50 EUR valable jusqu'au 20/04/2020. Pour confirmer le paiement, veuillez cliquer sur le lien suivant : </p> <p>https://secure.lyra.com/t/328zq5so</p> <p>En cas de problème, ou si ce message ne s'affiche pas correctement, merci de contacter support@demostore.com.</p>",
        "_type": "V4/PaymentOrder"
    },
    "ticket": null,
    "serverDate": "2020-04-01T08:20:46+00:00",
    "applicationProvider": "LYRA",
    "metadata": null,
    "_type": "V4/WebService/Response"
}
{
    "webService": "Charge/CreatePaymentOrder",    
    "version": "V4",
    "applicationVersion": "5.5.0",
    "status": "SUCCESS",
    "answer": {
        "paymentOrderId": "fd8f6060f824427ba687d0161e46af8f",
        "paymentURL": "https://secure.lyra.com/t/328zq5so",
        "paymentOrderStatus": "RUNNING",
        "creationDate": "2020-03-31T15:06:49+00:00",
        "updateDate": null,
        "amount": 200050,
        "currency": "EUR",
        "locale": "en_GB",
        "strongAuthentication": "AUTO",
        "orderId": "myOrderId-999999",
        "channelDetails": {
            "channelType": "MAIL",
            "mailDetails": {
                "subject": "Your payment order",
                "body": "<b>Message sent by DEMO STORE</b> <p>Dear customer,</p> <p>This e-mail is a payment order of EUR 2,000.50 valid until 01/04/2020. To confirm, please click on the link below : </p> <p>https://secure.lyra.com/t/w5izg024</p> <p>In case of problems, or if this message is not correctly displayed, please contact support@demostore.com.</p>",
                "template": null,
                "recipient": "sample@example.com",
                "bcc": null,
                "_type": "V4/MailDetails"
            },
            "smsDetails": null,
            "whatsAppDetails": null,
            "_type": "V4/ChannelDetails"
        },
        "paymentReceiptEmail": "sample@example.com",
        "taxRate": null,
        "taxAmount": null,
        "expirationDate": "2020-04-20T18:13:26+00:00",
        "transactionDetails": {
            "cardDetails": {
                "manualValidation": "NO",
                "captureDelay": 0,
                "_type": "V4/CardDetails"
            },
            "_type": "V4/PaymentOrderTransactionDetails"
        },
        "dataCollectionForm": false,
        "merchantComment": null,
        "message": "<b>Message sent by DEMO STORE</b> <p>Dear customer,</p> <p>This e-mail is a payment order of EUR 2,000.50 valid until 01/04/2020. To confirm, please click on the link below : </p> <p>https://secure.lyra.com/t/w5izg024</p> <p>In case of problems, or if this message is not correctly displayed, please contact support@demostore.com.</p>",
        "_type": "V4/PaymentOrder"
    },
    "ticket": null,
    "serverDate": "2020-04-01T08:20:46+00:00",
    "applicationProvider": "LYRA",
    "metadata": null,
    "_type": "V4/WebService/Response"
}


}
{
    "webService": "Charge/PaymentOrder/Get",    
    "version": "V4",
    "applicationVersion": "5.5.0",
    "status": "SUCCESS",
    "answer": {
        "paymentOrderId": "fd8f6060f824427ba687d0161e46af8f",
        "paymentURL": "https://secure.lyra.com/t/328zq5so",
        "paymentOrderStatus": "RUNNING",
        "creationDate": "2020-03-31T15:06:49+00:00",
        "updateDate": null,
        "amount": 200050,
        "currency": "EUR",
        "locale": "es_ES",
        "strongAuthentication": "AUTO",
        "orderId": "myOrderId-999999",
        "channelDetails": {
            "channelType": "MAIL",
            "mailDetails": {
                "subject": "Su solicitud de pago",
                "body": "<b>Mensaje enviado por DEMO STORE</b> <p>Hola,</p> <p>Este correo electrónico contiene una solicitud de pago por un importe de 2.000,50 PEN, válida hasta el 01/04/2020. Para confirmar el pago, haga clic en el enlace siguiente : </p> <p>https://secure.lyra.com/t/w5izg024</p> <p>En caso de problemas, o si este mensaje no se muestra correctamente, por favor contacte support@demostore.com.</p>",
                "template": null,
                "recipient": "sample@example.com",
                "bcc": null,
                "_type": "V4/MailDetails"
            },
            "smsDetails": null,
            "whatsAppDetails": null,
            "_type": "V4/ChannelDetails"
        },
        "paymentReceiptEmail": "sample@example.com",
        "taxRate": null,
        "taxAmount": null,
        "expirationDate": "2020-04-20T18:13:26+00:00",
        "transactionDetails": {
            "cardDetails": {
                "manualValidation": "NO",
                "captureDelay": 0,
                "_type": "V4/CardDetails"
            },
            "_type": "V4/PaymentOrderTransactionDetails"
        },
        "dataCollectionForm": false,
        "merchantComment": null,
        "message": "<b>Mensaje enviado por DEMO STORE</b> <p>Hola,</p> <p>Este correo electrónico contiene una solicitud de pago por un importe de 2.000,50 PEN, válida hasta el 01/04/2020. Para confirmar el pago, haga clic en el enlace siguiente : </p> <p>https://secure.lyra.com/t/w5izg024</p> <p>En caso de problemas, o si este mensaje no se muestra correctamente, por favor contacte support@demostore.com.</p>",
        "_type": "V4/PaymentOrder"
    },
    "ticket": null,
    "serverDate": "2020-04-01T08:20:46+00:00",
    "applicationProvider": "LYRA",
    "metadata": null,
    "_type": "V4/WebService/Response"
}


}
{
    "webService": "Charge/PaymentOrder/Get",    
    "version": "V4",
    "applicationVersion": "5.5.0",
    "status": "SUCCESS",
    "answer": {
        "paymentOrderId": "fd8f6060f824427ba687d0161e46af8f",
        "paymentURL": "https://secure.lyra.com/t/328zq5so",
        "paymentOrderStatus": "RUNNING",
        "creationDate": "2020-03-31T15:06:49+00:00",
        "updateDate": null,
        "amount": 200050,
        "currency": "EUR",
        "locale": "es_ES",
        "strongAuthentication": "AUTO",
        "orderId": "myOrderId-999999",
        "channelDetails": {
            "channelType": "MAIL",
            "mailDetails": {
                "subject": "Su solicitud de pago",
                "body": "<b>Mensaje enviado por DEMO STORE</b> <p>Hola,</p> <p>Este correo electrónico contiene una solicitud de pago por un importe de 2.000,50 COP, válida hasta el 01/04/2020. Para confirmar el pago, haga clic en el enlace siguiente : </p> <p>https://secure.lyra.com/t/w5izg024</p> <p>En caso de problemas, o si este mensaje no se muestra correctamente, por favor contacte support@demostore.com.</p>",
                "template": null,
                "recipient": "sample@example.com",
                "bcc": null,
                "_type": "V4/MailDetails"
            },
            "smsDetails": null,
            "whatsAppDetails": null,
            "_type": "V4/ChannelDetails"
        },
        "paymentReceiptEmail": "sample@example.com",
        "taxRate": null,
        "taxAmount": null,
        "expirationDate": "2020-04-20T18:13:26+00:00",
        "transactionDetails": {
            "cardDetails": {
                "manualValidation": "NO",
                "captureDelay": 0,
                "_type": "V4/CardDetails"
            },
            "_type": "V4/PaymentOrderTransactionDetails"
        },
        "dataCollectionForm": false,
        "merchantComment": null,
        "message": "<b>Mensaje enviado por DEMO STORE</b> <p>Hola,</p> <p>Este correo electrónico contiene una solicitud de pago por un importe de 2.000,50 COP, válida hasta el 01/04/2020. Para confirmar el pago, haga clic en el enlace siguiente : </p> <p>https://secure.lyra.com/t/w5izg024</p> <p>En caso de problemas, o si este mensaje no se muestra correctamente, por favor contacte support@demostore.com.</p>",
        "_type": "V4/PaymentOrder"
    },
    "ticket": null,
    "serverDate": "2020-04-01T08:20:46+00:00",
    "applicationProvider": "LYRA",
    "metadata": null,
    "_type": "V4/WebService/Response"
}


}
{
    "webService": "Charge/PaymentOrder/Get",    
    "version": "V4",
    "applicationVersion": "5.5.0",
    "status": "SUCCESS",
    "answer": {
        "paymentOrderId": "fd8f6060f824427ba687d0161e46af8f",
        "paymentURL": "https://secure.lyra.com/t/328zq5so",
        "paymentOrderStatus": "RUNNING",
        "creationDate": "2020-03-31T15:06:49+00:00",
        "updateDate": null,
        "amount": 200050,
        "currency": "EUR",
        "locale": "es_ES",
        "strongAuthentication": "AUTO",
        "orderId": "myOrderId-999999",
        "channelDetails": {
            "channelType": "MAIL",
            "mailDetails": {
                "subject": "Su solicitud de pago",
                "body": "<b>Mensaje enviado por DEMO STORE</b> <p>Hola,</p> <p>Este correo electrónico contiene una solicitud de pago por un importe de 2.000,50 ARS, válida hasta el 01/04/2020. Para confirmar el pago, haga clic en el enlace siguiente : </p> <p>https://secure.lyra.com/t/w5izg024</p> <p>En caso de problemas, o si este mensaje no se muestra correctamente, por favor contacte support@demostore.com.</p>",
                "template": null,
                "recipient": "sample@example.com",
                "bcc": null,
                "_type": "V4/MailDetails"
            },
            "smsDetails": null,
            "whatsAppDetails": null,
            "_type": "V4/ChannelDetails"
        },
        "paymentReceiptEmail": "sample@example.com",
        "taxRate": null,
        "taxAmount": null,
        "expirationDate": "2020-04-20T18:13:26+00:00",
        "transactionDetails": {
            "cardDetails": {
                "manualValidation": "NO",
                "captureDelay": 0,
                "_type": "V4/CardDetails"
            },
            "_type": "V4/PaymentOrderTransactionDetails"
        },
        "dataCollectionForm": false,
        "merchantComment": null,
        "message": "<b>Mensaje enviado por DEMO STORE</b> <p>Hola,</p> <p>Este correo electrónico contiene una solicitud de pago por un importe de 2.000,50 ARS, válida hasta el 01/04/2020. Para confirmar el pago, haga clic en el enlace siguiente : </p> <p>https://secure.lyra.com/t/w5izg024</p> <p>En caso de problemas, o si este mensaje no se muestra correctamente, por favor contacte support@demostore.com.</p>",
        "_type": "V4/PaymentOrder"
    },
    "ticket": null,
    "serverDate": "2020-04-01T08:20:46+00:00",
    "applicationProvider": "LYRA",
    "metadata": null,
    "_type": "V4/WebService/Response"
}


}
{
    "webService": "Charge/PaymentOrder/Get",    
    "version": "V4",
    "applicationVersion": "5.5.0",
    "status": "SUCCESS",
    "answer": {
        "paymentOrderId": "fd8f6060f824427ba687d0161e46af8f",
        "paymentURL": "https://secure.lyra.com/t/328zq5so",
        "paymentOrderStatus": "RUNNING",
        "creationDate": "2020-03-31T15:06:49+00:00",
        "updateDate": null,
        "amount": 200050,
        "currency": "EUR",
        "locale": "pt_BR",
        "strongAuthentication": "AUTO",
        "orderId": "myOrderId-999999",
        "channelDetails": {
            "channelType": "MAIL",
            "mailDetails": {
                "subject": "Su solicitud de pago",
                "body": "<b>Mensagem enviada por DEMO STORE</b> <p>Caro cliente,</p> <p>Este e-mail contém uma ordem de pagamento no valor de 2.000,50 BRL válida até 01/04/2020. Para confirmar o pagamento, favor clicar sobre o link seguinte : </p> <p>https://secure.lyra.com/t/w5izg024</p> <p>Em caso de problema ou se esta mensagem não é exibida corretamente, favor contactar support@demostore.com.</p>",
                "template": null,
                "recipient": "sample@example.com",
                "bcc": null,
                "_type": "V4/MailDetails"
            },
            "smsDetails": null,
            "whatsAppDetails": null,
            "_type": "V4/ChannelDetails"
        },
        "paymentReceiptEmail": "sample@example.com",
        "taxRate": null,
        "taxAmount": null,
        "expirationDate": "2020-04-20T18:13:26+00:00",
        "transactionDetails": {
            "cardDetails": {
                "manualValidation": "NO",
                "captureDelay": 0,
                "_type": "V4/CardDetails"
            },
            "_type": "V4/PaymentOrderTransactionDetails"
        },
        "dataCollectionForm": false,
        "merchantComment": null,
        "message": "<b>Mensagem enviada por DEMO STORE</b> <p>Caro cliente,</p> <p>Este e-mail contém uma ordem de pagamento no valor de 2.000,50 BRL válida até 01/04/2020. Para confirmar o pagamento, favor clicar sobre o link seguinte : </p> <p>https://secure.lyra.com/t/w5izg024</p> <p>Em caso de problema ou se esta mensagem não é exibida corretamente, favor contactar support@demostore.com.</p>",
        "_type": "V4/PaymentOrder"
    },
    "ticket": null,
    "serverDate": "2020-04-01T08:20:46+00:00",
    "applicationProvider": "LYRA",
    "metadata": null,
    "_type": "V4/WebService/Response"
}


}

Manejo de errores

Tabla de errores
Código Descripción
INT_902 El formato del campo paymentOrderId no es válido o el campo no se ha transmitido.
PSP_1000 La solicitud de pago no existe.
Jobs
Legal
GDPR
25.19-1.11