PayPal
Get PayPal Availability
Returns whether PayPal can be used on this SKU.io account, and whether one-click Connect with PayPal is available.
Get PayPal Integration
Returns one PayPal integration with its connection status, merchant identity and granted permissions.
Rename PayPal Integration
Renames a PayPal account. The name is what staff pick the account by when sending a pay link; customers never see it.
Delete PayPal Integration
Permanently deletes a PayPal account that has never taken a payment, together with its pay links, webhook events and imported transactions. For an account connected with API keys, SKU.io's webhook is removed from the merchant's PayPal app. A customer opening one of its pay links is told the link can't be found.
Connect PayPal With API Keys
Connect a PayPal integration (or replace its keys) with the merchant's own PayPal REST app credentials. Create the app on developer.paypal.com under Apps & Credentials (type Merchant) and copy its Client ID and Secret.
Create PayPal Integration
Creates a new, not-yet-connected PayPal integration (one per PayPal Business account). Connect it afterwards with **Start PayPal Authorization** (Connect with PayPal) or **Connect PayPal With API Keys**.
Complete PayPal Authorization (OAuth Callback)
**Called by the merchant's browser, not by an integrator.** This is the return URL PayPal redirects the merchant to after they finish the Connect with PayPal sign-up started by **Start PayPal Authorization**. It needs no bearer token; it is authenticated by the single-use `state` SKU.io issued, and the merchant id is confirmed with PayPal before anything is saved.
Refresh PayPal Integration Status
Re-reads the account's state from PayPal and returns the updated integration.
Disconnect PayPal Integration
Disconnects the PayPal account from SKU.io: clears the merchant connection, cancels the account's active pay links (checkout would refuse them once the account is gone) and stops routing its webhooks. Links whose payment is already processing are kept so the payment can still complete.
List PayPal Pay Links
Lists the pay links created for one PayPal integration, newest first, with paging, sorting, search and filters.
Create PayPal Pay Link
Creates a PayPal pay link for a sales order and, optionally, emails it to the customer.
List Sales Order PayPal Pay Links
Lists every PayPal pay link on one sales order, newest first, with each link's PayPal payments (fee, refunded and remaining refundable amounts, dispute status, and `refund_unavailable_reason` — why the payment can't be refunded through SKU.io right now, such as a disconnected PayPal account or an earlier refund still processing at PayPal, or null when it can).
Create PayPal Pay Link for Sales Invoice
Creates a PayPal pay link that collects one sales invoice and, optionally, emails it to the customer. The payment is recorded on the invoice's sales order and allocated to this invoice when it clears. For an order invoice (kind `order_mirror`) the link is created on its sales order, exactly as Create PayPal Pay Link does.
Email PayPal Pay Link
Emails an active PayPal pay link to the customer using the editable 'PayPal Payment Request' email template (sender, CC and BCC follow the account's outbound email settings).
Cancel PayPal Pay Link
Cancels an active pay link so the customer can no longer pay it.
Refund PayPal Payment
Refunds all or part of a PayPal payment through PayPal and records the refund on the sales order (a closed refund credit dated when PayPal made the refund). A full refund sets the order's payment status to `refunded`; a partial one to `partially_refunded`.
Preview PayPal Pay Link Email
Returns the PayPal Payment Request email exactly as Email PayPal Pay Link would send it for this link: `to` (the order's customer email, or null when it has none), `cc` (the template's CC addresses), `subject` and the HTML `body` with every placeholder filled.
Preview New PayPal Pay Link Email
Returns the PayPal Payment Request email a pay link about to be created would be sent with. The amount and expiry date are the ones given; the link's address, which doesn't exist yet, appears as a placeholder.
List PayPal Transactions
Lists PayPal account activity imported for one PayPal integration: payments, refunds, chargebacks, bank transfers, holds and fees, each classified against the payments SKU.io has recorded.
Get PayPal Transaction Summary
Totals for imported PayPal transactions on one integration. Accepts the same `filter[...]` and `filter_groups` parameters as List PayPal Transactions, so the totals always match the filtered list.
Import PayPal Transactions
Queues a background import of this PayPal account's transactions. The import resumes from where the last successful run stopped (re-reading the previous 3 days to pick up late status changes); a first import looks back 90 days. Imports run automatically every night; use this to refresh on demand.
Mark PayPal Transaction Reviewed
Marks an unmatched imported PayPal transaction as reviewed: it belongs to no SKU.io order, or the payment was recorded by hand. Its `match_status` becomes `reviewed`, so it no longer counts as unmatched in Get PayPal Transaction Summary. Later imports of the same dates keep it reviewed.
Unmark PayPal Transaction Reviewed
Moves a reviewed PayPal transaction back to `unmatched`, so it counts as needing review again.
List PayPal Webhook Events
Lists the webhook events PayPal has delivered to SKU.io for this workspace (all PayPal accounts), newest first, with their processing status. The raw event payload is not included here; use **Get PayPal Webhook Event**.
Get PayPal Webhook Event
Returns one stored PayPal webhook event with its full raw `payload` exactly as PayPal sent it, plus processing status, error and attempt count. Fields are the same as in **List PayPal Webhook Events**.
Replay PayPal Webhook Event
Queues a stored PayPal webhook event to be processed again, e.g. a `failed` event after the underlying problem was fixed. Processing runs in the background; poll **Get PayPal Webhook Event** for the new `status` and `attempts`.
Get Public Pay Page
Returns what the pay page shows the buyer for a PayPal pay link, and the settings it needs to load PayPal's JavaScript SDK.
Create Public Pay Page Checkout
Creates a PayPal order for the pay link's amount and returns its id. The pay page's PayPal button calls this from its `createOrder` callback, then the buyer approves the order in the PayPal window. The order carries the sales order or invoice number as its invoice id. No request body.
Capture Public Pay Page Payment
Captures the PayPal order the buyer just approved (from **Create Public Pay Page Checkout**) and records the payment on the sales order or invoice. The pay page calls this from its `onApprove` callback. No request body.
Receive PayPal Platform Webhook
**Called by PayPal, not by an integrator.** Receives webhook events for every merchant connected with **Connect with PayPal** through SKU.io's single partner webhook. No bearer token.
Receive PayPal Account Webhook
**Called by PayPal, not by an integrator.** Receives webhook events for one PayPal account connected with its own API keys. SKU.io subscribes this URL (the integration's `webhook_url`) on the merchant's PayPal REST app when the keys are saved. No bearer token.