Skip to content

CustomerPaymentCardList_Load_Query#


Description#

This function is used to load a list of saved credit cards (payment cards) for a specific customer. Requires MivaPay to be enabled on the store.

Request Body Parameters#

Parameter
Type Description
customer_id
edit_customer
customer_login
Number
String
String
The customer id
The customer login
The customer login
count Number Maximum lines of data allowed to be returned in the response. This limit is used to prevent excessive amounts of data return
filter String A string for filtering returned data
offset Number Used with the Count parameter for paginating results of large datasets. Default 0 is no offset.
sort String The order for sorting returned data

Response Parameters#

Parameter
Type Description
total_count Number total_count is the total number of records that match your search criteria. Note: this is not always the total products returned. Based on the Count and Offset parameters passed, the number of records returned could be different than the total_count.
start_offset Number Number of the starting offset number of products to return. Used in conjunction with the Count parameter for paginating results of large datasets.
id Number The ID of the payment card
cust_id Number Customer ID linked to Payment Card
fname String First Name linked to Payment Card
lname String Last Name linked to Payment Card
exp_month Number Payment Card Expiration Month
exp_year Number Payment Card Expiration Year
lastfour Number Payment Card Last 4 Digits
addr1 String Payment Card Address Line 1
addr2 String Payment Card Address Line 2
city String Payment Card City
state String Payment Card State
zip String Payment Card Zip Code
cntry String Payment Card Country Code
lastused Date/Time Date Time of Last Time Card was Used. 0 = not used.
token String MivaPay Payment Card Token
type_id Number Payment Card Type Id. Defaults: 1 = Visa, 2 = Mastercard, 3 = American Express, 4 = Discover
refcount Number Number of Subscriptions Payment Card is Linked to
type String Payment Card Type
mod_code String Payment Module Code linked to Payment Card
meth_code String Payment Method Code Linked To Payment Card

Example Request#

{
    "Store_code": "beta",
    "Function": "CustomerPaymentCardList_Load_Query",
    "Customer_Login": "bheyde",
    "Count": 0,
    "Offset": 0,
    "Filter": []
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 1,
        "start_offset": 0,
        "data": [
            {
                "id": 1,
                "cust_id": 1,
                "fname": "Brennan",
                "lname": "Heyde",
                "exp_month": 3,
                "exp_year": 2022,
                "lastfour": "1111",
                "addr1": "16745 Bernardo Dr",
                "addr2": "",
                "city": "San Diego",
                "state": "CA",
                "zip": "92127",
                "cntry": "US",
                "lastused": "0",
                "token": "29f327f6e2a4f79a5f032c1553fbd203fe2af883dc50fac995d3e9bdaea3dc5c",
                "type_id": 1,
                "refcount": 0,
                "type": "Visa",
                "mod_code": "authnet",
                "meth_code": "Visa"
            }
        ]
    }
}