PayPal connection
Create a REST app in PayPal, register the notification webhook, and save four values per mode: Client ID, Client secret, Merchant ID and Webhook ID.
What you need from PayPal
For each mode the extension needs four values. All four must belong to the same PayPal REST app and the same business account.
| Value | What it is |
|---|---|
| Client ID | The public identifier of your REST app. |
| Client secret | The private key of the same app. PayPal labels it "Secret". |
| Merchant ID | The identifier of the PayPal business account that receives the money: 13 capital letters and digits. |
| Webhook ID | The identifier PayPal gives to the webhook you add to the app. The store uses it to verify that a notification really comes from PayPal. |
Sandbox (test) and live are separate in PayPal. A sandbox app works only in Test mode and a live app only in Live mode. The extension keeps both sets, and the Mode setting decides which one is used.
Step 1: create the REST app
- Sign in to the PayPal Developer dashboard and open Apps & Credentials.
- Choose the environment with the Sandbox / Live switch. Start with Sandbox.
- Create an app, or open an existing one. In the sandbox, the app must belong to the sandbox business (seller) account, not to the buyer's personal test account.
- Copy the Client ID and the Secret of the app.
Step 2: find the Merchant ID
The Merchant ID is the account ID of the business account that owns the app.
- Sandbox: in the Developer dashboard open Testing Tools > Sandbox Accounts and view the details of the business account.
- Live: look for the PayPal Merchant ID in the business information of your PayPal account settings.
The extension sends every payment to this Merchant ID and checks that PayPal reports the same receiver. The ID of a different account makes payments fail.
Step 3: register the webhook
Webhooks are the notifications PayPal sends to your store when something happens to a payment. They let the store complete a payment even if the customer never returns from PayPal. The method cannot be enabled without a Webhook ID.
The Payment notifications tab of the extension is a numbered guide for the selected store. It contains an Open provider panel link to PayPal, the list of events, and the notification address for Test and for Live, each with a Copy URL button. The tab has nothing to save, so Save settings is hidden there.
In PayPal:
- Open the same REST app whose Client ID and Secret you copied.
- In its webhooks section (Sandbox Webhooks in the sandbox) choose Add Webhook.
- Paste the address from the extension as the webhook URL, without changing a character. Use the Test address for a sandbox app and the Live address for a live app.
- Select these events and save:
CHECKOUT.ORDER.APPROVED
CHECKOUT.ORDER.COMPLETED
PAYMENT.CAPTURE.COMPLETED
PAYMENT.CAPTURE.PENDING
PAYMENT.CAPTURE.DENIED
PAYMENT.CAPTURE.REFUNDED
PAYMENT.CAPTURE.REVERSED- Copy the Webhook ID that PayPal shows for the saved webhook.
The notification address
Always copy the address from the tab. It is built from your store address, the store number and the mode. For the default store in test mode on OpenCart 2.3 or 3.x it looks like this:
https://www.example.com/index.php?route=extension/payment/paypal_checkout_pro/webhook&store_id=0&mode=testOn OpenCart 1.5.5 to 2.2 the route is payment/paypal_checkout_pro/webhook. On OpenCart 4.0.2 and later it is extension/devman_paypal_checkout_pro/payment/paypal_checkout_pro.webhook. The live address ends in mode=live, and every store of a multi-store installation has its own store_id.
Your store answers PayPal with HTTP 200 when it accepts a notification, with 400 when the notification cannot be verified, and with 503 when a temporary problem prevented processing. After a 503 PayPal sends the notification again.
The extension has no scheduled task or cron job. Nothing has to be configured on your hosting.
Step 4: save the credentials
Open the PayPal connection tab, fill in the fields of the mode you are setting up and click Save settings.
| Field | Value to enter |
|---|---|
| Test · Client ID | Client ID of the sandbox app. |
| Test · Client secret | Secret of the sandbox app. |
| Test · Merchant ID | Account ID of the sandbox business account. |
| Test · Webhook ID | ID of the webhook added to the sandbox app. |
| Live · Client ID | Client ID of the live app. |
| Live · Client secret | Secret of the live app. |
| Live · Merchant ID | Merchant ID of your real PayPal business account. |
| Live · Webhook ID | ID of the webhook added to the live app. |
- The fields are masked and never show a saved value. An empty field reads "Not configured"; a saved one reads "Configured; leave blank to keep".
- A field you leave blank keeps its saved value. To replace a value, type the new one and save.
- Credentials are saved per store. Choose the store in the Store selector first.
Formats checked on saving
| Field | Accepted format |
|---|---|
| Client ID and Client secret | 8 to 256 letters, digits, hyphens and underscores. |
| Merchant ID | Exactly 13 capital letters and digits. |
| Webhook ID | 8 to 64 capital letters, digits and hyphens. |
Spaces around a pasted value are removed. If a value does not fit its format, nothing is saved and the screen shows "Check the settings, key modes and paid order status before saving."
Still need help?
Open a support ticket from your account and our team will look at your store with you.