Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TransactionTemplate

Hierarchy

Index

Properties

child?: Core.Graph
curie: "fx:transaction_template"
links: { fx:applied_coupon_codes: AppliedCouponCodes; fx:attributes: Backend.Rels.Attributes; fx:create_session: CreateSession; fx:custom_fields: Backend.Rels.CustomFields; fx:customer: Customer; fx:discounts: Discounts; fx:items: Backend.Rels.Items; fx:store: Backend.Rels.Store; fx:subscription: Backend.Rels.Subscription; self: Cart }

Type declaration

props: { billing_address1: string; billing_address2: string; billing_address_name: string; billing_city: string; billing_company: string; billing_country: string; billing_first_name: string; billing_last_name: string; billing_phone: string; billing_postal_code: string; billing_region: string; currency_code?: string; currency_symbol?: string; customer_email: string; customer_uri: string; date_created: null | string; date_modified: null | string; language: string; payment_method_uri: string; shipping_address1: string; shipping_address2: string; shipping_address_name: string; shipping_city: string; shipping_company: string; shipping_country: string; shipping_first_name: string; shipping_last_name: string; shipping_phone: string; shipping_postal_code: string; shipping_region: string; template_set_uri: string; total_future_shipping: number; total_item_price: number; total_order: number; total_shipping: number; total_tax: number; use_customer_shipping_address: boolean }

Type declaration

  • billing_address1: string

    The first line of billing street address.

  • billing_address2: string

    The second line of the billing street address.

  • billing_address_name: string

    The name of the billing address. This is also the value used as the shipto entry for a multiship item.

  • billing_city: string

    The city of this address.

  • billing_company: string

    The company associated with the billing address.

  • billing_country: string

    The country code of the billing address.

  • billing_first_name: string

    The given name associated with the billing address.

  • billing_last_name: string

    The surname associated with the billing address.

  • billing_phone: string

    The phone of the billing address.

  • billing_postal_code: string

    The postal code of the billing address.

  • billing_region: string

    The two character code for states in the United States. Other countries may call this a province. When a two character code isn't available, use the full region name.

  • Optional currency_code?: string

    The 3 character ISO code for the currency. This value may be unavailable in some carts.

  • Optional currency_symbol?: string

    The currency symbol, such as $, £, €, etc. This value may be unavailable in some carts.

  • customer_email: string

    This value will be populated when customer_uri is set, but can be set separately (for instance, if the customer is unknown or new. This is not used for pre-population on the checkout, but can be helpful in certain situations (such as cart abandonment tracking).

    Note that setting customer_uri will overwrite this value, and you will receive an error if you set both customer_email and customer_uri with a mismatched email address.

  • customer_uri: string

    The full API URI of the customer this cart is associated with. You can not POST a cart into a transaction (ie. charge a customer's saved payment method) unless this value is set to a valid customer with an active default payment method.

    Guest (ie. is_anonymous=1 customer resources can be used, but be aware that guest customer payment methods are purged regularly and according to various internal criteria. As such, so you should not rely on a guest customer's saved credit card being usable indefinitely. In general, you shouldn't rely on a saved payment method persisting more than 60 days, though this value is subject to change. (And, of course, there's no guarantee for any saved payment method that it will work in the future, so always be sure to handle payment errors on your end.)

    Note that when this value is included, the customer's shipping_* and billing_* values will populate and override any existing values on the cart resource (unless the address values are PUT or PATCHed in the same request, in which case the explicitly set values will be used).

    Note that if you are using the customer_uri value, you'll likely either want to explicitly set the use_customer_shipping_address value.

  • date_created: null | string

    The date this resource was created.

  • date_modified: null | string

    The date this resource was last modified.

  • language: string

    The language defined by the template set being used.

  • payment_method_uri: string

    The full API URI of the fx:payments resource, from a previous transaction. This can be used in addition to the customer_uri, to specify a specific payment method used in the past. Without this value, the customer's default saved payment method will be used instead.

    This can be helpful in certain situations, such as when a customer may use multiple different payment methods, but you need to use the API to charge a specific payment method. For instance, if a customer makes 3 transactions with 3 different credit cards, and you need to add a charge to the 2nd card used. Without this payment_method_uri, the most recent card would be charged.

    IMPORTANT NOTES:

    • Not all payment methods can be used this way. Current support includes: normal credit card gateways; CyberSource card-present / point-of-sale, PayPal Express Checkout Reference Transaction, Amazon Pay and Adyen Embedded.
    • Some gateways will only use the last payment method for the customer for that gateway, even if you might be using a payment_method_uri from a transaction that had used an earlier payment method for that gateway. These include PayPal Express Checkout Reference Transaction, Amazon Pay, Stripe Connect, Square and Adyen Embedded.
    • If you're interested in this functionality and not sure if all of your chosen payment gateways are supported, please get in touch with Foxy support.
  • shipping_address1: string

    The first line of shipping street address.

  • shipping_address2: string

    The second line of the shipping street address.

  • shipping_address_name: string

    The name of the shipping address. This is also the value used as the shipto entry for a multiship item.

  • shipping_city: string

    The city of this address.

  • shipping_company: string

    The company associated with the shipping address.

  • shipping_country: string

    The country code of the shipping address.

  • shipping_first_name: string

    The given name associated with the shipping address.

  • shipping_last_name: string

    The surname associated with the shipping address.

  • shipping_phone: string

    The phone of the shipping address.

  • shipping_postal_code: string

    The postal code of the shipping address.

  • shipping_region: string

    The two character code for states in the United States. Other countries may call this a province. When a two character code isn't available, use the full region name.

  • template_set_uri: string

    The full API URI of the template set for this cart, if one has been specified.

  • total_future_shipping: number

    If this cart has any shippable subscription items which will process in the future, this will be the total amount of shipping costs for those items.

  • total_item_price: number

    Total amount of the items in this cart.

  • total_order: number

    Total order amount of this cart including all items, taxes, shipping costs and discounts.

  • total_shipping: number

    Total amount of the shipping costs for this cart.

  • total_tax: number

    Total amount of the taxes for this cart.

  • use_customer_shipping_address: boolean

    This value determines how an attached customer's addresses should be handled in the event the cart resource is POSTed to. When false, the customer's billing address will be used for both the billing and shipping addresses. Defaults to true, so a customer's shipping address will be used if it exists.

zooms: { attributes: Backend.Rels.Attributes; custom_fields?: Backend.Rels.CustomFields; customer?: Customer; discounts?: Discounts; items?: Backend.Rels.Items }

Type declaration

Generated using TypeDoc