SDK Integration

SDK Integration

This article will guide you through the integration of a native payment experience in your mobile shop.

Accepting payment in your app involves 4 steps:

  1. Preparing checkout (configure with amount, currency and other information),
  2. Collecting shopper payment details,
  3. Creating and submitting transaction,
  4. Requesting payment result.

iOS and Android SDK provide tools to help you with steps 2 and 3.
For steps 1 and 4 you will need to communicate to your own backend API. These steps are not included in SDK API due to security reasons.

Demo app

You are welcome to get started with our demo application. You can start making test transactions without any efforts including setting up a server, we provide a test integration server for you. Please note, that it is configured for demo purposes only.

The demo app is provided along with SDK since version 2.5.0.

NOTE: Before running the application, make sure SDK files are copied to the demo app folder. Find more details in the readme.txt file.



Install the SDK

Set Up Your Server

To start working with our SDK, you should expose two APIs on your backend for your app to communicate with:

  • Endpoint 1: Creating a checkout ID,
  • Endpoint 2: Getting result of payment.

See detailed instruction in our guide "Set Up Your Server".


Request Checkout ID

Your app should request a checkout ID from your server. This example uses our sample integration server; please adapt it to use your own backend API.

Collect and validate shopper payment details

[Optional] Brand detection for card payments

The system is able to automatically detect the brand by analyzing credit card number. The feature can be activated in CheckoutGate Platform at 'Administration' -> 'Processing' -> 'Processing Settings' -> 'Activate automatic brand detection for missing brands of credit card accounts'.

Since the mSDK version 2.25.0 you can create without specifying a payment brand.
Use special constructor for it (sample below) or just pass empty string instead of payment brand in the standard constructor.

Submit a transaction

Get the Payment Status

Finally your app should request the payment status from your server (again, adapt this example to your own setup).


Testing

The sandbox environment only accepts test payment parameters.

You can find test values for credit cards and bank accounts in our Testing Guide.

Go to Production

1. Talk to your account manager to get the live credentials.