How PayPal Checkout works
Integrate PayPal Checkout to securely accept online payments using various payment methods. Here’s a simplified explanation of how the payment lifecycle works.
What is an Order in PayPal?
Think of an Order as a request for payment. It represents the buyer's intent to purchase something.
- When a customer wants to buy something, your website creates an Order with PayPal.
- This order contains details about the purchase, such as the amount, currency, and items being purchased. It is like a ticket that says "I want to pay for this item."
- An order is a payment request.
- Creating an order itself doesn't move any money. It's the first step in the payment process.
The order lifecycle
Flow sequence overview
- Shopping Cart - Customer adds items and proceeds to checkout
- Create Order - Merchant creates a PayPal order via /v2/checkout/orders
- Approve Order - Customer is redirected to PayPal to approve the payment
- Order Approved - PayPal confirms the customer's approval
- Capture Order - Merchant server captures the approved via /v2/checkout/orders/
{id}
/capture - Order Complete - Transaction is completed and confirmation is displayed
1. Create order
- Your website sends a request to PayPal to create an order, specifying the purchase details, such as amount and currency.
- PayPal creates the order and returns an Order ID.
2. Buyer approves order
- The buyer is redirected to a PayPal page or a PayPal window on your site.
- The buyer logs in to their PayPal account or uses a guest checkout option if enabled.
- The buyer reviews the order details.
- The buyer selects one or more available payment methods as a funding source for the transaction.
- The buyer confirms the payment, granting approval.
Note: Guest checkout may not be available in all countries or for all transactions.
3. Capture payment
- After the buyer approves the order, your website sends a request to PayPal to capture the payment.
- "Capture" means PayPal transfers the money from the buyer's funding source to your account.
- The transaction is complete when the payment is captured.
What is authorize & capture?
Authorize & Capture is a payment flow where you authorize the payment first and capture it later. Use an authorization flow to check if the buyer can pay before accepting payment, or when you aren't immediately fulfilling the order.
How it works
- Authorize: You request authorization from PayPal to hold the buyer's funds. This verifies that the buyer has sufficient funds and places a temporary hold on the money.
- Capture: When you're ready to finalize the payment, such as when you ship the item, you send a capture request to PayPal. This moves the money from the buyer's funding source to your account.
Why use authorize and capture?
- Useful when you need to verify inventory, confirm shipping details, or handle pre-orders before taking the payment.
- It gives you more control over when the payment is finalized.
Flow sequence overview
- Order Creation: Merchant creates order with Intent=AUTHORIZE via /v2/orders/checkout and receives Order ID
- Buyer Interaction: Merchant redirects buyer to PayPal, displays payment options, awaits approval
- Order Approval: Buyer approves on "Review your Purchase page"; control returns to merchant
- Authorization: Merchant authorizes via /v2/checkout/orders/:order_id/authorize, placing 29-day hold on funds
- Capture: Merchant captures funds via /v2/payments/authorizations/:auth_id/capture anytime while authorization is valid
Payment buttons
PayPal offers Payment Buttons that dynamically present the most relevant payment methods to your buyers.
- These buttons display options like PayPal, Venmo, and major credit or debit cards.
- They adapt to the buyer's location and preferences, showing relevant payment methods, and potentially increasing conversion rates.
Payment methods
The buyer uses PayPal to select one or more of their available payment methods as a funding source for a transaction.
PayPal Checkout supports a variety of payment methods, including:
- PayPal balance
- Credit and debit cards
- Venmo (in the US)
- Local payment methods, such as iDEAL in the Netherlands or Bancontact in Belgium
Note: The available payment methods may vary depending on the buyer's location and your PayPal account settings.
Putting it all together
Let’s say you sell a T-shirt on your website:
- Create Order: Your site tells PayPal "This buyer wants to buy a T-shirt for $20."
- Approve: The buyer logs in to PayPal and clicks "Pay Now."
- Capture: Your site tells PayPal "OK, take the $20 now." PayPal moves the money to your account.
If you use Authorize & Capture:
- You authorize the $20 when the buyer approves the order.
- You capture the $20 when you ship the T-shirt.
Why does PayPal use this flow?
- It’s more secure for both you and your customer.
- You can confirm the buyer’s intent before taking money.
- You have control over when to finalize the payment.
Key terms
- Order: A request for payment; a promise or intent to pay.
- Approve: The buyer grants permission for the payment.
- Capture: Money is transferred from the buyer to the seller.
- Authorize: A temporary hold is placed on the buyer's funds, reserving the amount for a future capture.
- Payment buttons: Dynamic buttons that display relevant payment methods.
- Funding source: The payment method the buyer uses to fund the transaction, such as a PayPal balance, credit card, or bank account.
Summary
- Use PayPal Checkout to create an order, get buyer approval, and capture the payment.
- You can also use Authorize & Capture for delayed payments.
- Integrate Payment Buttons to help increase conversion by offering relevant payment methods.