Skip to main content
The SDK is a container and an event relay. It does not render card input or carry card data; capture happens on the provider’s own surface. Building in React Native? Use the React Native SDK instead; it wraps this one.

Install

Swift Package Manager. In Xcode: File → Add Package Dependencies…, paste the repository URL and add the MeldSDK library to your app target.
CocoaPods.
Then import MeldSDK.

Create the order on your backend

The order comes from your server. Your API key never ships in the app binary. See Cards or Apple Pay for the request.

Mount the order

Apple Pay uses the same call with an applePay: argument — see Apple Pay. Keep the handle until the user finishes paying. Releasing it tears the surface down, and handle.unmount() does the same on demand.

Events

The five events covers what each one means, and how onCancel and onError relate to the status.

Permissions

Providers that run KYC inside their surface need camera access. Declare NSCameraUsageDescription in your Info.plist with a string that explains the document and selfie capture, or that step fails silently for the user. Apple Pay needs the Apple Pay capability on your target, with the merchant identifier you registered. See Apple Pay.

Settlement

Settlement is your webhook. onPaymentSubmitted fires when the user finishes paying, which is earlier: unmount and show a pending state until the webhook arrives. See Configure webhooks.