PayPal
PayPal is a well known online payment system. The consumer logs on to his/her PayPal account to make the payment.
Beside the default parameters there is no additional information required to initiate a transaction.
Note
- This is a Distributing method; transactions will always be processed and credited to your PayPal account.
- The PayPal Express Checkout API credentials of your PayPal account are required to submit transactions to PayPal, please contact your accountmanager for more details.
- NB By default PayPal will have the "e-Check" option enabled on your account, you may want to disable this.
Please check the Transactions for generic information applicable to all payment methods.
PayPal Payment
Entry point: /rest/v1/curo/payment/paypal/
REST request elements
See the PayPal request parameters in the API reference.
| Field name | Required | Description | |
|---|---|---|---|
[request] | container | required | General container for this resource. Includes the generic request items. |
[consumer] | container | required | Consumer information for this transaction (See the generic Consumer and Shipping elements for this transaction.) |
[cartitems] | container | required | The cart items of the webshop order. (See the generic CartItems elements.) |
REST response elements
See the PayPal Payment response elements.
| Field name | Description | |
|---|---|---|
success | true or false indicating the result of the call. | |
[payment] | container | General container for this resource. |
code (optional) | Error code. See List of Error Codes . | |
message (optional) | Textual message indicating what went wrong in case the call was unsuccessful. | |
action | The action that needs to be undertaken (eg redirect or post). | |
external | Indicates, if TRUE, that the url is to an external website. | |
url | Complete issuer URL to which the consumer must be redirected for authentication. It is your responsibility to redirect the consumer to the url address. | |
transaction_id | Newly created transaction ID. |
PayPal Refund
The Refund operation must be done using the Transaction ID of a successfully completed transaction.
The Refund operation, as its name states, consists of returning the money already collected by a Payment or a Capture transaction. The amount collected can be refunded in total or partially. You cannot refund amounts bigger than the one sent in the original transaction.
Entry point: /rest/v1/curo/refund/
REST request elements
| Field name | Required | Description | |
|---|---|---|---|
[refund] | container | required | General container for this resource (XML only). |
transaction_id | required | Transaction ID that needs to be refunded. | |
amount | required | The amount payable in cents (with no decimal separator). Required unless auto_amount flag is given. | |
auto_amount | optional | Flag (1/Yes) to indicate the full/remaining amount can be refunded for the transaction. | |
description | optional | Reason why the transaction is being refunded. |
REST response elements
| Field name | Description | |
|---|---|---|
[refund] | container | General container for this resource. |
transaction_id | Transaction ID. |
PayPal Refund samples
JSON Example Request
POST /rest/v1/curo/refund/ HTTP/1.1
Authorization: Basic dXNlcm5hbWU6YXBpa2V5
Host: secure.curopayments.net
Content-type: application/json
Accept: application/json{
"site_id": 1234,
"transaction_id": "T1234567890",
"amount": 100,
"description": "Double paid"
}Response:
HTTP/1.1 200 OK
Content-Type: application/json{
"refund": {
"transaction": "T1234567890",
"payment_type_id": "18",
"transaction_id": "T1234567890"
}
}PayPal Recurring
Updated about 2 months ago