Language

2Checkout Documentation

List

You must specify your API username and password when creating your 2checkout-node object (named ‘tco’ in these examples) before calling this method.

Description

Use to retrieve a list of past payments.

Arguments

  • callback - Function to be called on success/error

Returns

  • Array of payment sub-objects.

Example Usage:

tco.payments.list(function (error, data) {
    if (error) {
        console.log(error);
    } else {
        console.log(data.response_code);
    }
});

Example Response:

{
    "payments": [
        {
            "amount": "50240.51",
            "date_paid": null,
            "date_reserve_released": null,
            "date_voided": null,
            "payment_id": "4681565342",
            "payment_identifier": "wire_999042012",
            "payment_type": "wire",
            "reserve_held": "1646.07",
            "total_adjustments": "0.00",
            "total_balance_forward": "0.00",
            "total_chargeback_fees": "0.00",
            "total_commissions": "0.00",
            "total_fees": "1941.34",
            "total_outgoing_commissions": "0.00",
            "total_refunds": "2418.46",
            "total_reserve_released": "1397.38",
            "total_sales": "54869.00",
            "void": null
        },
        {
            "amount": "45616.52",
            "date_paid": null,
            "date_reserve_released": null,
            "date_voided": null,
            "payment_id": "4676285423",
            "payment_identifier": "wire_992042012",
            "payment_type": "wire",
            "reserve_held": "1499.83",
            "total_adjustments": "0.00",
            "total_balance_forward": "0.00",
            "total_chargeback_fees": "0.00",
            "total_commissions": "0.00",
            "total_fees": "1768.57",
            "total_outgoing_commissions": "0.00",
            "total_refunds": "2553.00",
            "total_reserve_released": "1463.62",
            "total_sales": "49994.30",
            "void": null
        }
    ],
    "response_code": "OK",
    "response_message": "payment info retrieved"
}