Install
Swift Package Manager. In Xcode: File → Add Package Dependencies…, paste the repository URL and add the MeldSDK library to your app target.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
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. DeclareNSCameraUsageDescription 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.