# Add and customize PayPal, Pay Later, and PayPal Credit buttons (/sdk/ios/add-payment-methods/payment-buttons)

Add and customize the PayPal-branded button family for iOS with PayPal Mobile SDK v3.0.0.



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.

> **Info:** Complete [Install and set up](/sdk/ios/install-and-setup).

## Add a button [#add-a-button]

The button renders without an order or session.

SwiftUI

```swift
PayPalButton.Representable(color: .gold, size: .collapsed, label: .checkout) {
    beginCheckout()
}
```

UIKit

```swift
let payPalButton = PayPalButton(color: .gold, size: .collapsed, label: .checkout)
payPalButton.addTarget(self, action: #selector(beginCheckout), for: .touchUpInside)
```

## Customize [#customize]

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.
* Stick to these built-in options rather than recoloring or rebuilding the button. They keep you brand-compliant.
* For Pay Later or PayPal Credit, use `PayPalPayLaterButton` or `PayPalCreditButton`.

## Handle taps [#handle-taps]

In SwiftUI the trailing closure is your tap handler. In UIKit use `addTarget`. Start checkout from it:

```swift
func beginCheckout() {
    // prepare the session, create the order, call start()
}
```

## Accessibility and localization [#accessibility-and-localization]

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.

## See also [#see-also]

* [PayPal Checkout](/sdk/ios/add-payment-methods/paypal-checkout): the checkout flow the button triggers, including order creation and result handling.
* [Troubleshooting](/sdk/ios/troubleshooting): diagnose common build and integration failures by symptom.
