---
displayed_sidebar: homepage
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# PaymentContext

 **PaymentContext**: `Object`

## Type declaration

<ParameterTypes parameters={[
  {
    "name": "amount",
    "type": "`number`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "cart",
    "type": "`object`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "billing_address",
        "type": "[Address](../../entities/classes/entities.Address.mdx) \\| `null`",
        "description": "",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "context",
        "type": "`Record<string, unknown>`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "email",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "id",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "shipping_address",
        "type": "[Address](../../entities/classes/entities.Address.mdx) \\| `null`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "shipping_methods",
        "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "cart.billing_address",
    "type": "[Address](../../entities/classes/entities.Address.mdx) \\| `null`",
    "description": "",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "cart.context",
    "type": "`Record<string, unknown>`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "cart.email",
    "type": "`string`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "cart.id",
    "type": "`string`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "cart.shipping_address",
    "type": "[Address](../../entities/classes/entities.Address.mdx) \\| `null`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "cart.shipping_methods",
    "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "cart",
        "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
        "description": "The details of the cart that the shipping method is used in.",
        "optional": false,
        "defaultValue": "",
        "expandable": true,
        "children": []
      },
      {
        "name": "cart_id",
        "type": "`string`",
        "description": "The ID of the cart that the shipping method is used in.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "claim_order",
        "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)",
        "description": "The details of the claim that the shipping method is used in.",
        "optional": false,
        "defaultValue": "",
        "expandable": true,
        "children": []
      },
      {
        "name": "claim_order_id",
        "type": "`null` \\| `string`",
        "description": "The ID of the claim that the shipping method is used in.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "data",
        "type": "`Record<string, unknown>`",
        "description": "Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "id",
        "type": "`string`",
        "description": "The shipping method's ID",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "includes_tax",
        "type": "`boolean`",
        "description": "Whether the shipping method price include tax",
        "optional": false,
        "defaultValue": "false",
        "expandable": false,
        "featureFlag": "tax_inclusive_pricing",
        "children": []
      },
      {
        "name": "order",
        "type": "[Order](../../entities/classes/entities.Order.mdx)",
        "description": "The details of the order that the shipping method is used in.",
        "optional": false,
        "defaultValue": "",
        "expandable": true,
        "children": []
      },
      {
        "name": "order_id",
        "type": "`string`",
        "description": "The ID of the order that the shipping method is used in.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "price",
        "type": "`number`",
        "description": "The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "return_id",
        "type": "`string`",
        "description": "The ID of the return that the shipping method is used in.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "return_order",
        "type": "[Return](../../entities/classes/entities.Return.mdx)",
        "description": "The details of the return that the shipping method is used in.",
        "optional": false,
        "defaultValue": "",
        "expandable": true,
        "children": []
      },
      {
        "name": "shipping_option",
        "type": "[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)",
        "description": "The details of the shipping option the method was created from.",
        "optional": false,
        "defaultValue": "",
        "expandable": true,
        "children": []
      },
      {
        "name": "shipping_option_id",
        "type": "`string`",
        "description": "The ID of the Shipping Option that the Shipping Method is built from.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "subtotal",
        "type": "`number`",
        "description": "The subtotal of the shipping",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "swap",
        "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
        "description": "The details of the swap that the shipping method is used in.",
        "optional": false,
        "defaultValue": "",
        "expandable": true,
        "children": []
      },
      {
        "name": "swap_id",
        "type": "`string`",
        "description": "The ID of the swap that the shipping method is used in.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "tax_lines",
        "type": "[ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx)[]",
        "description": "The details of the tax lines applied on the shipping method.",
        "optional": false,
        "defaultValue": "",
        "expandable": true,
        "children": []
      },
      {
        "name": "tax_total",
        "type": "`number`",
        "description": "The total of tax",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "total",
        "type": "`number`",
        "description": "The total amount of the shipping",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "currency_code",
    "type": "`string`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "customer",
    "type": "[Customer](../../entities/classes/entities.Customer.mdx)",
    "description": "A customer can make purchases in your store and manage their profile.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "billing_address",
        "type": "[Address](../../entities/classes/entities.Address.mdx)",
        "description": "The details of the billing address associated with the customer.",
        "optional": false,
        "defaultValue": "",
        "expandable": true,
        "children": []
      },
      {
        "name": "billing_address_id",
        "type": "`null` \\| `string`",
        "description": "The customer's billing address ID",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "created_at",
        "type": "`Date`",
        "description": "The date with timezone at which the resource was created.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "deleted_at",
        "type": "`null` \\| `Date`",
        "description": "The date with timezone at which the resource was deleted.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "email",
        "type": "`string`",
        "description": "The customer's email",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "first_name",
        "type": "`string`",
        "description": "The customer's first name",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "groups",
        "type": "[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)[]",
        "description": "The customer groups the customer belongs to.",
        "optional": false,
        "defaultValue": "",
        "expandable": true,
        "children": []
      },
      {
        "name": "has_account",
        "type": "`boolean`",
        "description": "Whether the customer has an account or not",
        "optional": false,
        "defaultValue": "false",
        "expandable": false,
        "children": []
      },
      {
        "name": "id",
        "type": "`string`",
        "description": "The customer's ID",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "last_name",
        "type": "`string`",
        "description": "The customer's last name",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "metadata",
        "type": "`Record<string, unknown>`",
        "description": "An optional key-value map with additional details",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "orders",
        "type": "[Order](../../entities/classes/entities.Order.mdx)[]",
        "description": "The details of the orders this customer placed.",
        "optional": false,
        "defaultValue": "",
        "expandable": true,
        "children": []
      },
      {
        "name": "password_hash",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "phone",
        "type": "`string`",
        "description": "The customer's phone number",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "shipping_addresses",
        "type": "[Address](../../entities/classes/entities.Address.mdx)[]",
        "description": "The details of the shipping addresses associated with the customer.",
        "optional": false,
        "defaultValue": "",
        "expandable": true,
        "children": []
      },
      {
        "name": "updated_at",
        "type": "`Date`",
        "description": "The date with timezone at which the resource was updated.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "paymentSessionData",
    "type": "`Record<string, unknown>`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "resource_id",
    "type": "`string`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  }
]} />
