ShipKit.one
Payment

PayPal

PayPal

Environment variables

PAYPAL_CLIENT_ID=your_paypal_client_id
PAYPAL_CLIENT_SECRET=your_paypal_client_secret
PAYPAL_WEBHOOK_ID=your_paypal_webhook_id
PAYPAL_MODE=sandbox

References:

Checkout flow (SDK)

  • The client calls POST /api/orders/create with provider: "paypal".
  • The server creates an order and returns an approvalUrl for PayPal.
  • After payment, the redirect returns to /dashboard/billing which triggers POST /api/orders/capture.

If you prefer a no-code flow, you can use PayPal hosted payment links. This method does not automatically create orders or order_payments records.

  1. Create a hosted link in PayPal (Payment links / buttons).
  2. Place the link on your pricing UI (e.g., siteConfig.payments.paypalLink).
  3. After payment, manually grant access or build a custom sync.

References:

Webhook

Endpoint:

https://{your-domain.com}/api/webhooks/paypal

Recommended events:

  • CHECKOUT.ORDER.APPROVED
  • PAYMENT.CAPTURE.COMPLETED
  • PAYMENT.CAPTURE.DENIED
  • PAYMENT.CAPTURE.REFUNDED

On this page