<!--
{
  "availability" : [
    "iOS: 16.4.0 -",
    "iPadOS: 16.4.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/PaymentMethodBinding/init(id:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "s:8StoreKit20PaymentMethodBindingV2idACSS_tYaKcfc"
  },
  "title" : "init(id:)"
}
-->

# init(id:)

Creates the payment method binding for eligible apps and users.

```
init(id: String) async throws
```

## Parameters

`id`

The in-app binding identifier that your server receives from the Apple server when your server initiates payment method binding.

## Discussion

This method succeeds if the app is entitled to use this API, the `id` is valid and unexpired, and the user is eligible. Otherwise, it throws an error. See [`PaymentMethodBinding.PaymentMethodBindingError`](/documentation/StoreKit/PaymentMethodBinding/PaymentMethodBindingError) and [`StoreKitError.userCancelled`](/documentation/StoreKit/StoreKitError/userCancelled) for the error information.

This method determines if the user is eligible, and requires that they’re signed in to the App Store.

> Important:
> This method may display a system prompt that asks users to sign in with their Apple Account. Call this method only after an explicit user action, like tapping or clicking a button.

Note that it’s possible that the system determines a user isn’t eligible after it prompts for authentication.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)