Cards
CardManager object needs to be obtained first to start working with cards:
val mercuryo: Mercuryo = Mercuryo.create(...)
val cardManager: CardManager = mercuryo.cardvar mercuryoSDK: IMercuryo = IMercuryo(isDebug: true, baseHost: "HOST_HERE")
var card = mercuryoSDK.cardList of cards
To get a list of linked cards, call the method:
cardManager.getCards(limit: Int, offset: Int): List<Card>mercuryoSDK.card.getCards(limit: 20, offset: 0) { cards, error in
//do some magic here
}
Adding card
Parameter
Description
holderName
Cardholder name
number
Number of card
cvv
CVV of card
expirationMonth
Expiration month
expirationYear
Expiration year
redirectUrl
URL where user will be redirected to after operation. Example: http://my.mercuryo.io/orders?invoice={invoice_id}
Removing card
To delete a card call the deleteCard method passing the card identifier.
Last updated
Was this helpful?