Versions Compared

Key

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

...

Version

Major Changes

Doc

v1.0

  • Initial data structure

View file
nameMirrorAccount_DataStructure_v1.0.pdf

v1.1

  • Deleted endpoints

  • Fields deleted for account details

View file
nameMirrorAccount_DataStructure_v1.1.pdf

v1.2

  • Deleted endpoints

  • Document restructuring

  • New blocksBy field

View file
nameMirrorAccount_DataStructure_v1.2.pdf

For more details on the changes made, please refer to the changelog file.

...

View file
nameChangelog.pdf

Source

Fiserv - Account endpoint list

Target

Account Details

Source

  • Fiserv endpoint: GET /account/details

  • Class: FiservRepository

  • Service: getAccountDetails

...

Code Block
languagejava
public class AccountDetailsRequestDTO {
  
    private String organizationNumber;
  
    private String accountNumber;
}

Target (MongoDB)

...

Collection name: accountDetails

...

Account Block Code

Source

  • Fiserv endpoint: POST /account/block-code

  • Class: FiservRepository

  • Service: setAccountBlockCode

Response:

Code Block
language

...

java
public class AccountBlockUnblockResponseDTO {

...


...

 

...

Index

Code Block
languagejson
db.accountDetails.createIndex({accountDataKey: 1});

Target (Java)

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 = "accountDetails")
public class AccountDetail {

  @Id
  private String id;

  private AccountDataKey accountDataKey;

  private AccountData accountData;
}
Code Block
languagejava
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.mongodb.core.mapping.Document;

@Getter
@Setter
@Document
public class AccountData {

  private String customerNumber;

  private String blockCode1;

  private String blockCode1Date;

  private String blockCode2;

  private String blockCode2Date;
}
Code Block
languagejava
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotNull;
import org.springframework.data.mongodb.core.mapping.Document;

@Getter
@Setter
@Document
public class AccountDataKey {

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

Account Block Code

Source

  • Fiserv endpoint: POST /account/block-code

  • Class: FiservRepository

  • Service: setAccountBlockCode

Response:

Code Block
languagejava
public class AccountBlockUnblockResponseDTO {

  private String functionCode;

  private String accountNumber;

  private String blockCode1Local;

  private Integer localOrganization;
}

Request

Code Block
languagejava
public class AccountBlockUnblockRequestDTO extends AbstractAccountFiservBaseRequest {

  private String blockCode;

  private Integer blockCodeIndicator;

  private Integer foreignUse;

  private String functionCode;
}
Code Block
languagejava
public abstract class AbstractAccountFiservBaseRequest extends AbstractFiservBaseRequest {

  protected String accountNumber;
}
Code Block
languagejava
public abstract class AbstractFiservBaseRequest {

  @Builder.Default
  protected String organizationNumber = "950";
}

Target (MongoDB)

  • Collection name: blockUnblockAccounts

  • Schema:

    Code Block
    languagejson
    db.createCollection("blockUnblockAccounts", {
    	validator: {
    		$jsonSchema: {
    			bsonType: "object",
    			title: "Block Unblock Accounts Object Validation",
    			required: ["accountBlockUnblockKey.accountNumber", "accountBlockUnblockKey.blockCode"
    				, "accountBlockUnblockKey.blockCodeIndicator", "accountBlockUnblockKey.foreignUse", "accountBlockUnblockKey.functionCode", "accountBlockUnblockKey.organizationNumber"],
    			properties: {
    				accountBlockUnblockKey: {
    					bsonType: "object",
    					properties: {
    						accountNumber: {
    							bsonType: "string",
    							description: "'accountNumber' must be a string and is required"
    						},
    						blockCode: {
    							bsonType: "string",
    							description: "'blockCode' must be a string and is required"
    						},
    						blockCodeIndicator: {
    							bsonType: "int",
    							description: "'blockCodeIndicator' must be a int and is required"
    						},
    						foreignUse: {
    							bsonType: "int",
    							description: "'foreignUse' must be a int and is required"
    						},
    						functionCode: {
    							bsonType: "string",
    							description: "'functionCode' must be a string and is required"
    						},
    						organizationNumber: {
    							bsonType: ["string"],
    							description: "'organizationNumber' must be a string and is required"
    						}
    					}
    				},
    				blockCode1Local: {
    					bsonType: "string",
    					description: "'blockCode1Local' must be a string"
    				},
    				localOrganization: {
    					bsonType: "int",
    					description: "'localOrganization' must be a int"
    				}
    			}
    		}
    	}
    });
  • Index

    Code Block
    languagejson
    db.blockUnblockAccounts.createIndex({accountBlockUnblockKey: 1});
    db.blockUnblockAccounts.createIndex({"accountBlockUnblockKey.accountNumber": 1});

Target (Java)

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 = "blockUnblockAccounts")
public class AccountBlockUnblock {

  @Id
  private String id;

  private AccountBlockUnblockKey accountBlockUnblockKey;

  private String blockCode1Local;

  private Integer localOrganization;
}
Code Block
languagejava
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotNull;
import org.springframework.data.mongodb.core.mapping.Document;

@Getter
@Setter
@Document
public class AccountBlockUnblockKey {

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

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

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

  @NotNull(message="block code indicator is mandatory")
  private Integer blockCodeIndicator;

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

  @NotNull(message="function code is mandatory")
  private String functionCode;
}  

Account Customer Linking

Source

  • Fiserv endpoint: POST /account/customer

  • Class: FiservRepository

  • Service: linkAccountToCustomer

Response:

Code Block
languagejava
public class AccountToCustomerLinkingResponseDTO {

  private String customerNumber private String functionCode;

  private String accountNumber;

  private String blockCode1Local;

  private StringInteger accountNumberlocalOrganization;
}

Request

Code Block
languagejava
public class AccountToCustomerLinkingRequestDTOAccountBlockUnblockRequestDTO {extends 
  private String accountNumber;

  private AlternateCustomerRequestDTO alternateCustomer = new AlternateCustomerRequestDTO();AbstractAccountFiservBaseRequest {

  private String customerNumberblockCode;

  private String qualification;

  private String organizationNumberInteger blockCodeIndicator;

  private Integer customerTypeIndicatorforeignUse;

  private IntegerString foreignUseIndicatorfunctionCode;
}
Code Block
languagejava
public abstract class @Getter
  static class AlternateCustomerRequestDTOAbstractAccountFiservBaseRequest extends AbstractFiservBaseRequest {

  protected String accountNumber;
 private String expirationDate;
}
Code Block
languagejava
public abstract class AbstractFiservBaseRequest {

  @Builder.Default
  privateprotected String status;organizationNumber =   }
"950";
}

Account Mirror - Target (MongoDB)

  • Collection name: accountCustomerLinks accountDetails

  • Schema:

    Code Block
    languagejson
      db.createCollection("accountCustomerLinks", {
    	validator: {
    		$jsonSchema: {
    			bsonType: "object",
    			title: "Account Customer Links Object Validation",
    			required: ["customerNumber", "accountNumber", "qualification", "organizationNumber", "customerTypeIndicator", "foreignUseIndicator"],
    			properties: {
    				customerNumber: {
    					bsonType: "string",
    					description: "'customerNumber' must be a string and is required"
    				},("accountDetails", {
      	validator: {
      		$jsonSchema: {
      			bsonType: "object",
      			title: "Account Details Object Validation",
      			required: ["accountNumber"],
      			properties: {
      				accountNumber: {
      					bsonType: "string",
      					description: "'accountNumber' must be a string and is required"
      				},
      				qualificationcustomerNumber: {
      					bsonType: "string",
      					description: "'qualificationcustomerNumber' must be a string and"
    is required" 				},
      				organizationNumberblockCode1: {
      					bsonType: "string",
      					description: "'organizationNumberblockCode1' must be a string and"
    is required" 				},
      				customerTypeIndicatorblockCode1Date: {
      					bsonType: "intstring",
      					description: "'customerTypeIndicatorblockCode1Date' must be a intstring"
    and is required" 				},
      				foreignUseIndicatorblockCode2: {
      					bsonType: "intstring",
      					description: "'foreignUseIndicatorblockCode2' must be a intstring"
    and is required" 				},
      				expirationDateblockCode2Date: {
      					bsonType: "string",
      					description: "'expirationDateblockCode2Date' must be a string"
      				},
      				statusblocksBy: {
      					bsonType: "string",
      					description: "'statusblocksBy' must be a string"
      				}
      			}
      		}
      	}
      });
  • Index

    Code Block
    languagejson
    db.accountCustomerLinks.createIndex({customerNumber: 1});
    db.accountCustomerLinks.createIndex({accountNumber: 1});
    db.accountCustomerLinks.createIndex({"customerNumber,accountNumber": 1});
    db.accountCustomerLinks.accountDetails.createIndex({"customerNumber,accountNumber,organizationNumber": 1});

Account Mirror - Target (Java)

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 = "accountCustomerLinksaccountDetails")
public class AccountToCustomerLinkingAccountDetail {

   @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 qualificationblockCode1;

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

  @NotNull(message="customer type indicator is mandatory")blockCode1Date;

   private IntegerString customerTypeIndicator;

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

  blockCode2;

   private String expirationDateblockCode2Date;

   private String statusblocksBy;
}

Data Structure for Card Mirror

...

  • 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; 

}

...

  • Fiserv endpoint: /account/prepaid

  • Class: FiservRepository

  • Service: linkCardToAccount

Request

Code Block
languagejava
public class CardToAccountLinkingRequestDTO { 

    private String cardNumber; 

    private Integer cardholderType; 

    private String customerOrAccountNumber; 

} 

...

  • 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;
} 

...

  • 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);
  }
}

...

  • 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;
}

...

  • 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;
}

...

  • 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;
}

...

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

  • Class: FiservRepository

  • Service: activateCard

Request

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

...

  • 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;
    }
  }
}

...