🖥️For Developers
Fina Card API (BETA)
Fina Card has public API endpoints so you can integrate Fina Card in your dApp or Wallet UI, or use our API to analyse your spendings://api
Generating Signature
For each API method, you need to include a ADR-36 signature. The message required in each API method is different. Here is an Javascript example of using Keplr to generate the signature.
Encryption Key
As Fina needs to query the details of the Top Up transaction, which is encrypted on Secret Network, we need to know the encryption key used in the transaction so we can decrypt the message. Here is an example code to generate the encryption key.
API Methods
Get Account
Get user's Fina Card information and transactions
POST
https://api.card.fina.cash/getAccount
Request Body
signature*
String
Message to sign:
Fina Card: Sign In
address*
String
User's bech32 address
pubKey*
String
User's base64 encoded public key
chainId*
String
Chain ID
Get Sensitive Information
Get user's encrypted sensitive card information like full card number, CVV, 3DS password
POST
https://api.card.fina.cash/getSensitiveInfo
Request Body
signature*
String
Message to sign:
Fina Card: View Sensitive Information at {{ISO Timestamp}}
address*
String
User's bech32 address
pubKey*
String
User's base64 encoded public key
chainId*
String
Chain ID
timestamp*
String
ISO Timestamp, eg 2023-03-31T13:12:36.128Z
rsaPubKey*
String
A base64 encoded RSA public key used to encrypt the sensitive information
To decrypt the information, use the RSA key generated with scheme { hash: "sha256", label: "CardNumber" }
. Scheme label for each field is different.
Example:
Get Top Up Information
Get top up information like the price, fee, min and max top up amount, etc
POST
https://api.card.fina.cash/getTopupInfo
Request Body
signature*
String
Message to sign:
Fina Card: Sign In
address*
String
User's bech32 address
pubKey*
String
User's base64 encoded public key
chainId*
String
Chain ID
Change 3D Secure Settings
Change 3D Secure settings like mobile number and password
POST
https://api.card.fina.cash/change3DS
Request Body
signature*
String
Message to sign:
Fina Card: Change 3DS Settings at {{ISO Timestamp}}
address*
String
User's bech32 address
pubKey*
String
User's base64 encoded public key
chainId*
String
Chain ID
timestamp*
String
ISO Timestamp, eg 2023-03-31T13:12:36.128Z
password
String
New 3D Secure password
mobile
String
New 3D Secure mobile number
Toggle Block Card
Block or Unblock card transactions
POST
https://api.card.fina.cash/toggleBlockCard
Request Body
signature*
String
Message to sign:
Fina Card: Toggle Block Card at {{ISO Timestamp}}
address*
String
User's bech32 address
pubKey*
String
User's base64 encoded public key
chainId*
String
Chain ID
timestamp*
String
ISO Timestamp, eg 2023-03-31T13:12:36.128Z
Top Up
Top up card by sending token to the topupAddress
returned from /getTopupInfo
and call this API with the TX hash to increase card balance.
POST
https://api.card.fina.cash/topup
Request Body
signature*
String
Message to sign:
Fina Card: Sign In
address*
String
User's bech32 address
pubKey*
String
User's base64 encoded public key
chainId*
String
Chain ID
topupAsset*
String
Token symbol used to top up. eg, SCRT
currency*
String
Currency to top up the card. eg, EUR
txHash*
String
TX hash of your top up
encryptionKey*
String
Encryption key used to encrypt transaction on Secret Network
Create New Card
Create a new card for new user
POST
https://api.card.fina.cash/createCard
Request Body
signature*
String
Message to sign:
Fina Card: Sign In
address*
String
User's bech32 address
pubKey*
String
User's base64 encoded public key
chainId*
String
Chain ID
topupAsset*
String
Token symbol used in initial top up. eg, SCRT
currency*
String
Currency to top up the card. eg, EUR
txHash*
String
TX hash of your initial top up
name*
String
Name on your card
mobile*
String
3D Secure mobile number
password*
String
3D Secure password
encryptionKey*
String
Encryption key used to encrypt transaction on Secret Network
Last updated