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

Add and customize the PayPal, Pay Later, and PayPal Credit buttons in your Android app.



The SDK ships PayPal-branded buttons you drop into your layout: `PayPalButton`, `PayLaterButton`, and `PayPalCreditButton`, all part of the `payment-buttons` module. 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/android/install-and-setup).

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

Declare the button in your layout. It renders without an order or session:

```xml
<com.paypal.android.paymentbuttons.PayPalButton
    android:id="@+id/payPalButton"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />
```

Or create it programmatically with `PayPalButton(context)`.

## Customize [#customize]

Set these in code or through the XML attribute. `PayPalButton` supports color, label, shape, and size.

| Property (code)      | XML attribute          | Values                                                                      | Default                                    |
| -------------------- | ---------------------- | --------------------------------------------------------------------------- | ------------------------------------------ |
| `color`              | `paypal_color`         | `PayPalButtonColor`: `GOLD`, `BLUE`, `WHITE`, `BLACK`, `SILVER`             | `GOLD`                                     |
| `label`              | `paypal_label`         | `PayPalButtonLabel`: `PAYPAL` (wordmark only), `CHECKOUT`, `BUY_NOW`, `PAY` | `PAYPAL`                                   |
| `shape`              | `payment_button_shape` | `PaymentButtonShape`: `ROUNDED`, `PILL`, `RECTANGLE`                        | `ROUNDED` (or your Material theme's shape) |
| `size`               | `payment_button_size`  | `PaymentButtonSize` (defaults to `MEDIUM`)                                  | `MEDIUM`                                   |
| `customCornerRadius` | none                   | `Float` (dp), an alternative to `shape` that cannot be combined with it     | none                                       |

```kotlin
payPalButton.color = PayPalButtonColor.GOLD
payPalButton.label = PayPalButtonLabel.CHECKOUT
payPalButton.shape = PaymentButtonShape.PILL
```

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 an outline 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 `PayLaterButton` or `PayPalCreditButton`. `PayLaterButton` shares `PayPalButton`'s color enum (`PayPalButtonColor`) and also exposes a `paylater_color` XML attribute. `PayPalCreditButton` has its own distinct enum, `PayPalCreditButtonColor` (`DARK_BLUE`, `BLACK`, `GOLD`, `WHITE`).

## Handle taps [#handle-taps]

Attach a click listener and start checkout from it:

```kotlin
payPalButton.setOnClickListener { beginCheckout() }
```

`beginCheckout()` prepares the session, creates the order, and calls `start()`.

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

`PayPalButton` and `PayPalCreditButton` set their own content description so screen readers announce them correctly. `PayLaterButton` does not set one, so add your own through `android:contentDescription` if you use it. The module ships English strings only today, with no localized string resources. Make sure your layout gives the button an adequate touch target and sufficient contrast against its background.

## See also [#see-also]

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