Skip to content

verifyas/ios-sdk

Repository files navigation

pod v1.0.0 Carthage compatible

Instant bank payments. Get paid directly to your bank account. No cards needed.

Intro

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.

Simple API

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!

Getting Started

Before you start you need to sign up for a Verify Payments account here and get API keys for the SDK following the instructions.

Installation

Using CocoaPods

Install the SDK usinn CocoaPods by adding the following pod to your Podfile:

pod 'VerifyPayments', :git => 'https://github.com/verifyas/ios-sdk.git'

Using Carthage

You can also install the SDK using Carthage by adding the following statement to your Cartfile:

github "verifyas/ios-sdk"

Usage

1. Payment Session

To commit a payment, a Session needs to be created. It represents a connection with a customers bank account.

2. Payment Config

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")

3. Payment Handlers

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.

4. Show Form

Now everything is set up to show the payment form to a user.

let payment = VerifyPayments(config: config, handler: handler)
payment.show()

5. Payment Transfer

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.

About

Verify Payments iOS SDK

Resources

Stars

Watchers

Forks

Packages

No packages published