christmas sale

Flat 10% off on the purchase of any two apps or more. Use coupon code - FESTIVAL10

Grab It Now
Check Mobile App
Read now
Start a Project

Affirm Payment method in Swift

Save

In this article, we will learn how to integrate the Affirm payment method in Swift.

Affirm payment method allows user to pay the cost of the purchase in simple EMI’s.

If you are having a e-commerce based application you can integrate the Affirm payment method for the large amount purchases.

So lets begin with the article.

Overview of Affirm Payment method in Swift

Affirm checkout process involves selecting the payment method at the checkout.

Affirm SDK interacts with the merchant site, a checkout object is created and redirected to the Affirm server.

A checkout object contains the cart information. This opens a UI for the Affirm payments.

Setting up Affirm Payment method in Swift

If you have Cocoapods installed then you can use the below commands to get the SDK into your project.

Open your terminal and navigate to the project directory. Then run below commands.

A podfile will be opened in the TextEdit, add below code in the file.

Save the file and hit below command.

Now, the SDK will be installed in your project.

Affirm Checkout

You need to have a developer account with Affirm, from where you can check the sales of your product. Also you will get a PUBLIC KEY.

After that, use this public key in your AppDelegate inside the didFinishLaunchingWithOptions as

Do not forget to import the SDK on your ViewController

Now use collect the Shipping information from the checkout and use below code to initialze the checkout object.

After that, you will see the SDK response like below

Affirm Payment method in Swift

Conclusion

You can aditionally show the promotional message at your Product description page.

Use Promotional button to reflect the EMI options. For more details refer here

To read more articles please visit here.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

The support is fast and do everything in their power to make it perfect. If you need customization it's also done right away. I had massive research to select Mobikul and now I'm sure it was the right one.

Igor Souza

Igor Souza

Talk to Sales

Global

Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home