[memb_keap_creditcard]

Description

Prints card details inline, pulled from the member's default card: the most recently added card on file. Combine fields to write sentences like "Your Visa ending in 4242 expires 8/2028" without a table or a list.

fields picks the values and their order, separator joins them, and default fills any field the card does not carry. A member with no card on file sees the default text, which makes the shortcode safe inside sentences. If Keap cannot be reached, nothing renders rather than posing defaults as card data.

The member must be linked to a Keap contact: administrators see an admin notice, and nothing renders in feeds.

Shortcode Examples

[memb_keap_creditcard fields="CardType,Last4"]

A sentence around it:

Your [memb_keap_creditcard fields="CardType"] card ending in
[memb_keap_creditcard fields="Last4"] expires
[memb_keap_creditcard fields="ExpirationMonth,ExpirationYear" separator="/"].

Joined with a separator:

[memb_keap_creditcard fields="CardType,Last4,ExpirationMonth,ExpirationYear" separator=" / "]

Fallback text when there is no card:

[memb_keap_creditcard fields="Last4" default="no card on file"]

Shortcode Parameters

fields

Comma-separated card field keys, in output order. Names match case-insensitively. Default: '' (nothing).

default

Text used for any field the card does not carry, including every field when the member has no card on file. Default: ''.

separator

String joined between multiple field values. Default: ''.

date_format

PHP date format applied to values that parse as dates, such as created_time. Default: '' (raw value).

txtfmt

Standard output formatting attribute.

capture

Standard output formatting attribute.

Card Fields

Field Shows
CardType Card brand, e.g. Visa
Last4 Last four digits of the card number
ExpirationMonth Expiration month as a number
ExpirationYear Expiration year as a number
Id Keap payment method ID
created_time Date the card was added
ContactId Keap contact ID
merchant_account_id Keap merchant account ID

Only unexpired cards are on file; Keap drops expired cards from the member's list, so every field reflects a card the member can bill.

Shortcode Attributes

Attribute Value
Conditional No
Nestable No
Accepts formatting Yes