BaaS Card management

Freeze Card

Unfreeze card

Terminate Card

Update card limits

The main limits categories are:

  • “purchases” – purchases in POS
  • “internetPurchases” – online purchases
  • “contactlessPayments” – contactless payments in POS
  • “withdrawals” – cash withdrawals from ATM
  • “overallLimits” – these limits override all above-mentioned limits. Other limits can’t be higher than “overallLimits”
  • “availableAmount” – how much of the limits is still available
  • “usedAmount” – how much of the limit is already used

Change PIN (only for ChipAndPin)

Sample Program to encrypt PIN:

package com.connectpay.card.crypto.utils;

import java.nio.charset.StandardCharsets;
import java.security.KeyFactory;
import java.security.PublicKey;
import java.security.spec.MGF1ParameterSpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;

import javax.crypto.Cipher;
import javax.crypto.spec.OAEPParameterSpec;
import javax.crypto.spec.PSource;

public class EncryptionProcess {

    public static void main(String[] args) throws Exception {
        // Create a KeyFactory instance with RSA algorithm
        KeyFactory kf = KeyFactory.getInstance("RSA");

        // Need to use different Public key string for PROD and NONPROD
        String pubString = "publicKeyProvidedByConnectPayRepresentative";

        // Decode the public key string from Base64
        byte[] encodedPubKey = Base64.getDecoder().decode(pubString.getBytes(StandardCharsets.US_ASCII));

        // Create an X509EncodedKeySpec with the decoded public key bytes
        X509EncodedKeySpec keySpec = new X509EncodedKeySpec(encodedPubKey);

        // Generate the PublicKey object from the key spec
        PublicKey publicKey = kf.generatePublic(keySpec);

        // Generate the PIN to be encrypted
        String pinToEncrypt = "9825";

        // Encryption
        Cipher encryptCipher = Cipher.getInstance("RSA/ECB/OAEPPadding");

        // Specify the OAEP parameters (PIN, CVV2, CardNumber)
        OAEPParameterSpec oaepParams = new OAEPParameterSpec("SHA-256", "MGF1", new MGF1ParameterSpec("SHA-256"),
                new PSource.PSpecified("PIN".getBytes(StandardCharsets.US_ASCII)));

        // Initialize the encryption cipher with the public key and OAEP parameters
        encryptCipher.init(Cipher.ENCRYPT_MODE, publicKey, oaepParams);

        // Encrypt the PIN
        byte[] encryptedPin = encryptCipher.doFinal(pinToEncrypt.getBytes(StandardCharsets.UTF_8));

        // Encode the encrypted PIN in Base64 and format the message
        String encodeToString = Base64.getEncoder().encodeToString(encryptedPin);
        System.out.println("EncodeToString: " + encodeToString);
        String encryptedPinBase64 = "-----BEGIN PIN MESSAGE-----\n" + encodeToString + "\n-----END PIN MESSAGE-----";

        // Print the Base64 encoded encrypted PIN
        System.out.println("encryptedPin:" + Base64.getEncoder().encodeToString(encryptedPinBase64.getBytes()));
    }

}

Update Card Security settings

  • “contactlessPayments” – contactless payments are on/off
  • “withdrawals” – withdrawals are on/off
  • “internetPurchases” – internet purchases are on/off
  • “overallPurchases” – if the overall purchases setting is on, then “overallLimits” will apply. Please check Update card limits API

Update Card 3DS security settings

Personal onboarding

Accounts using BaaS

Card creation

Card details & transactions

Scroll to Top