PayPal
General information
A PayPal component with implementations of actions and triggers based on the Open Integration Hub (OIH) Standard.
Read the PayPal REST API documentation for more information.
Credentials
To use PayPal API you need to create an app in a developer account and use your Client ID and Secret.
To do this navigate to:
You will also need to configure your credentials during flow configuration:
Triggers
Webhook trigger
Creates webhook subscriptions on the PayPal side and receives events to the flow.
Configuration fields
- Webhook ID
-
A required string setting. The webhook ID becomes available after a webhook is created.
You must set an Internet-accessible URL configured to listen for incoming POST notification messages containing event information when creating the webhook. To implement this mechanism, the following steps must be taken:
-
Create a flow with a random id in the config field
-
Publish flow, after which the webhook URL will become available.
-
Copy the URL of the elastic.io webhook
-
Create a webhook on the PayPal side with the URL generated in the previous step.
-
Edit the flow and specify the webhook ID created in the previous step.
-
Get new and updated objects polling
Polls PayPal API for new and updated objects.
Receive instant payment notification
Webhook trigger to receive Instant Payment Notification (IPN). IPN is a message service that automatically notifies merchants of events related to PayPal transactions.
You can test your trigger using the IPN simulator:
-
Set your
webhookURL
to IPN handler URL field. -
Select any value of Transaction type.
-
Set
receiver_email
to the same value as Expected Email Address. -
Click Send IPN.
Actions
Update object
This action updates a PayPal object
Make raw request
Executes custom request
Configuration fields
- Don’t throw error on 404 Response
-
A optional boolean setting. This setting treats
404
HTTP responses not as error. The default isfalse
.
Make a payment
Executes a request to make a new Payment with provided data.
Creates a sale, an authorized payment to be captured later, or an order.
To create a sale, authorization, or order, include the payment details in the JSON request body.
Set the Intent to sale
, authorize
, or order
.
Input Metadata
- Intent
-
A required enum setting. The payment intent:
- sale
-
Makes an immediate payment.
- authorize
-
Authorizes a payment for capture later.
- order
-
Creates an order.
- Payer
-
A required object setting. The source of the funds for this payment. Payment method:
-
PayPal Wallet payment
-
bank direct debit.
The value of the
payment_method
must be PayPal. -
- Transactions
-
A required array setting. An array of objects that are payment-related transactions. The value for this input field should be formed as a JSON array of objects containing all the necessary data as objects. These objects are:
-
amount
-
description
-
custom
-
invoice_number
-
payment_options
-
soft_descriptor
-
item_list.
A transaction defines what the payment is for and who fulfills the payment. For update and execute payment calls, the
transactions
object accepts the amount object only. -
- Note To Payer
-
A required string setting. A free-form field that clients can use to send a note to the payer.
- Redirect Urls
-
A required object setting. A set of redirect URLs that you provide for PayPal-based payments.
Lookup object (at most one)
Action designed to lookup one object by a unique field.
Configuration fields
- Object Type
-
A required dropdown selection. Indicates object type to find
- Allow ID to be omitted
-
An optional checkbox. If selected, this setting makes the ID field optional (otherwise it is a required field).
- Allow zero results
-
An optional checkbox. If selected, this setting emits the empty object
{}
if zero results are returned (otherwise typically an error would be thrown).