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:
Variable | Description |
---|---|
credit_card_token | The Spreedly payment method token |
credit_card_number | The full credit card number of the payment method |
credit_card_verification_value | The CVV of the credit card |
credit_card_first_name | The card holder’s first name |
credit_card_last_name | The card holder’s last name |
credit_card_month | The numerical month of the credit card’s expiration date (e.g. 4 for April) |
credit_card_year | The four digit year of the credit card’s expiration date (e.g. 2015 ) |
credit_card_expiration_date | The credit card’s expiration date (e.g. 2020-04-01 ) |
credit_card_created_at | The credit card’s created_at date (e.g. 2016-07-13 14:14:03 UTC ) |
credit_card_updated_at | The credit card’s updated_at date (e.g. 2016-07-13 14:14:03 UTC ) |
credit_card_type | The type, or brand, of the card. Please see the card_type_mapping function below for more detail. |
credit_card_email | The card holder’s email address |
credit_card_address1 | The card holder’s billing address line 1 |
credit_card_address2 | The card holder’s billing address line 2 |
credit_card_city | The card holder’s billing city |
credit_card_state | The card holder’s billing state |
credit_card_zip | The card holder’s billing zip |
credit_card_country | The card holder’s billing country |
credit_card_phone_number | The card holder’s phone number |
last_four_digits | The last 4 digits of the credit card number |
first_six_digits | The first 6 digits of the credit card number |
issuer_identification_number | The 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):
Variable | Description |
---|---|
apple_pay_cryptogram | The online payment cryptogram associated with this Apple Pay payment method |
apple_pay_currency_code | The numerical currency code, e.g., “840” |
apple_pay_eci_indicator | The Apple Pay eci indicator |
apple_pay_exp_date | the 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_amount | The original Apple Pay transaction amount |
apple_pay_transaction_id | The original Apple Pay transaction id |
Google pay
For Google Pay payment methods (which also include credit_card_
variables above):
Variable | Description |
---|---|
google_pay_cryptogram | The online payment cryptogram associated with this Google Pay payment method |
google_pay_transaction_id | The original Google Pay transaction id |
google_pay_eci_indicator | The Google Pay eci indicator |
google_pay_auth_mode | The Google Pay auth mode |
google_pay_month | The Google Pay expiration month |
google_pay_year | The Google Pay expiration year |
Bank account
For bank account (ACH) payment methods:
Variable | Description |
---|---|
bank_account_first_name | The bank account owners first name |
bank_account_last_name | The bank account owners last name |
bank_account_holder_type | The bank account holder type (e.g. personal or business ) |
bank_account_number | The bank account number |
bank_account_routing_number | The bank account routing number |
bank_account_type | The bank account type (e.g. checking or savings ) |
Paypal
For Paypal payment methods:
Variable | Description |
---|---|
paypal_email | The 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:
Variable | Description |
---|---|
utc_timestamp | The timestamp of the current time in iso8601 format, e.g., 2024-11-07T20:38:59Z |
binary_security_token | The binary security token value for a receiver requiring WS-Security integration. |
Updated 1 day ago