GET
/
v2.01
/
{ClientId}
/
payins
/
{PayInId}
<?php 

require_once 'vendor/autoload.php';

use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;

$api = new MangoPayApi();

$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';

try {
    $payinId = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';

    $response = $api->PayIns->Get($payinId);

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}  

{
    "Id": "wt_5a175522-04c3-4115-88ef-3b1b3446c4c6",
    "Tag": "Created using the Mangopay API Postman collection",
    "CreationDate": 1706797249,
    "AuthorId": "213407540",
    "DebitedFunds": {
        "Currency": "EUR",
        "Amount": 1500
    },
    "CreditedFunds": {
        "Currency": "EUR",
        "Amount": 1200
    },
    "Fees": {
        "Currency": "EUR",
        "Amount": 300
    },
    "Status": "SUCCEEDED",
    "ResultCode": "000000",
    "ResultMessage": "Success",
    "ExecutionDate": 1706797396,
    "Type": "PAYIN",
    "Nature": "REGULAR",
    "CreditedWalletId": "213407543",
    "CreditedUserId": "213407540",
    "PaymentType": "KLARNA",
    "ExecutionType": "WEB",
    "ReturnURL": "http://www.mangopay.com/docs/please-ignore?transactionId=wt_5a175522-04c3-4115-88ef-3b1b3446c4c6",
    "RedirectURL": "https://pay.playground.klarna.com/eu/hpp/payments/2fuacUE",
    "StatementDescriptor": "Mangopay",
    "Billing": {
        "FirstName": "Alex",
        "LastName": "Smith",
        "Address": {
            "AddressLine1": "6 rue de la Cité",
            "AddressLine2": "Appartement 3",
            "City": "Paris",
            "Region": "île-de-france",
            "PostalCode": "75003",
            "Country": "FR"
        }
    },
    "Shipping": {
        "FirstName": "Alex",
        "LastName": "Smith",
        "Address": {
            "AddressLine1": "Rue de la Fourche 26",
            "AddressLine2": "Appartement 3",
            "City": "Bruxelles",
            "Region": "Bruxelles-Capitale",
            "PostalCode": "75003",
            "Country": "BE"
        }
    },
    "LineItems": [
        {
            "Name": "Running shoes",
            "Quantity": 2,
            "UnitAmount": 400,
            "TaxAmount": 100,
            "Description": "ID of Seller 1"
        },
        {
            "Name": "Walking shoes",
            "Quantity": 1,
            "UnitAmount": 400,
            "TaxAmount": 100,
            "Description": "ID of Seller 2"
        }
    ],
    "Country": "FR",
    "Culture": "FR",
    "Email": "alex.smith@example.com",
    "Phone": "[+33][689854321]",
    "PaymentMethod": "Pay in 30 days",
    "AdditionalData": "{\"customer_account_info\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"app_id\": \"81363501-3540-494a-8627-33bc6112035d\",\"loyalty_level\": \"high\",\"customer_email\": \"customer@email.com\",\"customer_phone\": \"0611223344\",\"customer_ranking\": 2,\"customer_reviews\": 5,\"last_login_time\": \"2023-10-21T19:11:34Z\",\"account_security\": {\"last_verification_method\": \"2FA TOTP\",\"last_verification_time\": \"2023-10-21T19:11:34Z\",\"device_id\": \"772af5a5-2d55-4a5e-bb79-85969f683810\",\"fraud_behavior\": false,\"devices_linked\": 2,\"phone_verified\": true,\"email_verified\": true,\"failed_transactions_attempts\": 0},\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": \"2022-12-22T18:45:44Z\"}],\"marketplace_seller_info\": [{\"sub_merchant_id\": \"615a0e87-4941-45dc-978d-e6efcbd90ba0\",\"sub_merchant_name\": \"Marketbrick Ltd.\",\"sub_merchant_postal_code\": \"75010\",\"product_category\": \"Computers\",\"product_name\": \"Asus Zenbook 14\",\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2020-06-10T12:02:21Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2020-06-10T12:02:21Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"digital_download\": false,\"seller_rating\": 4.5,\"number_of_trades\": 34,\"volume_of_trades\": 4500}],\"payment_history_full\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 10,\"payment_option\": \"card\",\"total_amount_paid_purchases\": 1000.10,\"date_of_first_paid_purchase\": \"2020-06-10T12:12:34Z\",\"date_of_last_paid_purchase\": \"2023-10-26T18:52:38Z\"},{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 14,\"payment_option\": \"non klarna credit\",\"total_amount_paid_purchases\": 2322.10,\"date_of_first_paid_purchase\": \"2021-10-11T20:31:15Z\",\"date_of_last_paid_purchase\": \"2023-09-22T14:59:22Z\"}],\"marketplace_winner_info\": [{\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2022-12-22T18:45:44Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2023-08-14T08:23:34Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"number_of_trades\": 24,\"volume_of_trades\": 3322}],\"other_delivery_address\": [{\"shipping_method\": \"pick-up point\",\"shipping_type\": \"express\",\"first_name\": \"Test\",\"last_name\": \"Person\",\"street_address\": \"Rue La Fayette\",\"street_number\": \"33\",\"postal_code\": \"75009\",\"city\": \"Paris\",\"country\": \"FR\"}]}",
    "Reference": "1234"
}  

Note – Pay-in data retained for 13 months

An API call to retrieve a pay-in whose CreationDate is older than 13 months may return 404 Not Found.

For more information, see the Data availability periods article.

Path parameters

PayInId
string
required

The unique identifier of the pay-in.

Responses


{
    "Id": "wt_5a175522-04c3-4115-88ef-3b1b3446c4c6",
    "Tag": "Created using the Mangopay API Postman collection",
    "CreationDate": 1706797249,
    "AuthorId": "213407540",
    "DebitedFunds": {
        "Currency": "EUR",
        "Amount": 1500
    },
    "CreditedFunds": {
        "Currency": "EUR",
        "Amount": 1200
    },
    "Fees": {
        "Currency": "EUR",
        "Amount": 300
    },
    "Status": "SUCCEEDED",
    "ResultCode": "000000",
    "ResultMessage": "Success",
    "ExecutionDate": 1706797396,
    "Type": "PAYIN",
    "Nature": "REGULAR",
    "CreditedWalletId": "213407543",
    "CreditedUserId": "213407540",
    "PaymentType": "KLARNA",
    "ExecutionType": "WEB",
    "ReturnURL": "http://www.mangopay.com/docs/please-ignore?transactionId=wt_5a175522-04c3-4115-88ef-3b1b3446c4c6",
    "RedirectURL": "https://pay.playground.klarna.com/eu/hpp/payments/2fuacUE",
    "StatementDescriptor": "Mangopay",
    "Billing": {
        "FirstName": "Alex",
        "LastName": "Smith",
        "Address": {
            "AddressLine1": "6 rue de la Cité",
            "AddressLine2": "Appartement 3",
            "City": "Paris",
            "Region": "île-de-france",
            "PostalCode": "75003",
            "Country": "FR"
        }
    },
    "Shipping": {
        "FirstName": "Alex",
        "LastName": "Smith",
        "Address": {
            "AddressLine1": "Rue de la Fourche 26",
            "AddressLine2": "Appartement 3",
            "City": "Bruxelles",
            "Region": "Bruxelles-Capitale",
            "PostalCode": "75003",
            "Country": "BE"
        }
    },
    "LineItems": [
        {
            "Name": "Running shoes",
            "Quantity": 2,
            "UnitAmount": 400,
            "TaxAmount": 100,
            "Description": "ID of Seller 1"
        },
        {
            "Name": "Walking shoes",
            "Quantity": 1,
            "UnitAmount": 400,
            "TaxAmount": 100,
            "Description": "ID of Seller 2"
        }
    ],
    "Country": "FR",
    "Culture": "FR",
    "Email": "alex.smith@example.com",
    "Phone": "[+33][689854321]",
    "PaymentMethod": "Pay in 30 days",
    "AdditionalData": "{\"customer_account_info\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"app_id\": \"81363501-3540-494a-8627-33bc6112035d\",\"loyalty_level\": \"high\",\"customer_email\": \"customer@email.com\",\"customer_phone\": \"0611223344\",\"customer_ranking\": 2,\"customer_reviews\": 5,\"last_login_time\": \"2023-10-21T19:11:34Z\",\"account_security\": {\"last_verification_method\": \"2FA TOTP\",\"last_verification_time\": \"2023-10-21T19:11:34Z\",\"device_id\": \"772af5a5-2d55-4a5e-bb79-85969f683810\",\"fraud_behavior\": false,\"devices_linked\": 2,\"phone_verified\": true,\"email_verified\": true,\"failed_transactions_attempts\": 0},\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": \"2022-12-22T18:45:44Z\"}],\"marketplace_seller_info\": [{\"sub_merchant_id\": \"615a0e87-4941-45dc-978d-e6efcbd90ba0\",\"sub_merchant_name\": \"Marketbrick Ltd.\",\"sub_merchant_postal_code\": \"75010\",\"product_category\": \"Computers\",\"product_name\": \"Asus Zenbook 14\",\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2020-06-10T12:02:21Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2020-06-10T12:02:21Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"digital_download\": false,\"seller_rating\": 4.5,\"number_of_trades\": 34,\"volume_of_trades\": 4500}],\"payment_history_full\": [{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 10,\"payment_option\": \"card\",\"total_amount_paid_purchases\": 1000.10,\"date_of_first_paid_purchase\": \"2020-06-10T12:12:34Z\",\"date_of_last_paid_purchase\": \"2023-10-26T18:52:38Z\"},{\"unique_account_identifier\": \"382f5a69-c51c-45af-9707-6991eb08f7bf\",\"number_paid_purchases\": 14,\"payment_option\": \"non klarna credit\",\"total_amount_paid_purchases\": 2322.10,\"date_of_first_paid_purchase\": \"2021-10-11T20:31:15Z\",\"date_of_last_paid_purchase\": \"2023-09-22T14:59:22Z\"}],\"marketplace_winner_info\": [{\"account_registration_date\": \"2020-06-10T12:02:21Z\",\"account_last_modified\": {\"password\": \"2022-12-22T18:45:44Z\",\"email\": \"2020-06-10T12:02:21Z\",\"listing\": \"2023-08-14T08:23:34Z\",\"login\": \"2020-06-10T12:02:21Z\",\"address\": \"2020-06-10T12:02:21Z\"},\"number_of_trades\": 24,\"volume_of_trades\": 3322}],\"other_delivery_address\": [{\"shipping_method\": \"pick-up point\",\"shipping_type\": \"express\",\"first_name\": \"Test\",\"last_name\": \"Person\",\"street_address\": \"Rue La Fayette\",\"street_number\": \"33\",\"postal_code\": \"75009\",\"city\": \"Paris\",\"country\": \"FR\"}]}",
    "Reference": "1234"
}  
<?php 

require_once 'vendor/autoload.php';

use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;

$api = new MangoPayApi();

$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';

try {
    $payinId = 'payin_m_01HYG8DRT5FHT1FV44MV9KR1BS';

    $response = $api->PayIns->Get($payinId);

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}