Secure Core PHP API · Server handles PayPal first · Then forwards to your return_url / cancel_url
X-API-Key, merchant_reference, return_urlcheckout_url → PayPalreturn_url with payment_status=success|failed (or cancel_url)All API endpoints require header: X-API-Key: YOUR_KEY (set in config/app.php)
POST https://jeraldine-predominant-heather.ngrok-free.dev/projects/paypal-payment-process/api/create-payment.php
curl -X POST https://jeraldine-predominant-heather.ngrok-free.dev/projects/paypal-payment-process/api/create-payment.php \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"amount": 10.50,
"item_name": "Invoice Payment",
"merchant_reference": "ORD-1001",
"email": "customer@example.com",
"return_url": "https://yoursite.com/payment-result",
"cancel_url": "https://yoursite.com/payment-cancel"
}'
GET https://jeraldine-predominant-heather.ngrok-free.dev/projects/paypal-payment-process/api/payment-status.php?merchant_reference=ORD-1001
curl "https://jeraldine-predominant-heather.ngrok-free.dev/projects/paypal-payment-process/api/payment-status.php?merchant_reference=ORD-1001" \ -H "X-API-Key: YOUR_API_KEY"
Query params after our server processing, including:
payment_status = success | failed | cancelledsuccess = 1 | 0payment_token, merchant_reference, amount, paypal_txn_id, …Show proper success/fail UI on your site from these params.