The PayPal API is an incredibly powerful tool for developers and businesses to manage payments, subscriptions, and money transfers securely without having to write lengthy integration code. With the PayPal API, you can rapidly integrate payment, billing, and money transfer operations into any website or app, enabling businesses to accept payments from customers around the world.
As such, you can use the PayPal API to build many different types of applications, such as:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
paypal: {
type: "app",
app: "paypal",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.paypal.$auth.app_type}.paypal.com/v1/identity/oauth2/userinfo`,
headers: {
Authorization: `Bearer ${this.paypal.$auth.oauth_access_token}`,
},
params: {
schema: `paypalv1.1`,
},
})
},
})
Paypal uses OAuth authentication. When you connect your Paypal account, Pipedream will open a popup window where you can sign into Paypal and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Paypal API.
Pipedream requests the following authorization scopes when you connect your account:
POST
{{custom_fields.app_type}}.paypal.com/v1/oauth2/token
Accept-Language: en_US
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
POST
{{custom_fields.app_type}}.paypal.com/v1/oauth2/token
Accept-Language: en_US
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials