On this page
No Headings
Last updated: September 14, 2026
The SDK ships PayPal-branded buttons: PayPalButton, PayPalPayLaterButton, and PayPalCreditButton, all part of the PaymentButtons product. Use these rather than building your own: they carry PayPal's wordmark, brand colors, typography through the PayPalOpen font, and accessibility. This guide covers adding, styling, and wiring a button.
Before you begin
Complete Install and set up.
The button renders without an order or session.
SwiftUI
PayPalButton.Representable(color: .gold, size: .collapsed, label: .checkout) {
beginCheckout()
}UIKit
let payPalButton = PayPalButton(color: .gold, size: .collapsed, label: .checkout)
payPalButton.addTarget(self, action: #selector(beginCheckout), for: .touchUpInside)All customization is passed to the initializer (PayPalButton.Representable in SwiftUI, PayPalButton in UIKit):
| Parameter | Values | Default |
|---|---|---|
color | PayPalButton.Color: .gold, .blue, .white, .black, .silver | .gold |
label | PayPalButton.Label?: .none, .checkout, .buyNow, .payWith | nil (wordmark only, same as .none) |
edges | PaymentButtonEdges (defaults to .softEdges) | .softEdges |
size | PaymentButtonSize: .mini, .collapsed, .expanded, .full | .collapsed |
insets | NSDirectionalEdgeInsets? (padding around the content) | nil |
Notes:
.gold is the recommended default. PayPal's research shows it converts best. .blue is the preferred alternative. .white, .black, and .silver are secondary..white renders with a border for contrast.PayPalPayLaterButton or PayPalCreditButton.In SwiftUI the trailing closure is your tap handler. In UIKit use addTarget. Start checkout from it:
func beginCheckout() {
// prepare the session, create the order, call start()
}The button sets its own accessibility label, combining the label text and wordmark, so VoiceOver announces it correctly. Ensure adequate contrast against its background and a large enough touch target.