Verify Payments iOS SDK
Instant bank payments. Get paid directly to your bank account. No cards needed.
Credit cards have notoriously low penetration in the Middle East region, with 80% of consumers opting to pay with cash instead.
Verify is digital cash; it is as good as getting paid in cash, but without having to handle the physical notes yourself.
We've integrated with the largest retail banks in the UAE and Bahrain, so you don't have to. Just integrate with the Verify API once, and you'll get access to all of the financial institutions on the Verify network. What's more is, as more banks join the network, you'll automatically get access to them with no extra work!
Before you start you need to sign up for a Verify Payments account here and get API keys for the SDK following the instructions.
Install the SDK usinn CocoaPods by adding the following pod to your Podfile:
pod 'VerifyPayments', :git => 'https://github.com/verifyas/ios-sdk.git'
You can also install the SDK using Carthage by adding the following statement to your Cartfile:
github "verifyas/ios-sdk"
To commit a payment, a Session needs to be created. It represents a connection with a customers bank account.
PaymentConfig needs to be created and set up with your public API key and the id of the Session from above.
let config = PaymentConfig(publicKey: "pk_test_nszn8hH3uXe6d7FvwU1MpwO6cmEh1lyO", sessionId: "ses_lgoKDnEo3WvM")
You also need to provide the handlers for the payment events.
let handler = PaymentHandler(
onComplete: { transfer in
print("💵✅ VerifyPayments finished: \(transfer)")
},
onError: { error in
print("💵❌ VerifyPayments failed: \(error)")
},
onClose: {
print("💵ℹ️ VerifyPayments closed")
}
)
See PaymentError for more information about possible errors.
Now everything is set up to show the payment form to a user.
let payment = VerifyPayments(config: config, handler: handler)
payment.show()
After successful payment a wrapper of a Transfer object will be passed to onComplete
handler.
See a demo view controller for a more detailed example.