Tilopay.getCardType()
SDK 2.1.1Returns the card brand from the number the customer already typed into tlpy_cc_number (or
from the saved card they picked). The typical use is showing the brand icon.
Signature#
await Tilopay.getCardType()It takes no parameters.
Precondition: the customer must have already typed the card number or picked a saved card.
Call#
const type = await Tilopay.getCardType();Response#
{
"message": "visa"
}The card brand, in lowercase. If the brand is not recognized, it is empty.
Brand values#
| Status | Values |
|---|---|
| Supported | visa, mastercard, amex |
| Not supported | elo, visaelectron, maestro, forbrugsforeningen, dankort, hipercard, dinersclub, discover, unionpay, jcb, laser |
Use the result for presentation only: brand validation happens when Tilopay processes the charge, not in this method.
Last verified: 2026-10-21