android-sdk-demo

SDK UI interaction

Mobile token

Main actors: Unlimint UI SDK, Merchant backend, Unlimint API
Goal: Get mobile token for further payments
Trigger: Request was sent to get mobile token
Precondition:

Postcondition: Merchant has had mobile token

Mobile token Interaction steps:

Successful case

1) Some process with payment was started in merchant application on Android device
2) Merchant backend sends request to api/mobile/token to obtaining mobile token using basic authentication to Unlimint API.
3) Unlimint API returns mobile token
4) Merchant backend provides mobile token to Merchant Host App
5) Merchant Host App stores mobile token

Unsuccessful case

1) Some process with payment was started in merchant application on Android device
2) Merchant backend sends request to api/mobile/token to obtaining mobile token using basic authentication to Unlimint API.
3) Unlimint API return error

Card binding

Main actors: User, Unlimint UI SDK, Merchant backend, Unlimint API
Goal: Get card token for futher payments
Trigger: Request was sent to get mobile token
Precondition:

Postcondition: Merchant has card token for further payments

Card binding Interaction steps:

Successful case

1) User initiates card data entry
2) Merchant Host Application call function bindNewCardForResult(). Type of binding data must be set ‘RECURRING’ for recurrent payments or ‘PAYMENT’ for payments with card token
3) Unlimint UI SDK shows form for entering card data
4) User enters card dats
5) Unlimint UI SDK sends Card binding request
6) Unlimint returns Authentication URL and payment Id
7) Unlimint UI SDK shows authentication page for user
8) User passes authentication successfully
9) Unlimint UI SDK shows result page. If Merchant wants to use own success page, then parameter showStatusScreen must be false.
10) Unlimint creates and reverses payment with minimum amount
11) Merchant backend sends GET request to api/payments/{transactionId}.
12) Unlimint API returns a card token in case of successful payment
13) Merchant backend provides card data to Merchant Host application
14) Merchant Host application saves a card token for future using

Unsuccessful case

1) User initiates card data entry
2) Merchant Host Application call function bindNewCardForResult(). Type of binding data must be set ‘RECURRING’ for recurrent payments or ‘PAYMENT’ for payments with card token
3) Unlimint UI SDK shows form for entering card data
4) User enters card dats
5) Unlimint UI SDK sends Card binding request
6) Unlimint returns Authentication URL and payment Id
7) Unlimint UI SDK shows authentication page for user
8) User does not pass authentication successfully
9) Result page with Decline is showed
10) Card token is not created

Payment with card token

Main actors: User, Unlimint UI SDK, Merchant backend, Unlimint API
Goal: Get card token for futher payments
Trigger: Request was sent to get mobile token
Precondition:

Postcondition: Merchant has card token for further payments
Card token Interaction steps:

Successful case

1) User initiates card payment
2) Merchant Host Application call function paymentForResult()
3) Unlimint UI SDK shows form for entering security code
4) User enters security code
5) Unlimint UI SDK sends payment request
6) Unlimint returns Authentication URL and payment Id
7) Unlimint UI SDK shows authentication page for user
8) User passes authentication successfully
9) Unlimint UI SDK shows result page. If Merchant wants to use own success page, then parameter showStatusScreen must be false.
10) Merchant backend sends GET request to api/payments/{transactionId}.
11) Unlimint API returns a card token in case of successful payment
12) Merchant backend have to send PATCH request /api/payments/{payment_id} to complete two-phase payment

Unsuccessful case

1) User initiates card payment
2) Merchant Host Application call function paymentForResult()
3) Unlimint UI SDK shows form for entering security code
4) User enters security code
5) Unlimint UI SDK sends payment request
6) Unlimint returns Authentication URL and payment Id
7) Unlimint UI SDK shows authentication page for user
8) User does not pass authentication successfully
9) Result page with Decline is showed

COF payments

Main actors: User, Unlimint Swift UI SDK, Merchant backend, Unlimint API
Goal: Get card token for further payments
Trigger: Request was sent to get mobile token
Precondition:

Postcondition:

COF payments Interaction steps:

Successful case

1) User initiates card payment
2) Merchant Host Application call function recurringForResult()
3) Unlimint UI SDK shows form for entering security code or full card data depending on request.
4) User enters card data
5) Unlimint UI SDK sends COF payment request. Merchant can choose SM or SA scheduled payments are used
6) Unlimint returns Authentication URL and payment Id
7) Unlimint UI SDK shows authentication page for user
8) User passes authentication successfully
9) Unlimint UI SDK shows result page. If Merchant wants to use own success page, then parameter skipStatusPages must be true.
10) Merchant backend sends GET request to api/payments/{transactionId}.
11) Unlimint API returns a status of payment, filing.is that can be used in next SM payments, subscription.id that can be used for managing of subscription in case of SA payments.

Unsuccessful case

1) User initiates card payment
2) Merchant Host Application call function recurringForResult()
3) Unlimint UI SDK shows form for entering security code or full card data depending on request.
4) User enters card data
5) Unlimint UI SDK sends COF payment request. Merchant can choose SM or SA scheduled payments are used
6) Unlimint returns Authentication URL and payment Id
7) Unlimint UI SDK shows authentication page for user
8) User does not pass authentication successfully
9) Result page with Decline is showed