CardHolderCreation

The API performs 2 actions.

  1. Sends out a verification email with one time passcode to the user(CH) requesting to visit a url and input the one time code.
  2. Once the verification is complete, the card is created in the background and another email is sent to the user(CH) within 5 minutes with the link to access the virtual card.

If you provided an incorrect email address or other information, you may trigger ProcessCardHolderCreation to Update the details and trigger another verification email. If the card has been created for the customer, you’ll receive a duplicate customer id error and in that case you can use ProcessCardHolderUpdate to update the details.

NameRequiredDefinitionComments
ProgramIdYProgram id, numbers only. Provided on deployment of a successful program
CustIdYAlphanumeric up to 20 digits in lengthUnique identifier for a customer in your system. All concurrent API requests will be made using this ID.
GenderNLetters only, max length 1M or F
FirstNameYFormat: Alpha, 2-50 Can contain special characters such as "/", "-", space, comma, period, &.First name of customer
LastNameYFormat: Alpha, 2-50 Can contain special characters such as "/", "-", space, comma, period, &.Last name of Customer
MiddleNameNFormat: Alpha,1 Description: Middle name char of the cardholder.Middle name of customer
Address1YFormat: Alphanumeric, 1-30 Can contain all special characters except "<" and ">".
Address2NFormat: Alphanumeric, 1-30 Can contain all special characters except "<" and ">".
CityYFormat: Alpha, 1-20 Can contain special characters such as "/", "-", space, comma, period, &.
StateYFormat: Alphanumeric, 2
CountryYFormat: ISO Country code. Two characters. Based on ISO 3166-1 alpha-2 list. http://en.wikipedia.org/wiki/ISO\_3166-1\_alpha-2
PhoneYNumeric, length of 10
MobileNNumeric, length of 10
EmailYValid email address in the format user@domain.tld.
BirthDateYValid DOB in YYYYMMDD format. Older than a year at least.
SSNYValid Social Security Number. This may not be required depending on your program requirements.
EmailTemplateNName of the email template. Only used if your program has multiple email templates setup.
CareGiverFirstNameNCaregiver's first name. Only valid if the program email has this variable.
CareGiverLastNameNCaregiver's last name. Only valid if the program email has this variable.

Authorization

  • Name
    Bearer Token
    Type
    e865a1e59daa629a8ade53bdae8ae659
    Description

Header

  • Name
    Content-Type
    Type
    application/json
    Description

Body

  • Name
    raw
    Type
    json
    Description

    JSON

    {
      "ServiceName": "CardHolderCreation",
      "data": {
          "CustId": "2022040502",
          "ProgramId": "7954",
          "Gender": "M",
          "FirstName": "John",
          "MiddleName": [],
          "LastName": "Doe",
          "Address1": "54321 Mosaic Way",
          "Address2": [],
          "City": "Boise",
          "State": "ID",
          "Zip": "83701",
          "Country": "US",
          "Phone": "7855666521",
          "Email": "chetan@jm-experts.com",
          "BirthDate": 19911231,
          "SSN": 123456789,
          "EmailTemplate": "secondary",
          "groupNumber": "123456",
          "memberId": "ACBDEF"
        }
    }
    

Request

POST
https://YOURENDPOINT.virtualrx.co/jsonapi.php
curl
--location 'https://YOURENDPOINT.virtualrx.co/jsonapi.php' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer e865a1e59daa629a8ade53bdae8ae659' \
--data-raw '{
"ServiceName": "CardHolderCreation",
  "data": {
      "CustId": "2022040502",
      "ProgramId": "7954",
      "Gender": "M",
      "FirstName": "John",
      "MiddleName": [],
      "LastName": "Doe",
      "Address1": "54321 Mosaic Way",
      "Address2": [],
      "City": "Boise",
      "State": "ID",
      "Zip": "83701",
      "Country": "US",
      "Phone": "7855666521",
      "Email": "chetan@jm-experts.com",
      "BirthDate": 19911231,
      "SSN": 123456789,
      "EmailTemplate": "secondary",
      "groupNumber": "123456",
      "memberId": "ACBDEF"
  }
}'

Response200 OK

{
  "ResponseDetails": {
    "ServiceName": "CardHolderCreation",
    "SessionId": "lcz5h-41skf-5764t-4oxwn-r6fph",
    "StatusCode": 0,
    "StatusName": "StatusOK",
    "StatusDescription": "NA",
    "ServiceDate": "2022-04-06 07:56:25",
    "ServiceId": "lcz5h-41skf-5764t-4oxwn-r6fph"
  },
  "ResponseParams": {
    "VerificationEmail": "Sent",
    "CardCreated": "false"
  }
}

CardHolderCreation