# API: Add Credit Card

# addClientCreditCard

Add credit card to client profile

# Required parameters

Parameter Description
id Client ID
cardnum Credit Card number
cardtype Credit Card type
expiryyear Credit Card Expiration year, example: 25
expirymonth Credit Card Expiration month, example: 12

# Optional parameters

Parameter Description
token Card Token if it was tokenized already by gateway module, use with token_gateway_id
token_gateway_id Card Payment Gateway ID
cardname Card holder name
card_contact_id Client contact ID to be used as billing contact for this card
as_token Set to 1 if its payment token but not related to credit card. Payment tokens cannot be primary.

# Request

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=addClientCreditCard&id=ID&cardnum=CARDNUM&cardtype=CARDTYPE&expiryyear=EXPIRYYEAR&expirymonth=EXPIRYMONTH

# PHP Samples

# Response

{
    "success": true,
    "card_id": 85,
    "call": "addClientCreditCard",
    "server_time": 1662725447,
    "info": [
        "Client credit card has been added!"
    ]
}
Last Updated: 11/18/2024, 3:07:57 PM