• France
status page
Demo shops
assistance
FAQContact support
Search
Categories
Tags
Europe (English)
France
Spain
Europe (English)
India
Homepage
Use cases
Create a payment
Create an installment payment
Create a multi-card (split) payment
Create a payment by Alias (Token)
Create a payment link
Create a recurring payment
Manage subscriptions
Manage your transactions (refund, cancel...)
Analyze your reports
API docs
Embedded Form
REST API
Hosted payment
Mobile payment
File exchange
SDD mandates by REST API
Snippets
Payment methods
Plugins
Marketplace
Guides
Merchant Back Office
Back Office Expert
Functional guides

Obtaining payment order details

Use cases

The merchant wants to obtain the details of a payment order with its status.

The Charge/PaymentOrder/Get web service allows you to only view the payment orders created with the Charge/CreatePaymentOrder web service.

Test

Test the Charge/PaymentOrder/Get web service via our playground.

Request

Sample query

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

PARAMETER required Description
paymentOrderId YES Unique reference of the payment order generated by the gateway.
/en/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"];

?>

Response

Example Answer
{
    "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"
}


}

Error handling

Error table
Code Description
INT_902 The format of the paymentOrderId field is invalid or the field is not transmitted.
PSP_1000 The payment order does not exist.
Jobs
Legal
GDPR
25.19-1.11