Invoice Ninja + PayPal REST
Current configuration
| Item | Value |
|---|---|
| Invoice Ninja | https://invoice.id86.net |
| Invoice Ninja version | 5.13.26 |
| PayPal gateway | PayPal REST (PayPal_Rest) |
| Environment | Sandbox / test mode |
| Currency | USD |
| PayPal app | opshell |
| Gateway status | Configured and active for company 1 |
Credentials are stored in ~/.ssh/paypal/.env; they are not written into this
documentation or the Invoice Ninja repository.
Configuration applied
- PayPal REST gateway created for the Invoice Ninja company.
- Sandbox
Client IDandSecretconfigured. testModeenabled.- PayPal funding method enabled.
- Billing and shipping addresses are not required for digital/service invoices.
- Company gateway setting updated so the gateway is active in the client portal.
Verification
Invoice Ninja's own PayPalRestPaymentDriver successfully obtained a Sandbox
OAuth access token from:
https://api-m.sandbox.paypal.com/v1/oauth2/token
The invoice page exposes PayPal as the available payment method. No customer payment has been captured yet.
Example invoice
| Item | Value |
|---|---|
| Invoice number | 0001 |
| Amount | $10.00 USD |
| Client | PayPal Sandbox Test - Donnyaw |
| Recipient | donnyaw@gmail.com |
| Email status | Sent through the Docker mailserver |
| Public invoice URL | https://invoice.id86.net/client/invoice/qy8IAeK9VmN73JIDjl9UPw4qF30hFHfi |
| PayPal method | Available on the invoice page |
The email was resent after correcting the company portal domain from the
internal server URL to https://invoice.id86.net.
End-to-end test
- Create a USD test invoice in Invoice Ninja.
- Open the invoice through the client portal.
- Select Pay Now → PayPal.
- Sign in with the Sandbox personal account from Testing Tools → Sandbox Accounts.
- Approve the payment.
- Confirm the invoice changes to paid in Invoice Ninja.
Webhooks
Invoice Ninja handles the normal PayPal payment return and payment recording. The separate Webhook Endpoint is optional for event logging, reconciliation, notifications, and future membership provisioning.
Troubleshooting
If Invoice Ninja reports invalid credentials:
- Confirm PayPal Sandbox credentials are used while
testModeis enabled. - Confirm the credential pair belongs to the
opshellSandbox app. - Clear application cache with
php artisan optimize:clearinside the app container. - Check Invoice Ninja logs under
/var/www/app/storage/logs/.
Do not switch to live credentials until the Sandbox invoice flow succeeds.