PayPal

Configure PayPal payment provider with Omnium for online payments.

PayPal Integration with Omnium

Omnium supports PayPal for payment processing with the following features:

  • Authorize payments via PayPal checkout
  • Capture payments (full or partial)
  • Cancel payments / void authorization
  • Credit/Refund payments with multi-capture support

Setup Instructions

Configuration Path

  1. Navigate to: Configuration > Settings > Payment > Payment Types > "..." > Add

  2. Fill out the required fields as outlined below.


Required Fields

FieldDescriptionValue
Unique Payment NameThe unique identifier for the PayPal payment method.PayPal
Payment ServiceThe name of the payment service used for this configuration.PayPal
Provider NameSpecifies which provider to use.PayPal
Display NameThe name shown in the Omnium interface.PayPal or your preferred name
Client IDYour PayPal OAuth 2.0 Client ID.Your Client ID from PayPal Developer Portal
API TokenYour PayPal API Secret/Token.Your Secret from PayPal Developer Portal
Base URLEnvironment selector.sandbox or production
Vue TemplateThe template for payment method integration.paypal-payment

Environment Configuration

Base URL ValueEnvironmentDescription
sandboxSandbox/TestFor development and testing
productionLiveFor production transactions

Additional Configuration

SettingDescriptionDefault
Display in CartShow PayPal as a payment option in the cart interface.false
Authorization Time In DaysDefault authorization expiration time in days.-
Valid On MarketsRestrict to specific markets. Leave empty for all.All markets
Valid For StoresRestrict to specific stores. Leave empty for all.All stores

Supported Operations

OperationSupportedNotes
AuthorizeYesVia PayPal checkout button
CaptureYesFull or partial capture
Partial CaptureYesMultiple captures supported
CancelYesVoid authorization
RefundYesWith multi-capture tracking
Partial RefundYesDistributed across captures
Get DetailsNoNot implemented

Special Features

Multi-Capture Refund Support

PayPal integration includes sophisticated handling for refunds across multiple partial captures:

How it works:

  1. When an order has multiple partial captures, the system tracks each capture separately
  2. Refunds are distributed across captures based on available credit per capture
  3. The system tracks how much has been credited from each capture

Example:

  • Order total: $100
  • Capture 1: $50 (first shipment)
  • Capture 2: $50 (second shipment)
  • Customer requests $60 refund
  • System refunds: $50 from Capture 1, $10 from Capture 2

Tracking:

  • Each capture's credited amount is tracked in payment properties
  • Partial refund success is reported when full amount cannot be credited

Final Capture Flag

When capturing the full remaining authorized amount, the system automatically sets the "final capture" flag, which:

  • Releases any remaining authorization
  • Signals to PayPal that no more captures will be made

Payment Flow

  1. Customer Checkout - PayPal button displayed in checkout
  2. Authorization - Customer authorizes payment in PayPal
  3. Order Created - Authorization ID and Payment ID stored
  4. Capture - When order is ready for fulfillment
  5. Refund - Through returns workflow if needed

Amount Handling

PayPal requires amounts formatted as decimal strings with two decimal places:

Internal AmountPayPal Format
100.50"100.50"
250.00"250.00"
99.99"99.99"

Omnium handles the formatting automatically.


Error Handling

PayPal errors are displayed on the order in the Errors section.

Common Errors

ErrorPossible CauseSolution
Authentication failedInvalid Client ID or API TokenVerify credentials in PayPal Developer Portal
Capture failedAuthorization expired or invalidCheck authorization status
Void failedPayment already capturedUse refund instead of cancel
Partial refund failedInsufficient captured amountVerify capture amounts before refunding

Partial Refund Warning

If the full refund amount cannot be credited across all captures, the system returns a partial success with message:

"Failed to credit complete amount. Only credited: [amount]"


Checkout Integration

PayPal checkout uses the PayPal Checkout button with authorization intent:

  1. PayPal button rendered in checkout page
  2. Customer clicks and authorizes in PayPal popup
  3. Authorization ID returned to Omnium
  4. Order created with payment reference

Configuration Reference

Payment Service

PayPal

Environment Values

  • sandbox - Test environment
  • production - Live environment

API Library

PayPal SDK v2.0 (BraintreeHttp)

Supported Currencies

All currencies supported by PayPal