API - Planyo Web Services - add_reservation_payment

Jesteś tutaj: Planyo » Pomoc » API » add_reservation_payment

add_reservation_payment

Description:

Adds a payment for a reservation. You may NOT pass customer's credit card numbers in any of the fields. Planyo doesn't keep any credit card numbers on its servers.

Input:

reservation_id int optional
Reservation ID for which the payment will be added. Required unless reservation_ids is used.
reservation_ids string optional
You can optionally pass multiple comma-separated reservation IDs (max 50) in this parameter. If this parameter is passed, you may NOT pass any value in the parameter reservation_id. To add the same payment amount to all reservations, pass a single value in amount. For multiple values (different for each reservation), pass multiple comma-separated values corresponding to reservation_ids passed in the parameter named amounts (in the same way you can pass multiple transaction_ids instead of specifying a single ID). Note that the JSON data returned by an API call with this parameter will be different. The 'data' key will be an array with reservation IDs as keys and the values corresponding to the standard output of this function (see the Output section below) for given reservation ID.
payment_mode int required
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 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, 99 - other payment gateway
payment_status int required
One of the values representing the status of the payment: 1 - payment successful, 2 - payment is pending, 3 - error, 4 - this is a refund
payment_response_code string optional
The response code returned by payment gateway. This can be a number or a text symbol like 'OK' etc.
transaction_id string required
Unique transaction ID of the payment.
transaction_status_text string optional
Optional status text e.g. reason for error
payment_time DateTime optional
You can optionally pass an alternative transaction time for this payment.
extra_info string optional
You can optionally add any custom info to the payment.
amount float required
The payment amount, e.g. 15.25 or 0.
currency string required
3-letter (ISO 4217) currency code e.g. EUR, USD, CHF, GBP etc.
is_quiet bool optional
Set this to true if you don't want any post-payment processing to be done as a result of the payment. This could include: email notifications sent and/or status changed (to confirmed or cancelled in case of a full refund). The default value is false.
method string required
must be set to add_reservation_payment
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:

status int
Status of the reservation after the payment
payment_id int
ID of the added payment

API playground:

Click here to test this function in the API playground.