Vault Add Credit Card

Creates a new credit card profile, and generates a unique data key which can be obtained from the Receipt object.

This data key is the profile identifier that all future financial Vault transactions will use to associate with the saved information

Canada Code Sample

<?xml version="1.0"?>
<request>
 <store_id>store3</store_id>
 <api_token>yesguy</api_token>
 <res_add_cc>
  <order_id>Moneris_test_Dec20_1</order_id>
  <pan>4242424242424242</pan>
  <expdate>1212</expdate>
  <crypt_type>7</crypt_type>
  <cof_info>
   <issuer_id>123456789012345</issuer_id>
  </cof_info>
 </res_add_cc>
 <res_add_cc>
  <order_id>Moneris_test_Dec20_2</order_id>
  <pan>5454545454545454</pan>
  <expdate>1201</expdate>
  <crypt_type>7</crypt_type>
  <cust_id>My_Customer_Name</cust_id>
  <phone>555-800-1122</phone>
  <email>my_email@mail.com</email>
  <note>I have no note at this time</note>
 </res_add_cc>
</request>

Sample Response:

<?xml version="1.0"?>
<response>
 <receipt>
  <DataKey>wjxVIIFcJAqKhBZ3URASTO8MO</DataKey>
  <ReceiptId>Moneris_test_Dec20_1</ReceiptId>
  <ReferenceNum>null</ReferenceNum>
  <ResponseCode>001</ResponseCode>
  <ISO>null</ISO>
  <AuthCode>null</AuthCode>
  <Message>Successfully registered CC details.</Message>
  <TransTime>14:02:19</TransTime>
  <TransDate>2010-12-21</TransDate>
  <TransType>null</TransType>
  <Complete>true</Complete>
  <TransAmount>null</TransAmount>
  <CardType>null</CardType>
  <TransID>null</TransID>
  <TimedOut>false</TimedOut>
  <CorporateCard>null</CorporateCard>
  <RecurSuccess>null</RecurSuccess>
  <AvsResultCode>null</AvsResultCode>
  <CvdResultCode>null</CvdResultCode>
  <ResSuccess>true</ResSuccess>
  <PaymentType>cc</PaymentType>
  <ResolveData>
   <cust_id></cust_id>
   <phone></phone>
   <email></email>
   <note></note>
   <crypt_type>7</crypt_type>
   <masked_pan>4242***4242</masked_pan>
   <expdate>1212</expdate>
  </ResolveData>
 </receipt>
</response>
                

Vault Add Credit Card mandatory values

Value Type Limits Variable Description
Order ID String 50-character alphanumeric order_id For Vault administrative transactions, the order ID is used as a way to tie the request to the response. This field is not stored on file for future reference.
Credit card number String 20-character alphanumeric pan Most credit card numbers today are 16 digits, but some 13-digit numbers are still accepted by some issuers. This field has been intentionally expanded to 20 digits in consideration for future expansion and potential support of private label card ranges.
Expiry Date String 4-character alphanumeric (YYMM format) expdate Note: This is the reverse of the date displayed on the physical card, which is MMYY.
E-Commerce indicator String 1-character numeric crypt_type

Describes the category of e-commerce transaction being processed. Allowable values are:


  • 1 - Mail Order / Telephone Order—Single
  • 2 - Mail Order / Telephone Order—Recurring
  • 3 - Mail Order / Telephone Order—Instalment
  • 4 - Mail Order / Telephone Order—Unknown classification
  • 5 - Authenticated e-commerce transaction (VBV)
  • 6 - Non-authenticated e-commerce transaction (VBV)
  • 7 - SSL-enabled merchant

In Credential on File transactions where the request field e-commerce indicator is also being sent: the allowable values for e-commerce indicator are dependent on the value sent for payment indicator, as follows:


if payment indicator = R, then allowable values for e-commerce indicator: 2, 5 or 6
if payment indicator = C, then allowable values for e-commerce indicator: 1, 5, 6 or 7
if payment indicator = U, then allowable values for e-commerce indicator: 1 or 7
if payment indicator = Z, then allowable values for e-commerce indicator: 1, 5, 6 or 7

COF Info Object cof_info Refer below for further breakdown and definition.
For more information, see Definitions of Request Fields – Credential on File below.

Definitions of Request Fields – Credential on File

Variable Name Type Limits Description
Issuer ID
NOTE: This variable is required for all merchant- intiated transactions following the first one; upon sending the first transaction, the Issuer ID value is received in the transaction response and then used in subsequent transaction requests (Issuer ID does not apply for Discover or Union Pay).
String 15-character alphanumeric

Variable length
Unique identifier for the cardholder's stored credentials

Sent back in the response from the card brand when processing a Credential on File transaction

If the cardholder's credentials are being stored for the first time, and the issuer id was returned in the response, you must save the Issuer ID on your system to use in MIT subsequent Credential on File transactions

The IssuerID must be saved to your systems when returned from Moneris Gateway in the response data, regardless if the value was received or not. As a best practice, if the IssuerID is not returned and you received N/A instead, store it and send it in the subsequent transaction.

Vault Add Credit Card optional values

Value Type Limits Set method Description
Customer ID String 50-character alphanumeric cust_id This can be used for policy number, membership number, student ID, invoice number and so on.

This field is searchable from the Moneris Merchant Resource Centre.
Phone Number String 30-character alphanumeric phone Phone number of the customer. Can be sent in when creating or updating a Vault profile.
Note String 30-character alphanumeric note This optional field can be used for supplementary information to be sent in with the transaction. This field can be sent in when creating or updating a Vault profile.
Email address String 30-character alphanumeric email Email address of the customer. Can be sent in when creating or updating a Vault profile.

Vault Response Fields

Value Limits Variable Description
Data Key 25-character alphanumeric DataKey This field is created when a profile is created and a token is returned.
It is a unique profile identifier, and is a required value for all future Vault transactions.
Vault Success true/false ResSuccess Indicates whether Vault transaction was successful.
PaymentType cc/ach PaymentType Indicates the payment type associated with a Vault profile.
Customer ID 30-character alphanumeric cust_id Returns the customer ID saved in the profile.
Phone Number 30-character alphanumeric phone Returns the phone number saved in the profile.
Email Address 30-character alphanumeric email Returns the email address saved in the profile.
Note 30-character alphanumeric note Returns the note saved in the profile.
Credit Card Fields
Masked PAN 20-character numeric masked_pan Returns the first 4 last 4 of the card number saved in the profile.
Expiry Date 4-character numeric expdate Returns the expiry date of the card number saved in the profile. YYMM format.
E-Commerce Indicator 1-character numeric crypt_type Returns the e-commerce indicator saved in the profile.
AVS Street Number 19-character alphanumeric avs_street_number Returns the AVS street number saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Street Name 19-character alphanumeric avs_street_name Returns the AVS street name saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Zip/Postal Code 9-character alphanumeric avs_street_zipcode Returns the AVS zip/postal code saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.

Vault Update Credit Card

Updates a Vault profile (based on the data key) to contain credit card information. All information contained within a credit card profile is updated as indicated by the submitted fields.

This will update a profile to contain Credit Card information by referencing the profile’s unique data_key. If the profile which is being updated was already a Credit Card profile, all information contained within it will simply be updated as indicated by the submitted fields. This means that all fields are optional, and only those fields that are submitted will be updated.

If however the profile was of a different payment type (ie: ACH), the old profile will be deactivated and the new Credit Card information will be associated with the data_key. As a result, the mandatory fields for creating a new Credit Card profile will be required. These fields have been listed as conditional.

Things to consider:

  • To update a specific field on the profile, only set that specific element using the corresponding set method.
  • If the Vault profile currently contains ACH payment details, then this transaction will update the token to contain Credit Card payment details and all ACH specific data, such as ACHInfo, will be overwritten.

Canada Code Sample

Sample Request:

<?xml version="1.0"?>
<request>
 <store_id>store3</store_id>
 <api_token>yesguy</api_token>
 <res_update_cc>
  <order_id>Moneris_test_Dec20_3</order_id>
  <data_key>XKwBrc6n8sHIJftK1mNf0TFb3</data_key>
  <expdate>1212</expdate>
 </res_update_cc>
 <res_update_cc>
  <order_id>Moneris_test_Dec20_4</order_id>
  <data_key>RbFbmySFugYNRSmTaN6Gkm08r</data_key>
  <pan>5454545454545454</pan>
  <expdate>1201</expdate>
  <crypt_type>7</crypt_type>
  <cust_id>My_Customer_Name</cust_id>
  <phone>555-800-1122</phone>
  <email>my_email@mail.com</email>
  <note>I have no note at this time</note>
  <cof_info>
   <issuer_id>123456789012345</issuer_id>
  </cof_info>
 </res_update_cc>
</request>

Sample Response:

<?xml version="1.0"?>
<response>
 <receipt>
  <DataKey>XKwBrc6n8sHIJftK1mNf0TFb3</DataKey>
  <ReceiptId>Moneris_test_Dec20_3</ReceiptId>
  <ReferenceNum>null</ReferenceNum>
  <ResponseCode>001</ResponseCode>
  <ISO>null</ISO>
  <AuthCode>null</AuthCode>
  <Message>Successfully updated CC details.</Message>
  <TransTime>14:02:39</TransTime>
  <TransDate>2010-12-21</TransDate>
  <TransType>null</TransType>
  <Complete>true</Complete>
  <TransAmount>null</TransAmount>
  <CardType>null</CardType>
  <TransID>null</TransID>
  <TimedOut>false</TimedOut>
  <CorporateCard>null</CorporateCard>
  <RecurSuccess>null</RecurSuccess>
  <AvsResultCode>null</AvsResultCode>
  <CvdResultCode>null</CvdResultCode>
  <ResSuccess>true</ResSuccess>
  <PaymentType>cc</PaymentType>
  <ResolveData>
   <cust_id></cust_id>
   <phone></phone>
   <email></email>
   <note></note>
   <crypt_type>7</crypt_type>
   <expdate>1212</expdate>
   <masked_pan>4242***4242</masked_pan>
  </ResolveData>
 </receipt>
 <receipt>
  <DataKey>RbFbmySFugYNRSmTaN6Gkm08r</DataKey>
  <ReceiptId>Moneris_test_Dec20_4</ReceiptId>
  <ReferenceNum>null</ReferenceNum>
  <ResponseCode>001</ResponseCode>
  <ISO>null</ISO>
  <AuthCode>null</AuthCode>
  <Message>Successfully updated CC details.</Message>
  <TransTime>14:02:49</TransTime>
  <TransDate>2010-12-21</TransDate>
  <TransType>null</TransType>
  <Complete>true</Complete>
  <TransAmount>null</TransAmount>
  <CardType>null</CardType>
  <TransID>null</TransID>
  <TimedOut>false</TimedOut>
  <CorporateCard>null</CorporateCard>
  <RecurSuccess>null</RecurSuccess>
  <AvsResultCode>null</AvsResultCode>
  <CvdResultCode>null</CvdResultCode>
  <ResSuccess>true</ResSuccess>
  <PaymentType>cc</PaymentType> 
  <ResolveData>
   <cust_id>My_Customer_Name</cust_id>
   <phone>555-800-1122</phone>
   <email>my_email@mail.com</email>
   <note>I have no note at this time</note>
   <avs_street_name>main st</avs_street_name>
   <avs_street_number>1</avs_street_number>
   <avs_zipcode>123456</avs_zipcode>
   <crypt_type>7</crypt_type>
   <expdate>1201</expdate>
   <masked_pan>5454***5454</masked_pan>
  </ResolveData>
 </receipt>
</response>
                

Vault Update Credit Card mandatory values

Value Type Limits Variable Description
Order ID String 50-character alphanumeric order_id For Vault administrative transactions, the order ID is used as a way to tie the request to the response. This field is not stored on file for future reference.
Data key String 25-character alphanumeric data_key The data key is generated by Moneris, and is returned to the merchant when the profile is first registered.
Vault Update Credit Card conditional values
Value Type Limits Variable Description
Credit card number String 20-character alphanumeric pan Most credit card numbers today are 16 digits, but some 13-digit numbers are still accepted by some issuers. This field has been intentionally expanded to 20 digits in consideration for future expansion and potential support of private label card ranges.
Expiry Date String 4-character alphanumeric (YYMM format) expdate Note: This is the reverse of the date displayed on the physical card, which is MMYY.
E-Commerce indicator String 1-character numeric crypt_type

Describes the category of e-commerce transaction being processed. Allowable values are:


  • 1 - Mail Order / Telephone Order—Single
  • 2 - Mail Order / Telephone Order—Recurring
  • 3 - Mail Order / Telephone Order—Instalment
  • 4 - Mail Order / Telephone Order—Unknown classification
  • 5 - Authenticated e-commerce transaction (VBV)
  • 6 - Non-authenticated e-commerce transaction (VBV)
  • 7 - SSL-enabled merchant

In Credential on File transactions where the request field e-commerce indicator is also being sent: the allowable values for e-commerce indicator are dependent on the value sent for payment indicator, as follows:


if payment indicator = R, then allowable values for e-commerce indicator: 2, 5 or 6
if payment indicator = C, then allowable values for e-commerce indicator: 1, 5, 6 or 7
if payment indicator = U, then allowable values for e-commerce indicator: 1 or 7
if payment indicator = Z, then allowable values for e-commerce indicator: 1, 5, 6 or 7

COF Info Object cof_info Refer below for further breakdown and definition.
For more information, see Definitions of Request Fields – Credential on File below.

Vault Update Credit Card optional values

Value Type Limits Set method Description
Customer ID String 50-character alphanumeric cust_id This can be used for policy number, membership number, student ID, invoice number and so on.

This field is searchable from the Moneris Merchant Resource Centre.
Email address Phone Number 30-character alphanumeric email Email address of the customer. Can be sent in when creating or updating a Vault profile.
Phone Number String 30-character alphanumeric phone Phone number of the customer. Can be sent in when creating or updating a Vault profile.
Note String 30-character alphanumeric note This optional field can be used for supplementary information to be sent in with the transaction. This field can be sent in when creating or updating a Vault profile.

Vault Response Fields

Value Limits Variable Description
Data Key 25-character alphanumeric DataKey This field is created when a profile is created and a token is returned.
It is a unique profile identifier, and is a required value for all future Vault transactions.
Vault Success true/false ResSuccess Indicates whether Vault transaction was successful.
PaymentType cc PaymentType Indicates the payment type associated with a Vault profile.
Customer ID 30-character alphanumeric cust_id Returns the customer ID saved in the profile.
Phone Number 30-character alphanumeric phone Returns the phone number saved in the profile.
Email Address 30-character alphanumeric email Returns the email address saved in the profile.
Note 30-character alphanumeric note Returns the note saved in the profile.
Credit Card Fields
Masked PAN 20-character numeric masked_pan Returns the first 4 last 4 of the card number saved in the profile.
Expiry Date 4-character numeric expdate Returns the expiry date of the card number saved in the profile. YYMM format.
E-Commerce Indicator 1-character numeric crypt_type Returns the e-commerce indicator saved in the profile.
AVS Street Number 19-character alphanumeric avs_street_number Returns the AVS street number saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Street Name 19-character alphanumeric avs_street_name Returns the AVS street name saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Zip/Postal Code 9-character alphanumeric avs_street_zipcode Returns the AVS zip/postal code saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.

Vault Delete Credit Card

Deletes an existing Vault profile of any type using the unique data key that was assigned when the profile was added.

It is important to note that after a profile is deleted, the information which was saved within can no longer be retrieved.

Canada Code Sample

Sample Request:

<?xml version="1.0"?>
<request>
<store_id>store3</store_id>
<api_token>yesguy</api_token>
<res_delete>
 <order_id>Moneris_test_Dec20_5</order_id>
<data_key>RbFbmySFugYNRSmTaN6Gkm08r</data_key>
</res_delete>
</request>

Sample Response:

<?xml version="1.0"?>
<response>
<receipt>
<DataKey>RbFbmySFugYNRSmTaN6Gkm08r</DataKey>
<ReceiptId>Moneris_test_Dec20_5</ReceiptId>
<ReferenceNum>null</ReferenceNum>
<ResponseCode>001</ResponseCode>
<ISO>null</ISO>
<AuthCode>null</AuthCode>
<Message>Successfully deleted CC details.</Message>
<TransTime>16:44:20</TransTime>
<TransDate>2010-12-21</TransDate>
<TransType>null</TransType>
<Complete>true</Complete>
<TransAmount>null</TransAmount>
<CardType>null</CardType>
<TransID>null</TransID>
<TimedOut>false</TimedOut>
<CorporateCard>null</CorporateCard>
<RecurSuccess>null</RecurSuccess>
<AvsResultCode>null</AvsResultCode>
<CvdResultCode>null</CvdResultCode>
<ResSuccess>true</ResSuccess>
<PaymentType>cc</PaymentType>
<ResolveData>
<cust_id>My_Customer_Name</cust_id>
<phone>555-800-1122</phone>
<email>my_email@mail.com</email>
<note>I have no note at this time</note>
<expdate>1201</expdate>
<avs_street_number>1</avs_street_number>
<avs_street_name>main st</avs_street_name>
<avs_zipcode>123456</avs_zipcode>
<masked_pan>5454***5454</masked_pan>
<crypt_type>7</crypt_type>
</ResolveData>
</receipt>
</response>

                

Vault Delete mandatory values

Value Type Limits Set method Description
Order ID String 50-character alphanumeric order_id For Vault administrative transactions, the order ID is used as a way to tie the request to the response. This field is not stored on file for future reference.
Data key String 25-character alphanumeric data_key Profile identifier that all future financial Vault transactions (that is, they occur after the profile was registered by a Vault Add Credit Card or Vault Tokenize Credit Card transaction, for example) will use to associate with the saved information.

The data key is generated by Moneris, and is returned to the merchant (via the Receipt object) when the profile is first registered.
Vault Response Fields
Value Limits Variable Description
Data Key 25-character alphanumeric DataKey This field is created when a profile is created and a token is returned.
It is a unique profile identifier, and is a required value for all future Vault transactions.
Vault Success true/false ResSuccess Indicates whether Vault transaction was successful.
PaymentType cc PaymentType Indicates the payment type associated with a Vault profile.
Customer ID 30-character alphanumeric cust_id Returns the customer ID saved in the profile.
Phone Number 30-character alphanumeric phone Returns the phone number saved in the profile.
Email Address 30-character alphanumeric email Returns the email address saved in the profile.
Note 30-character alphanumeric note Returns the note saved in the profile.
Credit Card Fields
Masked PAN 20-character numeric masked_pan Returns the first 4 last 4 of the card number saved in the profile.
Expiry Date 4-character numeric expdate Returns the expiry date of the card number saved in the profile. YYMM format.
E-Commerce Indicator 1-character numeric crypt_type Returns the e-commerce indicator saved in the profile.
AVS Street Number 19-character alphanumeric avs_street_number Returns the AVS street number saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Street Name 19-character alphanumeric avs_street_name Returns the AVS street name saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Zip/Postal Code 9-character alphanumeric avs_street_zipcode Returns the AVS zip/postal code saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.