Skip to main content
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);
}  
{
    "DirectDebitType": "SOFORT",
    "Id": "158596153",
    "Tag": "custom meta",
    "CreationDate": 1671609130,
    "ResultCode": null,
    "ResultMessage": null,
    "AuthorId": "146476890",
    "CreditedUserId": "146476890",
    "DebitedFunds": {
        "Currency": "EUR",
        "Amount": 1200
    },
    "CreditedFunds": {
        "Currency": "EUR",
        "Amount": 1188
    },
    "Fees": {
        "Currency": "EUR",
        "Amount": 12
    },
    "Status": "CREATED",
    "ExecutionDate": null,
    "Type": "PAYIN",
    "Nature": "REGULAR",
    "CreditedWalletId": "148968396",
    "DebitedWalletId": null,
    "PaymentType": "DIRECT_DEBIT",
    "ExecutionType": "WEB",
    "RedirectURL": "https://api.sandbox.mangopay.com/Content/PaylineTemplateWidget?rp=7012a35bacc94224887444a6befdcabc&transactionId=158596153&token=14gpfysmDhsVLpjlL2451671609131187",
    "ReturnURL": "http://www.my-site.com/returnURL/?transactionId=158596153",
    "TemplateURL": "https://api.sandbox.mangopay.com/Content/PaylineTemplateWidget?rp=7012a35bacc94224887444a6befdcabc&transactionId=158596153",
    "Culture": "EN"
}
  

Note – Pay-in data retained for 13 monthsAn 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

DirectDebitType
string
Returned values: GIROPAY, SOFORTThe type of direct debit.
Id
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
Tag
string
Max. length: 255 charactersCustom data that you can add to this object.
For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform.
CreationDate
Unix timestamp
The date and time at which the object was created.
ResultCode
string
The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes.
ResultMessage
string
The explanation of the result code.
AuthorId
string
The unique identifier of the user at the source of the transaction.
CreditedUserId
string
Default value: The unique identifier of the owner of the credited wallet.The unique identifier of the user whose wallet is credited.
DebitedFunds
object
Information about the debited funds.
CreditedFunds
object
Information about the credited funds (CreditedFunds = DebitedFunds - Fees).
Fees
object
Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet).
Status
string
Returned values: CREATED, SUCCEEDED, FAILEDThe status of the transaction.
ExecutionDate
Unix timestamp
The date and time at which the status changed to SUCCEEDED, indicating that the transaction occurred. The statuses CREATED and FAILED return an ExecutionDate of null.
Type
string
Returned values: PAYIN, TRANSFER, CONVERSION, PAYOUTThe type of the transaction.
Nature
string
Returned values: REGULAR, REPUDIATION, REFUND, SETTLEMENTThe nature of the transaction, providing more information about the context in which the transaction occurred:
  • REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow.
  • REPUDIATION – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback).
  • REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay).
  • SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle a lost dispute.
CreditedWalletId
string
The unique identifier of the credited wallet.
DebitedWalletId
string
The unique identifier of the debited wallet.In the case of a pay-in, this value is always null since there is no debited wallet.
PaymentType
string
Returned values: CARD, DIRECT_DEBIT, PREAUTHORIZED, BANK_WIREThe type of pay-in.
ExecutionType
string
Returned values: WEB, DIRECT, EXTERNAL_INSTRUCTIONThe type of execution for the pay-in.
RedirectURL
string
The URL to which to redirect the user to complete the payment.Caution: This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it.
ReturnURL
string
Max. length: 220 charactersThe URL to which the user is returned after the payment, whether the transaction is successful or not.
TemplateURL
string
deprecated
Caution: This customization feature is deprecated and must no longer be used. You must redirect on the RedirectURL instead.The customized URL to which to redirect the user to complete the payment.
Culture
string
Returned values: One of the supported languages in the ISO 639-1 format: CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, NL, NO, PL, PT, SK, SV.The language in which the payment page is to be displayed.
{
    "DirectDebitType": "SOFORT",
    "Id": "158596153",
    "Tag": "custom meta",
    "CreationDate": 1671609130,
    "ResultCode": null,
    "ResultMessage": null,
    "AuthorId": "146476890",
    "CreditedUserId": "146476890",
    "DebitedFunds": {
        "Currency": "EUR",
        "Amount": 1200
    },
    "CreditedFunds": {
        "Currency": "EUR",
        "Amount": 1188
    },
    "Fees": {
        "Currency": "EUR",
        "Amount": 12
    },
    "Status": "CREATED",
    "ExecutionDate": null,
    "Type": "PAYIN",
    "Nature": "REGULAR",
    "CreditedWalletId": "148968396",
    "DebitedWalletId": null,
    "PaymentType": "DIRECT_DEBIT",
    "ExecutionType": "WEB",
    "RedirectURL": "https://api.sandbox.mangopay.com/Content/PaylineTemplateWidget?rp=7012a35bacc94224887444a6befdcabc&transactionId=158596153&token=14gpfysmDhsVLpjlL2451671609131187",
    "ReturnURL": "http://www.my-site.com/returnURL/?transactionId=158596153",
    "TemplateURL": "https://api.sandbox.mangopay.com/Content/PaylineTemplateWidget?rp=7012a35bacc94224887444a6befdcabc&transactionId=158596153",
    "Culture": "EN"
}
  

<?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);
}