API - Planyo Web Services - list_payments

Ti trovi qui: Planyo » Aiuto » API » list_payments

list_payments

Description:

List payments made for your reservations. You can specify a number of parameters to filter the results.

Input:

start_date Date required
The returned payments will be limited to those which were made between the spacified start and end date. For example, for the values start_date=2016-08-01&end_date=2016-08-31 the results will be limited to the payments made in August 2016.
end_date Date required
End date limiting the time span for the returned payment. For example, 2016-08-31. See start_date above.
resource_id int optional
If you specify resource ID, only payments made for reservations made for this resource will be listed.
site_id int optional
If using a metasite api key, setting site_id and not specifying any resource_id will list all payments for this site. If you specified a resource_id you may leave this parameter empty.
status int optional
By using this filter you can limit the results to payments with the given status. The allowed values are '1' for paid/successful payment, '2' for pending, '3' for errors and '4' for refunds.
language string optional
by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned
api_key string required
your API key - Click here to get your key. If your API key uses a hash key, you must also include the parameters hash_key and hash_timestamp.

Output:

results array
Array whose items are named arrays with the following keys:
payment_id - unique identifier for the payment,
payment_date - date and time when the payment was made,
site_id - site ID for the reservation
payment_mode_id - the method used to make the payment: 2 - offline (cash), 3 - cheque, 4 - bank transfer, 5 - other, 6 - gift certificate, 9 - discount, 10 - credit card number left on file, or one of the following payment gateways: 1 - Paypal, 7 - Paypal Sandbox, 8 - Moneybookers, 11 - WorldPay, 12 - WorldPay Test, 13 - Authorize.net, 14 - Sage Pay, 15 - Sage Pay Test, 16 - MultiSafepay, 17 - MultiSafepay Test, 18 - EBS, 19 - Servired, 20 - Servired Test, 21 - Authorize.net - DPM, 22 - Mastercard MiGS, 23 - Wirecard QPAY, 24 - Paybox, 25 - Mercanet, 26 - SystemPay, 27 - SystemPay Test, 28 - CC Avenue, 29 - DIBS, 30 - DIBS Test, 31 - Cobrebem, 32 - Cobrebem Test, 33 - Be2Bill, 34 - Be2Bill Test, 35 - Checkout.fi, 37 - Montrada, 38 - DIBS Flex, 39 - DIBS Flex Test, 46 - CMCIC, 47 - EWay, 48 - EWay Shared, 49 - Sherlock, 50 - Authorize.net CIM, 51 - Authorize.net CIM Test, 52 - Coinbase, 53 - Ogone, 54 - Saferpay, 55 - 4Cs, 56 - Stripe, 57 - Paylib, 58 - PayPal Payflow Pro, 59 - PayPal Payflow Pro Sandbox, 60 - Przelewy24, 61 - Checkout.com, 99 - custom payment gateway (use this value if implementing your own payment gateway as per FAQ Q231),
payment_mode - name of the payment method,
payment_amount - amount of the payment,
payment_currency - currency used,
payment_comment - (optional) additional info about the payment,
custom_id - (optional) ID of the payment in the payment gateway,
status_code - status code of the payment. See the status field above for the values,
status - status name,
reservation_id - reservation ID for which the payment was made,
resource_id - ID of the reserved resource,
user_id - user ID of the reservation,
email - email address of the user,
first_name - first name of the user,
last_name - last name of the user

API playground:

Click here to test this function in the API playground.