Receiver variables

Receiver variables, available in the deliver and export elements, are referenced using the template syntax and are scoped to the payment method specified in the payment_method_token request element.

Example:

By default, template tags will HTML escape all values. If you have special characters in your variable such as & > <, wrap the variable with triple curly braces to use the unescaped value:

//template is
{
  "order_id": 12309,
  "card": "{{ credit_card_number }}",
  "cvv": "{{ credit_card_verification_value }}"
}

// output will be
{
  "order_id": 12309,
  "card": "4111111111111111",
  "cvv": "123"
}

My credit token is:` {{credit_card_token}}`

Unescaped values: `{{{#variable_name}}}& < >{{{/variable_name}}}`
My credit token is:` {{credit_card_token}}`

Unescaped values: `{{{#variable_name}}}& < >{{{/variable_name}}}`

The list of available variables include:

Credit cards

For credit card (which includes Apple Pay and Google Pay) payment methods:

VariableDescription
credit_card_tokenThe Spreedly payment method token
credit_card_numberThe full credit card number of the payment method
credit_card_verification_valueThe CVV of the credit card
credit_card_first_nameThe card holder’s first name
credit_card_last_nameThe card holder’s last name
credit_card_monthThe numerical month of the credit card’s expiration date (e.g. 4 for April)
credit_card_yearThe four digit year of the credit card’s expiration date (e.g. 2015)
credit_card_expiration_dateThe credit card’s expiration date (e.g. 2020-04-01)
credit_card_created_atThe credit card’s created_at date (e.g. 2016-07-13 14:14:03 UTC)
credit_card_updated_atThe credit card’s updated_at date (e.g. 2016-07-13 14:14:03 UTC)
credit_card_typeThe type, or brand, of the card. Please see the card_type_mapping function below for more detail.
credit_card_emailThe card holder’s email address
credit_card_address1The card holder’s billing address line 1
credit_card_address2The card holder’s billing address line 2
credit_card_cityThe card holder’s billing city
credit_card_stateThe card holder’s billing state
credit_card_zipThe card holder’s billing zip
credit_card_countryThe card holder’s billing country
credit_card_phone_numberThe card holder’s phone number
last_four_digitsThe last 4 digits of the credit card number
first_six_digitsThe first 6 digits of the credit card number
issuer_identification_numberThe first 6 or 8 digits of the credit card number that identify the issuing bank

Apple pay

For Apple Pay payment methods (which also include credit_card_ variables above):

VariableDescription
apple_pay_cryptogramThe online payment cryptogram associated with this Apple Pay payment method
apple_pay_currency_codeThe numerical currency code, e.g., “840”
apple_pay_eci_indicatorThe Apple Pay eci indicator
apple_pay_exp_datethe Apple Pay formatted expiration date as “yymmdd”. You can also access the apple pay expiration date values via credit_card_month and credit_card_year.
apple_pay_transaction_amountThe original Apple Pay transaction amount
apple_pay_transaction_idThe original Apple Pay transaction id

Google pay

For Google Pay payment methods (which also include credit_card_ variables above):

VariableDescription
google_pay_cryptogramThe online payment cryptogram associated with this Google Pay payment method
google_pay_transaction_idThe original Google Pay transaction id
google_pay_eci_indicatorThe Google Pay eci indicator
google_pay_auth_modeThe Google Pay auth mode
google_pay_monthThe Google Pay expiration month
google_pay_yearThe Google Pay expiration year

Bank account

For bank account (ACH) payment methods:

VariableDescription
bank_account_first_nameThe bank account owners first name
bank_account_last_nameThe bank account owners last name
bank_account_holder_typeThe bank account holder type (e.g. personal or business)
bank_account_numberThe bank account number
bank_account_routing_numberThe bank account routing number
bank_account_typeThe bank account type (e.g. checking or savings)

Paypal

For Paypal payment methods:

VariableDescription
paypal_emailThe email address associated with the payment method

Credentials

Additionally, any credential values set when provisioning a receiver will be exposed as variables. So if user and password were set as receiver credentials, they would available as {{ user }} and {{ password }} in the delivery values.

Miscellaneous

The following non payment method variables are also available:

VariableDescription
utc_timestampThe timestamp of the current time in iso8601 format, e.g., 2024-11-07T20:38:59Z
binary_security_tokenThe binary security token value for a receiver requiring WS-Security integration.