Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

@Getter
@Setter
@Document(collection = "accountCustomerLinks")
public class AccountToCustomerLinking {

  @Id
  private String id;

  @NotNull(message="account number is mandatory")
  private String accountNumber;

  @NotNull(message="customer number is mandatory")
  private String customerNumber;

  @NotNull(message="qualification is mandatory")
  private String qualification;

  @NotNull(message="organization number is mandatory")
  private String organizationNumber;

  @NotNull(message="customer type indicator is mandatory")
  private Integer customerTypeIndicator;

  @NotNull(message="foreign use indicator is mandatory")
  private Integer foreignUseIndicator;

  private String expirationDate;

  private String status;
}

Data Structure for Card Mirror

Jira Legacy
serverSystem Jira
serverId08c95066-e26d-357f-9c44-10e77235956c
keySPMS-71

Fiserv - Card endpoint list:

  • Create a Card POST /cards/embosser

  • Link Card PUT /account/prepaid

  • Card Activation PUT /cards/activation

  • Block Card PUT /cards/embosser/block

  • Block/Unblock (pin) PUT /cards/pin/status

  • Update Card Pin PUT /cards/pin

  • Get Security Code Detail POST /cards/pin/security-codes

  • Invalid Attemps POST /cards/pin/invalid-attemps

  • Get Credit Card Info POST /cards/embosser/card-pan

Create a Card

Source

  • Fiserv endpoint: /cards/embosser

  • Class: FiservRepository

  • Service: createCard

Request

Code Block
languagejava
public class CardRequestDTO { 

    private String addressLine1; 

    private String addressLine2; 

    private AssignedSpendingLimitsDTO assignedSpendingLimits; 

    private int atmCashAmount; 

    private int atmCashNumber; 

    private int atmCashSingleTransactionLimit; 

    private String authorizationCriteriaTableNumber; 

    private String authorizationSpendingLimitTable; 

    private String blockCode; 

    private int branchNumber; 

    private int cardAction; 

    private String cardActionReasonCode; 

    private int cardDelayDays; 

    private String cardNumber; 

    private int cardSequence; 

    private String cardholderAffiliationGroupId; 

    private String cardholderFlag; 

    private String city; 

    private String currentCardActivation; 

    private String customerNumber; 

    private int deliveryOption; 

    private String deviceIndicator; 

    private String embossedName1; 

    private String embossedName2; 

    private String enrollmentStatusVBV; 

    private String expirationDate; 

    private int firstIssueBranch; 

    private int internetPurchaseAmount; 

    private int internetPurchaseNumber; 

    private int internetPurchaseSingleTransactionLimit; 

    private String languageCode; 

    private int maximumAuthorizationFrequency; 

    private String name1; 

    private int name1TypeIndicator; 

    private String name2; 

    private int name2TypeIndicator; 

    private String nextCardExpirationDate; 

    private int numberOfCardsRequested; 

    private int organizationNumber; 

    private int overTheCounterCashAmount; 

    private int overTheCounterCashNumber; 

    private int overTheCounterCashSingleTransactionLimit; 

    private int pinMailerDelayDays; 

    private int pinOffset; 

    private int pinSuppression; 

    private String plasticId; 

    private int posServiceCode; 

    private String postToAccount; 

    private int postalCode; 

    private int processType; 

    private int programId; 

    private int reissueDeliveryOption; 

    private String requestedCardType; 

    private int retailPurchaseAmt; 

    private int retailPurchaseNumber; 

    private int retailPurchaseSingleTransactionLimit; 

    private int securedCodeActivate; 

    private String stateOrProvince; 

    private String typeCardMailer; 

    private String typeOfCard; 

    private int user1; 

    private int user2; 

    private int user3; 

    private int user4; 

    private int user5; 

    private int user6; 

    private int user7; 

    private int user8; 

    private String userDate1; 

    private String userDate2; 

    private String vbvPassword; 

    private String visaMiniIndicator; 

    private String visaPlusIndicator; 

}

Response

Code Block
languagejava
public class AddCardResponseDTO { 

    private String panToken; 

} 

Link Card

Source

  • Fiserv endpoint: /account/prepaid

  • Class: FiservRepository

  • Service: linkCardToAccount

Request

Code Block
languagejava
public class CardToAccountLinkingRequestDTO { 

    private String cardNumber; 

    private Integer cardholderType; 

    private String customerOrAccountNumber; 

} 

Response

Code Block
languagejava
public class CardToAccountLinkingResponseDTO { 

    private String cardNumber; 

    private String customerOrAccountNumber; 

} 

Card Activation

Source

  • Fiserv endpoint: /cards/activation

  • Class: FiservRepository

  • Service: activateCard

Request

Code Block
languagejava
public class CardActivationRequestDTO {
  @NotNull(message = "userId is required") 
  private String userId; 

  @NotNull(message = "panToken is required") 
  @Size(min = 12, max = 19, message = "panToken length must be between 12 and 19") 
  private String panToken; 
  
  @NotNull(message = "cardNumber is required") 
  @Size(min = 12, max = 19, message = "cardNumber length must be between 12 and 19") 
  private String cardNumber; 
  
  private OxxoStoreDTO oxxoStoreDTO; 
}

public class OxxoStoreDTO {
  @NotBlank private String id;
  @NotBlank private String place;
  @NotBlank private String store;
  private String storeName;
  private String stateName;
  private String oxxoStoreStateCode;
  private String colony;
  private String municipality;
  private String city;
  private Integer postalCode;
  @NotNull
  @Min(value = -90)
  @Max(value = 90)
  private Double latitud;
  @NotNull
  @Min(value = -180)
  @Max(value = 180)
  private Double longitud;
  @NotNull
  private Integer affiliationNumber;
} 

Response

Code Block
languagejava
public class CardActivationResponseDTO {
  private String cardNumber; 
}

Block Activation

Source

  • Fiserv endpoint: /cards/embosser/block

  • Class: FiservRepository

  • Service: blockCard

Request

Code Block
languagejava
public class CardBlockingRequestDTO { 
  @NotBlank(message = "userId is Required") 
  private String userId; 

  @NotNull(message = "blockingReason is required") 
  private BlockingReason blockingReason; 
}

public enum BlockingReason {
  FROZEN("A", true),
  GUARDIAN("B"),
  DECEASED("D"),
  VOLUNTARY_CANCELLATION("C"),
  LOST("L"),
  STOLEN("S"),
  DAMAGED("E"),
  FRAUD("F", true),
  MISHANDLING("V"),
  ACCOUNT_WITHOUT_CARD("X"),
  PREVENTIVE("Y");

  private String fiservBlockCode;
  private boolean unblockable;

  BlockingReason(String fiservBlockCode) {
      this(fiservBlockCode, false);
  }

  public static BlockingReason resolveFromFiservCode(String fiservCode){
    return Arrays.stream(values()).filter(blockingReason -> blockingReason.fiservBlockCode.equals(fiservCode)).findAny().orElse(null);
  }
}

Response

Code Block
languagejava
public class CardBlockingResponseDTO {
  private String name;
}

Block/Unblock

Source

  • Fiserv endpoint: /cards/pin/status

  • Class: FiservRepository

  • Service: activateCard

Request

Code Block
languagejava
public class FiservCardPinBlockUnblockRequestDTO {
  private String cardNumber;
  private Integer cardSequenceNumber;
  private String channel;
  private Integer organizationNumber;
  private String serviceFunctionCode;
}

Response

Code Block
languagejava
public class FiservCardPinBlockUnblockResponseDTO {
  private String cardNumber;
  private Integer cardSequenceNumber;
}

Update Card Pin

Source

  • Fiserv endpoint: /cards/pin

  • Class: FiservRepository

  • Service: activateCard

Request

Code Block
languagejava
public class FiservCardPinUpdateRequestDTO {
  private String cardNumber;
  private String channel;
  private String keyAssociationNumber;
  private String newPinBlock;
  private Integer organizationNumber;
}

Response

Code Block
languagejava
public class FiservCardPinUpdateResponseDTO {
  private String cardNumber;
}

Get Security Code Detail

Source

  • Fiserv endpoint: /cards/pin/security-codes

  • Class: FiservRepository

  • Service: activateCard

Request

Code Block
languagejava
public class SecurityCodeDetailsRequestDTO extends AbstractFiservBaseRequest {
    private String cardNumber;
    private String channel;
    private String keyAssociation;
}

Response

Code Block
languagejava
public class SecurityCodeDetailsResponseDTO {
    private String pinEncrypt;
}

Invalid Attemps

Source

  • Fiserv endpoint: /cards/pin/invalid-attemps

  • Class: FiservRepository

  • Service: activateCard

Request

Code Block
languagejava
public class PinInvalidAttemptsRequestDTO {
    private String cardNumber;
    private int cardSequenceNumber;
}

Response

Code Block
languagejava
public class PinInvalidAttemptsResponseDTO {
  private PinInvalidAttemptsOutputAreaDTO outputArea;
} 

public class PinInvalidAttemptsOutputAreaDTO {
  private String cardNumber;
  private int cardSequenceNumber;
  private int cardInvalidPinTries;
  private String cardInvalidPinTryDate;
  private int maxNumberInvalidPinTries;
  private String exceededInvalidPinTries;
  private String blockedIndicator;
}

Get Credit Card Info

Source

  • Fiserv endpoint: /cards/embosser/card-pan

  • Class: FiservRepository

  • Service: activateCard

Request

Code Block
languagejava
public class FiservCardRequestDTO extends AbstractFiservBaseRequest {
  private Integer cardSequence;
  private String functionType;
  private String cardNumber;

  public enum FunctionType {
    CARD_NUMBER("C"),
    PAN_TOKEN("P");
    
    private String type;
    
    FunctionType(String type) {
      this.type = type;
    }

    public String getValue() {
      return type;
    }
  }
}

Response

Code Block
languagejava
public class FiservCardResponseDTO {
    private Integer organizationNumber;
    private Integer logo;
    private String cardNumber;
    private String accountNumber;
    private Integer cardSequence;
    private String panToken;
}

Target (MongoDB Schema)

  • Collection Name: cards

Schema

Code Block
languagejs
db.createCollection("cards",{
validator: {
  $jsonSchema: {
    bsonType: "object",
    description: "Card object collection",
    required: [],
    properties: {
      "addressLine1": {
        bsonType: "string",
        description: "addressLine1"
      },
      "addressLine2": {
        bsonType: "string",
        description: "addressLine2"
      },
      "atmCashAmount": {
        bsonType: "int",
        description: "atmCashAmount"
      },
      "atmCashNumber": {
        bsonType: "int",
        description: "atmCashNumber"
      },
      "atmCashSingleTransactionLimit": {
        bsonType: "int",
        description: "atmCashSingleTransactionLimit"
      },
      "authorizationCriteriaTableNumber": {
        bsonType: "string",
        description: "authorizationCriteriaTableNumber"
      },
      "authorizationSpendingLimitTable": {
        bsonType: "string",
        description: "authorizationSpendingLimitTable"
      },
      "blockCode": {
        bsonType: "string",
        description: "blockCode"
      },
      "branchNumber": {
        bsonType: "int",
        description: "branchNumber"
      },
      "cardAction": {
        bsonType: "int",
        description: "cardAction"
      },
      "cardActionReasonCode": {
        bsonType: "string",
        description: "cardActionReasonCode"
      },
      "cardDelayDays": {
        bsonType: "int",
        description: "cardDelayDays"
      },
      "cardNumber": {
        bsonType: "string",
        description: "cardNumber"
      },
      "cardSequence": {
        bsonType: "int",
        description: "cardSequence"
      },
      "cardholderAffiliationGroupId": {
        bsonType: "string",
        description: "cardholderAffiliationGroupId"
      },
      "cardholderFlag": {
        bsonType: "string",
        description: "cardholderFlag"
      },
      "city": {
        bsonType: "string",
        description: "city"
      },
      "currentCardActivation": {
        bsonType: "string",
        description: "currentCardActivation"
      },
      "customerNumber": {
        bsonType: "string",
        description: "customerNumber"
      },
      "deliveryOption": {
        bsonType: "int",
        description: "deliveryOption"
      },
      "deviceIndicator": {
        bsonType: "string",
        description: "deviceIndicator"
      },
      "embossedName1": {
        bsonType: "string",
        description: "embossedName1"
      },
      "embossedName2": {
        bsonType: "string",
        description: "embossedName2"
      },
      "enrollmentStatusVBV": {
        bsonType: "string",
        description: "enrollmentStatusVBV"
      },
      "expirationDate": {
        bsonType: "string",
        description: "expirationDate"
      },
      "firstIssueBranch": {
        bsonType: "int",
        description: "firstIssueBranch"
      },
      "internetPurchaseAmount": {
        bsonType: "int",
        description: "internetPurchaseAmount"
      },
      "internetPurchaseNumber": {
        bsonType: "int",
        description: "internetPurchaseNumber"
      },
      "internetPurchaseSingleTransactionLimit": {
        bsonType: "int",
        description: "internetPurchaseSingleTransactionLimit"
      },
      "languageCode": {
        bsonType: "string",
        description: "languageCode"
      },
      "maximumAuthorizationFrequency": {
        bsonType: "int",
        description: "maximumAuthorizationFrequency"
      },
      "name1": {
        bsonType: "string",
        description: "name1"
      },
      "name1TypeIndicator": {
        bsonType: "int",
        description: "name1TypeIndicator"
      },
      "name2": {
        bsonType: "string",
        description: "name2"
      },
      "name2TypeIndicator": {
        bsonType: "int",
        description: "name2TypeIndicator"
      },
      "nextCardExpirationDate": {
        bsonType: "string",
        description: "nextCardExpirationDate"
      },
      "numberOfCardsRequested": {
        bsonType: "int",
        description: "numberOfCardsRequested"
      },
      "organizationNumber": {
        bsonType: "int",
        description: "organizationNumber"
      },
      "overTheCounterCashAmount": {
        bsonType: "int",
        description: "overTheCounterCashAmount"
      },
      "overTheCounterCashNumber": {
        bsonType: "int",
        description: "overTheCounterCashNumber"
      },
      "overTheCounterCashSingleTransactionLimit": {
        bsonType: "int",
        description: "overTheCounterCashSingleTransactionLimit"
      },
      "pinMailerDelayDays": {
        bsonType: "int",
        description: "pinMailerDelayDays"
      },
      "pinOffset": {
        bsonType: "int",
        description: "pinOffset"
      },
      "pinSuppression": {
        bsonType: "int",
        description: "pinSuppression"
      },
      "plasticId": {
        bsonType: "string",
        description: "plasticId"
      },
      "posServiceCode": {
        bsonType: "int",
        description: "posServiceCode"
      },
      "postToAccount": {
        bsonType: "string",
        description: "postToAccount"
      },
      "postalCode": {
        bsonType: "int",
        description: "postalCode"
      },
      "processType": {
        bsonType: "int",
        description: "processType"
      },
      "programId": {
        bsonType: "int",
        description: "programId"
      },
      "reissueDeliveryOption": {
        bsonType: "int",
        description: "reissueDeliveryOption"
      },
      "requestedCardType": {
        bsonType: "string",
        description: "requestedCardType"
      },
      "retailPurchaseAmt": {
        bsonType: "int",
        description: "retailPurchaseAmt"
      },
      "retailPurchaseNumber": {
        bsonType: "int",
        description: "retailPurchaseNumber"
      },
      "retailPurchaseSingleTransactionLimit": {
        bsonType: "int",
        description: "retailPurchaseSingleTransactionLimit"
      },
      "securedCodeActivate": {
        bsonType: "int",
        description: "securedCodeActivate"
      },
      "stateOrProvince": {
        bsonType: "string",
        description: "stateOrProvince"
      },
      "typeCardMailer": {
        bsonType: "string",
        description: "typeCardMailer"
      },
      "typeOfCard": {
        bsonType: "string",
        description: "typeOfCard"
      },
      "user1": {
        bsonType: "int",
        description: "user1"
      },
      "user2": {
        bsonType: "int",
        description: "user2"
      },
      "user3": {
        bsonType: "int",
        description: "user3"
      },
      "user4": {
        bsonType: "int",
        description: "user4"
      },
      "user5": {
        bsonType: "int",
        description: "user5"
      },
      "user6": {
        bsonType: "int",
        description: "user6"
      },
      "user7": {
        bsonType: "int",
        description: "user7"
      },
      "user8": {
        bsonType: "int",
        description: "user8"
      },
      "userDate1": {
        bsonType: "string",
        description: "userDate1"
      },
      "userDate2": {
        bsonType: "string",
        description: "userDate2"
      },
      "vbvPassword": {
        bsonType: "string",
        description: "vbvPassword"
      },
      "visaMiniIndicator": {
        bsonType: "string",
        description: "visaMiniIndicator"
      },
      "visaPlusIndicator": {
        bsonType: "string",
        description: "visaPlusIndicator"
      },      }
  }
}