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 nameType LengthRequiredDescription
[request]containerrequiredGeneral container for this resource. Includes the generic request items.
[consumer]containerrequiredConsumer information for this transaction (See the generic Consumer and Shipping elements for this transaction.)
[cartitems]containerrequiredThe cart items of the webshop order. (See the generic CartItems elements.)

REST response elements


See the PayPal Payment response elements.

Field nameType LengthDescription
successboolean 1true or false indicating the result of the call.
[payment]containerGeneral container for this resource.
code (optional)string 48Error code. See List of Error Codes .
message (optional)string 255Textual message indicating what went wrong in case the call was unsuccessful.
actionstring 12The action that needs to be undertaken (eg redirect or post).
externalboolean 1Indicates, if TRUE, that the url is to an external website.
urlstring 255Complete issuer URL to which the consumer must be redirected for authentication. It is your responsibility to redirect the consumer to the url address.
transaction_idstring 12Newly 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 nameType LengthRequiredDescription
[refund]containerrequiredGeneral container for this resource (XML only).
transaction_idstring 12requiredTransaction ID that needs to be refunded.
amountinteger 10requiredThe amount payable in cents (with no decimal separator). Required unless auto_amount flag is given.
auto_amountboolean 1-3optionalFlag (1/Yes) to indicate the full/remaining amount can be refunded for the transaction.
descriptionstring 255optionalReason why the transaction is being refunded.

REST response elements

Field nameType LengthDescription
[refund]containerGeneral container for this resource.
transaction_idstring 12Transaction 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

📘

Note

PayPal does currently not support recurring payments via the Express Checkout API.


Did this page help you?