---
title: PaymentMethodBinding
framework: storekit
role: symbol
role_heading: Structure
path: storekit/paymentmethodbinding
---

# PaymentMethodBinding

A binding that makes payment methods available in apps for an Apple Account.

## Declaration

```swift
struct PaymentMethodBinding
```

## Overview

Overview This functionality is available only to eligible apps with server entitlements. The initializer init(id:) throws an error if your app doesn’t have the appropriate entitlement to use this API, or if the user isn’t eligible. important: The init(id:) and bind() methods may display a system prompt that asks users to authenticate with their Apple Account. Call these methods only after an explicit user action, like tapping or clicking a button. Initialize this structure using the in-app binding identifier that your server receives from the Apple server when your server initiates payment method binding. Call the bind() method to prompt users to confirm adding the payment method and making it their primary payment method.

## Topics

### Determining eligiblity

- [init(id:)](storekit/paymentmethodbinding/init(id:).md)

### Creating and identifying bindings

- [id](storekit/paymentmethodbinding/id.md)

### Binding payment methods

- [bind()](storekit/paymentmethodbinding/bind().md)

### Reading errors

- [PaymentMethodBinding.PaymentMethodBindingError](storekit/paymentmethodbinding/paymentmethodbindingerror.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Identifiable](swift/identifiable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
