Can the REST API be used to create donation?

womcornerstone
Contributor
Contributor

Using the REST API, how can I create an order that displays the resulting transaction as a Donation instead of as a Payment. In my tests of creating orders with items of category of DONATION, the resulting transaction is listed as a payment.

 

The only way I can get a transaction to appear in the transaction log as a donation is to present to the user a donation button. However, using this method does not trigger any webhooks. The only way I can get webhooks to fire is to use the REST API to create an order. Unfortunately, this method lists the transaction as a payment and not a donation even when the item category is set to DONATION. How can I either use the REST API to create DONATION transactions or get the transactions/subscriptions created via a donation button to trigger Webhooks?

Login to Me Too
1 REPLY 1

vaishnavib
Moderator
Moderator

Good day @womcornerstone 

 

Thank you for posting to the PayPal community.

 

To integrate a PayPal donate button on your website, please follow the steps outlined in the document provided at the following URL: https://developer.paypal.com/sdk/donate/?gen_ai_summary=true&search_id=fe1cb13f-b84e-4664-8ce6-1e835...

 

Here is a simplified version of the steps:

 

1. Check Eligibility: Log in to paypal.com/donate/buttons with the account you want to use to create a Donate button. If you can sta...

 

2. Create a Donate Button: Log in to sandbox.paypal.com/donate/buttons and create your Donate button. Once you have created the button, y...

 

Note: Please note that you can also use third-party PayPal plugins to create donations in the REST API or refer to the subscriptions REST API https://developer.paypal.com/docs/api/subscriptions/v1/ for further information.

 

Please follow the below steps via your PayPal Business account to explore other integrations.

 

Login to PayPal.com >> click on "settings icon" >> go to "Account settings" >> Website payments >> PayPal but...

 

(Or)

 

Login to PayPal.com >> go to direct link "https://www.paypal.com/buttons/" >> follow the above steps.

If you still facing the issue, please create a MTS ticket via -   https://www.paypal-support.com/s/?language=en_US with detailed error information. 

 

Sincerely,

Vaishnavi

PayPal MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.