# Retrieve payment link

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/payment_links/{id}:
    get:
      summary: Retrieve payment link
      deprecated: false
      description: Retrieves payment link
      tags:
        - API Reference/Payment Links
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                x-apifox-refs:
                  01GP3MKPW7Z9A94NX1AF89R3TH:
                    $ref: '#/components/schemas/Payment%20Link'
                    x-apifox-overrides:
                      tax_id_collection: null
                      subscription_data: null
                      transfer_data: null
                      submit_type: null
                      shipping_options: null
                      payment_method_collection: null
                      on_behalf_of: null
                      payment_intent_data: null
                      custom_text: null
                      customer_creation: null
                      consent_collection: null
                      automatic_tax: null
                      application_fee_percent: null
                      application_fee_amount: null
                      allow_promotion_codes: null
                      payment_method_types: null
                x-apifox-orders:
                  - 01GP3MKPW7Z9A94NX1AF89R3TH
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object, like 'plink_xxxx'.
                  object:
                    type: string
                    description: '"payment_link"'
                  active:
                    type: boolean
                    description: >-
                      Whether the payment link’s url is active. If false,
                      customers visiting the URL will be shown a page saying
                      that the link has been deactivated.
                  after_completion:
                    type: object
                    properties:
                      type:
                        type: string
                        description: The specified behavior after the purchase is complete.
                        enum:
                          - redirect
                          - hosted_confirmation
                        x-apifox-enum:
                          - value: redirect
                            name: ''
                            description: >-
                              Redirects the customer to the specified url after
                              the purchase is complete.
                          - value: hosted_confirmation
                            name: ''
                            description: >-
                              Displays a message on the hosted surface after the
                              purchase is complete.
                      hosted_confirmation:
                        type: object
                        properties:
                          custom_message:
                            type: string
                            description: >-
                              The custom message that is displayed to the
                              customer after the purchase is complete.
                        x-apifox-orders:
                          - custom_message
                        description: Configuration when type=hosted_confirmation.
                        x-apifox-ignore-properties: []
                      redirect:
                        type: object
                        properties:
                          url:
                            type: string
                            description: >-
                              The URL the customer will be redirected to after
                              the purchase is complete.
                        description: Configuration when type=redirect.
                        x-apifox-orders:
                          - url
                        x-apifox-ignore-properties: []
                    x-apifox-orders:
                      - type
                      - hosted_confirmation
                      - redirect
                    description: Behavior after the purchase is complete.
                    x-apifox-ignore-properties: []
                  billing_address_collection:
                    type: string
                    description: >-
                      Configuration for collecting the customer’s billing
                      address.
                    enum:
                      - auto
                      - required
                    x-apifox-enum:
                      - value: auto
                        name: ''
                        description: >-
                          (DEFAULT) Checkout will only collect the billing
                          address when necessary.
                      - value: required
                        name: ''
                        description: >-
                          Checkout will always collect the customer’s billing
                          address.
                  currency:
                    type: string
                    description: >-
                      Three-letter ISO currency code. Must be a supported
                      currency.
                  livemode:
                    type: boolean
                    description: >-
                      Has the value true if the object exists in live mode or
                      the value false if the object exists in test mode.
                  metadata:
                    type: object
                    properties: {}
                    x-apifox-orders: []
                    description: >-
                      Set of key-value pairs that you can attach to an object.
                      This can be useful for storing additional information
                      about the object in a structured format.
                    x-apifox-ignore-properties: []
                  phone_number_collection:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                        description: >-
                          If true, a phone number will be collected during
                          checkout.
                    x-apifox-orders:
                      - enabled
                    description: Controls phone number collection settings during checkout.
                    x-apifox-ignore-properties: []
                  shipping_address_collection:
                    type: object
                    properties:
                      allowed_countries:
                        type: array
                        items:
                          type: string
                        description: >-
                          An array of two-letter ISO country codes representing
                          which countries Checkout should provide as options for
                          shipping locations.
                    description: >-
                      Configuration for collecting the customer’s shipping
                      address.
                    x-apifox-orders:
                      - allowed_countries
                    x-apifox-ignore-properties: []
                  url:
                    type: string
                    description: The public URL that can be shared with customers.
                  line_items:
                    description: >-
                      The line items representing what is being sold. This field
                      is not included by default. This field is not included by
                      default. To include it in the response, expand the
                      line_items field.
                    type: object
                    properties:
                      object:
                        type: string
                        default: '"list"'
                      url:
                        type: string
                      has_more:
                        type: boolean
                      data:
                        type: array
                        items:
                          type: object
                          x-apifox-refs:
                            01GMT2EE0DZPW4YXF2HRYCWGP4: &ref_48
                              $ref: '#/components/schemas/item'
                              x-apifox-overrides:
                                amount_tax: null
                                amount_discount: null
                                discounts: null
                                taxes: null
                          x-apifox-orders:
                            - 01GMT2EE0DZPW4YXF2HRYCWGP4
                          properties:
                            id:
                              type: string
                              description: Unique identifier for the object, like "li_xxx"
                            object:
                              type: string
                              description: >-
                                String representing the object’s type. Objects
                                of the same type share the same value.
                            amount_subtotal:
                              type: string
                              description: Total before any discounts or taxes are applied.
                            amount_total:
                              type: string
                              description: Total after discounts and taxes.
                            currency:
                              type: string
                              description: Three-letter ISO currency code.
                            description:
                              type: string
                              description: >-
                                An arbitrary string attached to the object.
                                Often useful for displaying to users. Defaults
                                to product name.
                            price:
                              type: object
                              x-apifox-refs:
                                01GMQG5R25JKZG1CEB31ZYK9A1: &ref_0
                                  $ref: '#/components/schemas/Price'
                                  x-apifox-overrides:
                                    custom_unit_amount: null
                                    tax_behavior: null
                                    tiers_mode: null
                                    transform_quantity: null
                                    unit_amount_decimal: null
                              x-apifox-orders:
                                - 01GMQG5R25JKZG1CEB31ZYK9A1
                              properties:
                                id:
                                  type: string
                                  description: >-
                                    Unique identifier for the object, like
                                    "price_xxxx".
                                object:
                                  type: string
                                  description: '''price'''
                                active:
                                  type: boolean
                                  description: >-
                                    Whether the price can be used for new
                                    purchases.
                                billing_scheme:
                                  type: string
                                  description: >-
                                    Describes how to compute the price per
                                    period. Either per_unit or tiered
                                  enum:
                                    - per_unit
                                    - tiered
                                  x-apifox-enum:
                                    - value: per_unit
                                      name: ''
                                      description: only per_unit is supported now.
                                    - value: tiered
                                      name: ''
                                      description: ''
                                created:
                                  type: integer
                                  description: >-
                                    Time at which the object was created.
                                    Measured in seconds since the Unix epoch.
                                currency:
                                  type: string
                                  description: >-
                                    Three-letter ISO currency code, in
                                    uppercase. 
                                livemode:
                                  type: boolean
                                  description: >-
                                    Has the value true if the object exists in
                                    live mode or the value false if the object
                                    exists in test mode.
                                lookup_key:
                                  type: string
                                  description: >-
                                    A lookup key used to retrieve prices
                                    dynamically from a static string. This may
                                    be up to 200 characters.
                                metadata:
                                  type: object
                                  properties: {}
                                  x-apifox-orders: []
                                  description: >-
                                    Set of key-value pairs that you can attach
                                    to an object. This can be useful for storing
                                    additional information about the object in a
                                    structured format.
                                  x-apifox-ignore-properties: []
                                nickname:
                                  type: string
                                  description: >-
                                    A brief description of the price, hidden
                                    from customers.
                                product:
                                  type: string
                                  description: >-
                                    The ID of the product this price is
                                    associated with.
                                type:
                                  type: string
                                  description: >-
                                    One of one_time or recurring depending on
                                    whether the price is for a one-time purchase
                                    or a recurring (subscription) purchase.
                                  enum:
                                    - one_time
                                    - recurring
                                  x-apifox-enum:
                                    - value: one_time
                                      name: ''
                                      description: only one-time is supported now.
                                    - value: recurring
                                      name: ''
                                      description: ''
                                unit_amount:
                                  type: integer
                                  description: >-
                                    The unit amount in cents to be charged,
                                    represented as a whole integer if possible.
                                    Only set if billing_scheme=per_unit.
                                recurring:
                                  type: object
                                  properties:
                                    interval:
                                      type: string
                                      description: >-
                                        The frequency at which a subscription is
                                        billed. One of day, week, month or year.
                                      enum:
                                        - day
                                        - week
                                        - month
                                        - year
                                      x-apifox-enum:
                                        - value: day
                                          name: ''
                                          description: ''
                                        - value: week
                                          name: ''
                                          description: ''
                                        - value: month
                                          name: ''
                                          description: ''
                                        - value: year
                                          name: ''
                                          description: ''
                                    interval_count:
                                      type: integer
                                      description: >-
                                        The number of intervals (specified in
                                        the interval attribute) between
                                        subscription billings. For example,
                                        interval=month and interval_count=3
                                        bills every 3 months.
                                    usage_type:
                                      type: string
                                      description: >-
                                        Configures how the quantity per period
                                        should be determined.
                                      enum:
                                        - licensed
                                      x-apifox-enum:
                                        - value: licensed
                                          name: ''
                                          description: ''
                                  x-apifox-orders:
                                    - interval
                                    - interval_count
                                    - usage_type
                                  description: The recurring components of a price
                                  required:
                                    - interval
                                  x-apifox-ignore-properties: []
                                tiers:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      up_to:
                                        type: string
                                        description: >-
                                          Specifies the upper bound of this tier.
                                          The lower bound of a tier is the upper
                                          bound of the previous tier adding one.
                                          Use inf to define a fallback tier.
                                      flat_amount:
                                        type: string
                                        description: >-
                                          The flat billing amount for an entire
                                          tier, regardless of the number of units
                                          in the tier.
                                      unit_amount:
                                        type: string
                                        description: >-
                                          The per unit billing amount for each
                                          individual unit for which this tier
                                          applies.
                                    x-apifox-orders:
                                      - up_to
                                      - flat_amount
                                      - unit_amount
                                    x-apifox-ignore-properties: []
                                  description: （未实现）
                              description: The price used to generate the line item.
                              x-apifox-ignore-properties:
                                - id
                                - object
                                - active
                                - billing_scheme
                                - created
                                - currency
                                - livemode
                                - lookup_key
                                - metadata
                                - nickname
                                - product
                                - type
                                - unit_amount
                                - recurring
                                - tiers
                            quantity:
                              type: string
                              description: The quantity of products being purchased.
                          x-apifox-ignore-properties:
                            - id
                            - object
                            - amount_subtotal
                            - amount_total
                            - currency
                            - description
                            - price
                            - quantity
                    x-apifox-refs: {}
                    x-apifox-orders:
                      - object
                      - url
                      - has_more
                      - data
                    x-apifox-ignore-properties: []
                  created:
                    type: integer
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                x-apifox-ignore-properties:
                  - id
                  - object
                  - active
                  - after_completion
                  - billing_address_collection
                  - currency
                  - livemode
                  - metadata
                  - phone_number_collection
                  - shipping_address_collection
                  - url
                  - line_items
                  - created
          headers: {}
          x-apifox-name: OK
      security:
        - basic: []
      x-apifox-folder: API Reference/Payment Links
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/1296482/apis/api-57534442-run
components:
  schemas:
    Price:
      type: object
      properties:
        id: &ref_1
          type: string
          description: Unique identifier for the object, like "price_xxxx".
        object: &ref_2
          type: string
          description: '''price'''
        active: &ref_3
          type: boolean
          description: Whether the price can be used for new purchases.
        billing_scheme:
          type: string
          description: >-
            Describes how to compute the price per period. Either per_unit or
            tiered
          enum: &ref_4
            - per_unit
            - tiered
          x-apifox-enum:
            - value: per_unit
              name: ''
              description: only per_unit is supported now.
            - value: tiered
              name: ''
              description: ''
        created: &ref_5
          type: integer
          description: >-
            Time at which the object was created. Measured in seconds since the
            Unix epoch.
        currency: &ref_6
          type: string
          description: 'Three-letter ISO currency code, in uppercase. '
        livemode: &ref_7
          type: boolean
          description: >-
            Has the value true if the object exists in live mode or the value
            false if the object exists in test mode.
        lookup_key: &ref_8
          type: string
          description: >-
            A lookup key used to retrieve prices dynamically from a static
            string. This may be up to 200 characters.
        metadata:
          type: object
          properties: {}
          x-apifox-orders: &ref_9 []
          description: >-
            Set of key-value pairs that you can attach to an object. This can be
            useful for storing additional information about the object in a
            structured format.
          x-apifox-ignore-properties: []
        nickname: &ref_10
          type: string
          description: A brief description of the price, hidden from customers.
        product: &ref_11
          type: string
          description: The ID of the product this price is associated with.
        type:
          type: string
          description: >-
            One of one_time or recurring depending on whether the price is for a
            one-time purchase or a recurring (subscription) purchase.
          enum: &ref_12
            - one_time
            - recurring
          x-apifox-enum:
            - value: one_time
              name: ''
              description: only one-time is supported now.
            - value: recurring
              name: ''
              description: ''
        unit_amount: &ref_13
          type: integer
          description: >-
            The unit amount in cents to be charged, represented as a whole
            integer if possible. Only set if billing_scheme=per_unit.
        custom_unit_amount:
          type: 'null'
          description: （未实现）
        recurring:
          type: object
          properties:
            interval:
              type: string
              description: >-
                The frequency at which a subscription is billed. One of day,
                week, month or year.
              enum: &ref_14
                - day
                - week
                - month
                - year
              x-apifox-enum:
                - value: day
                  name: ''
                  description: ''
                - value: week
                  name: ''
                  description: ''
                - value: month
                  name: ''
                  description: ''
                - value: year
                  name: ''
                  description: ''
            interval_count: &ref_15
              type: integer
              description: >-
                The number of intervals (specified in the interval attribute)
                between subscription billings. For example, interval=month and
                interval_count=3 bills every 3 months.
            usage_type:
              type: string
              description: Configures how the quantity per period should be determined.
              enum: &ref_16
                - licensed
              x-apifox-enum:
                - value: licensed
                  name: ''
                  description: ''
          x-apifox-orders: &ref_17
            - interval
            - interval_count
            - usage_type
          description: The recurring components of a price
          required:
            - interval
          x-apifox-ignore-properties: []
        tax_behavior:
          type: string
          description: （未实现）
        tiers_mode:
          type: 'null'
          description: （未实现）
        tiers:
          type: array
          items:
            type: object
            properties:
              up_to: &ref_18
                type: string
                description: >-
                  Specifies the upper bound of this tier. The lower bound of a
                  tier is the upper bound of the previous tier adding one. Use
                  inf to define a fallback tier.
              flat_amount: &ref_19
                type: string
                description: >-
                  The flat billing amount for an entire tier, regardless of the
                  number of units in the tier.
              unit_amount: &ref_20
                type: string
                description: >-
                  The per unit billing amount for each individual unit for which
                  this tier applies.
            x-apifox-orders: &ref_21
              - up_to
              - flat_amount
              - unit_amount
            x-apifox-ignore-properties: []
          description: （未实现）
        transform_quantity:
          type: 'null'
          description: （未实现）
        unit_amount_decimal:
          type: string
          description: （未实现）
      x-apifox-orders:
        - id
        - object
        - active
        - billing_scheme
        - created
        - currency
        - livemode
        - lookup_key
        - metadata
        - nickname
        - product
        - type
        - unit_amount
        - custom_unit_amount
        - recurring
        - tax_behavior
        - tiers_mode
        - tiers
        - transform_quantity
        - unit_amount_decimal
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    item:
      type: object
      properties:
        id: &ref_49
          type: string
          description: Unique identifier for the object, like "li_xxx"
        object: &ref_50
          type: string
          description: >-
            String representing the object’s type. Objects of the same type
            share the same value.
        amount_subtotal: &ref_51
          type: string
          description: Total before any discounts or taxes are applied.
        amount_total: &ref_52
          type: string
          description: Total after discounts and taxes.
        currency: &ref_53
          type: string
          description: Three-letter ISO currency code.
        description: &ref_54
          type: string
          description: >-
            An arbitrary string attached to the object. Often useful for
            displaying to users. Defaults to product name.
        price:
          type: object
          x-apifox-refs: &ref_55
            01GMQG5R25JKZG1CEB31ZYK9A1: *ref_0
          x-apifox-orders: &ref_56
            - 01GMQG5R25JKZG1CEB31ZYK9A1
          properties:
            id: *ref_1
            object: *ref_2
            active: *ref_3
            billing_scheme:
              type: string
              description: >-
                Describes how to compute the price per period. Either per_unit
                or tiered
              enum: *ref_4
              x-apifox-enum:
                - value: per_unit
                  name: ''
                  description: only per_unit is supported now.
                - value: tiered
                  name: ''
                  description: ''
            created: *ref_5
            currency: *ref_6
            livemode: *ref_7
            lookup_key: *ref_8
            metadata:
              type: object
              properties: {}
              x-apifox-orders: *ref_9
              description: >-
                Set of key-value pairs that you can attach to an object. This
                can be useful for storing additional information about the
                object in a structured format.
              x-apifox-ignore-properties: []
            nickname: *ref_10
            product: *ref_11
            type:
              type: string
              description: >-
                One of one_time or recurring depending on whether the price is
                for a one-time purchase or a recurring (subscription) purchase.
              enum: *ref_12
              x-apifox-enum:
                - value: one_time
                  name: ''
                  description: only one-time is supported now.
                - value: recurring
                  name: ''
                  description: ''
            unit_amount: *ref_13
            recurring:
              type: object
              properties:
                interval:
                  type: string
                  description: >-
                    The frequency at which a subscription is billed. One of day,
                    week, month or year.
                  enum: *ref_14
                  x-apifox-enum:
                    - value: day
                      name: ''
                      description: ''
                    - value: week
                      name: ''
                      description: ''
                    - value: month
                      name: ''
                      description: ''
                    - value: year
                      name: ''
                      description: ''
                interval_count: *ref_15
                usage_type:
                  type: string
                  description: Configures how the quantity per period should be determined.
                  enum: *ref_16
                  x-apifox-enum:
                    - value: licensed
                      name: ''
                      description: ''
              x-apifox-orders: *ref_17
              description: The recurring components of a price
              required:
                - interval
              x-apifox-ignore-properties: []
            tiers:
              type: array
              items:
                type: object
                properties:
                  up_to: *ref_18
                  flat_amount: *ref_19
                  unit_amount: *ref_20
                x-apifox-orders: *ref_21
                x-apifox-ignore-properties: []
              description: （未实现）
          description: The price used to generate the line item.
          x-apifox-ignore-properties:
            - id
            - object
            - active
            - billing_scheme
            - created
            - currency
            - livemode
            - lookup_key
            - metadata
            - nickname
            - product
            - type
            - unit_amount
            - recurring
            - tiers
        quantity: &ref_57
          type: string
          description: The quantity of products being purchased.
        taxes:
          type: string
          description: （未实现）The taxes applied to the line item.
        discounts:
          type: array
          items:
            type: object
            x-apifox-refs:
              01J0Q497B9M5WGP7SNHD8Q4ARN:
                $ref: '#/components/schemas/Discounts'
                x-apifox-overrides:
                  invoice: null
                  invoice_item: null
            x-apifox-orders:
              - 01J0Q497B9M5WGP7SNHD8Q4ARN
            properties:
              id: &ref_38
                type: string
                description: >-
                  The ID of the discount object. Discounts cannot be fetched by
                  ID.
              object: &ref_39
                type: string
                description: >-
                  String representing the object’s type. Objects of the same
                  type share the same value.
              checkout_session: &ref_40
                type: string
                description: >-
                  The Checkout session that this coupon is applied to, if it is
                  applied to a particular session in payment mode. Will not be
                  present for subscription mode.
              coupon:
                type: object
                x-apifox-refs: &ref_41
                  01HV3JTJ0FGTEWBDHHFJ74FZBE:
                    $ref: '#/components/schemas/Coupons'
                    x-apifox-overrides:
                      duration_in_weeks: null
                      duration_in_months: null
                      duration: null
                      applies_to: null
                x-apifox-orders: &ref_42
                  - 01HV3JTJ0FGTEWBDHHFJ74FZBE
                properties:
                  id: &ref_22
                    type: string
                    description: Unique identifier for the object.
                  amount_off: &ref_23
                    type: integer
                    description: >-
                      Amount (in the currency specified) that will be taken off
                      the subtotal of any invoices for this customer.
                    nullable: true
                  currency: &ref_24
                    type: string
                    description: >-
                      If amount_off has been set, the three-letter ISO code for
                      the currency of the amount to take off.
                    nullable: true
                  duration_in_days: &ref_25
                    type: string
                    description: >-
                      Required only if duration is repeating, in which case it
                      must be a positive integer that specifies the number of
                      weeks the discount will be in effect.
                  object: &ref_26
                    type: string
                    description: >-
                      String representing the object’s type. Objects of the same
                      type share the same value.
                  created: &ref_27
                    type: integer
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  livemode: &ref_28
                    type: boolean
                    description: >-
                      Has the value true if the object exists in live mode or
                      the value false if the object exists in test mode.
                  metadata:
                    type: object
                    properties: {}
                    x-apifox-orders: &ref_29 []
                    description: >-
                      Set of key-value pairs that you can attach to an object.
                      This can be useful for storing additional information
                      about the object in a structured format.
                    x-apifox-ignore-properties: []
                  name: &ref_30
                    type: string
                    description: >-
                      Name of the coupon displayed to customers on for instance
                      invoices or receipts.
                  percent_off: &ref_31
                    type: number
                    description: >-
                      Percent that will be taken off the subtotal of any
                      invoices for this customer for the duration of the coupon.
                      For example, a coupon with percent_off of 50 will make a
                      $100 invoice $50 instead.
                    nullable: true
                  max_redemptions: &ref_32
                    type: integer
                    description: >-
                      Maximum number of times this coupon can be redeemed, in
                      total, across all customers, before it is no longer valid.
                    nullable: true
                  redeem_by: &ref_33
                    type: integer
                    description: Date after which the coupon can no longer be redeemed.
                    nullable: true
                  times_redeemed: &ref_34
                    type: integer
                    description: >-
                      Number of times this coupon has been applied to a
                      customer.
                  valid: &ref_35
                    type: boolean
                    description: >-
                      Taking account of the above properties, whether this
                      coupon can still be applied to a customer.
                  currency_options:
                    type: object
                    properties:
                      <currency>.amount_off: &ref_36
                        type: integer
                        description: >-
                          Amount (in the currency specified) that will be taken
                          off the subtotal of any invoices for this customer.
                    description: >-
                      Coupons defined in each available currency option. Each
                      key must be a three-letter ISO currency code and a
                      supported currency.
                    x-apifox-orders: &ref_37
                      - <currency>.amount_off
                    x-apifox-ignore-properties: []
                description: Hash describing the coupon applied to create this discount.
                required:
                  - duration_in_days
                x-apifox-ignore-properties:
                  - id
                  - amount_off
                  - currency
                  - duration_in_days
                  - object
                  - created
                  - livemode
                  - metadata
                  - name
                  - percent_off
                  - max_redemptions
                  - redeem_by
                  - times_redeemed
                  - valid
                  - currency_options
              customer: &ref_43
                type: string
                description: The ID of the customer associated with this discount.
              start: &ref_44
                type: integer
                description: Date that the coupon was applied.
              end: &ref_45
                type: 'null'
                description: >-
                  If the coupon has a duration of repeating, the date that this
                  discount will end. If the coupon has a duration of once or
                  forever, this attribute will be null.
              promotion_code: &ref_46
                type: 'null'
                description: The promotion code applied to create this discount.
              subscription: &ref_47
                type: 'null'
                description: >-
                  The subscription that this coupon is applied to, if it is
                  applied to a particular subscription.
            x-apifox-ignore-properties:
              - id
              - object
              - checkout_session
              - coupon
              - customer
              - start
              - end
              - promotion_code
              - subscription
          description: The discounts applied to the line item.
        amount_discount:
          type: integer
          description: >-
            Total discount amount applied. If no discounts were applied,
            defaults to 0.
        amount_tax:
          type: string
          description: （未实现）Total tax amount applied. If no tax was applied, defaults to 0.
      x-apifox-orders:
        - id
        - object
        - amount_subtotal
        - amount_total
        - currency
        - description
        - price
        - quantity
        - taxes
        - discounts
        - amount_discount
        - amount_tax
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Coupons:
      type: object
      properties:
        id: *ref_22
        amount_off: *ref_23
        currency: *ref_24
        duration:
          type: string
          description: >-
            One of forever, once, and repeating. Describes how long a customer
            who applies this coupon will get the discount.
          enum:
            - forever
            - once
            - repeating
          x-apifox-enum:
            - value: forever
              name: ''
              description: >-
                Applies to all charges from a subscription with this coupon
                applied.
            - value: once
              name: ''
              description: >-
                Applies to the first charge from a subscription with this coupon
                applied.
            - value: repeating
              name: ''
              description: >-
                Applies to charges in the first duration_in_months months from a
                subscription with this coupon applied.
        duration_in_months:
          type: integer
          description: >-
            Required only if duration is repeating, in which case it must be a
            positive integer that specifies the number of months the discount
            will be in effect.
        duration_in_weeks:
          type: string
          description: >-
            Required only if duration is repeating, in which case it must be a
            positive integer that specifies the number of weeks the discount
            will be in effect.
        duration_in_days: *ref_25
        object: *ref_26
        created: *ref_27
        livemode: *ref_28
        metadata:
          type: object
          properties: {}
          x-apifox-orders: *ref_29
          description: >-
            Set of key-value pairs that you can attach to an object. This can be
            useful for storing additional information about the object in a
            structured format.
          x-apifox-ignore-properties: []
        name: *ref_30
        percent_off: *ref_31
        max_redemptions: *ref_32
        redeem_by: *ref_33
        times_redeemed: *ref_34
        valid: *ref_35
        applies_to:
          type: object
          properties:
            products:
              type: array
              items:
                type: string
              description: A list of product IDs this coupon applies to
          description: Contains information about what this coupon applies to.
          x-apifox-orders:
            - products
          x-apifox-ignore-properties: []
        currency_options:
          type: object
          properties:
            <currency>.amount_off: *ref_36
          description: >-
            Coupons defined in each available currency option. Each key must be
            a three-letter ISO currency code and a supported currency.
          x-apifox-orders: *ref_37
          x-apifox-ignore-properties: []
      x-apifox-orders:
        - id
        - amount_off
        - currency
        - duration
        - duration_in_months
        - duration_in_weeks
        - duration_in_days
        - object
        - created
        - livemode
        - metadata
        - name
        - percent_off
        - max_redemptions
        - redeem_by
        - times_redeemed
        - valid
        - applies_to
        - currency_options
      required:
        - duration_in_weeks
        - duration_in_days
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Discounts:
      type: object
      properties:
        id: *ref_38
        object: *ref_39
        checkout_session: *ref_40
        coupon:
          type: object
          x-apifox-refs: *ref_41
          x-apifox-orders: *ref_42
          properties:
            id: *ref_22
            amount_off: *ref_23
            currency: *ref_24
            duration_in_days: *ref_25
            object: *ref_26
            created: *ref_27
            livemode: *ref_28
            metadata:
              type: object
              properties: {}
              x-apifox-orders: *ref_29
              description: >-
                Set of key-value pairs that you can attach to an object. This
                can be useful for storing additional information about the
                object in a structured format.
              x-apifox-ignore-properties: []
            name: *ref_30
            percent_off: *ref_31
            max_redemptions: *ref_32
            redeem_by: *ref_33
            times_redeemed: *ref_34
            valid: *ref_35
            currency_options:
              type: object
              properties:
                <currency>.amount_off: *ref_36
              description: >-
                Coupons defined in each available currency option. Each key must
                be a three-letter ISO currency code and a supported currency.
              x-apifox-orders: *ref_37
              x-apifox-ignore-properties: []
          description: Hash describing the coupon applied to create this discount.
          required:
            - duration_in_days
          x-apifox-ignore-properties:
            - id
            - amount_off
            - currency
            - duration_in_days
            - object
            - created
            - livemode
            - metadata
            - name
            - percent_off
            - max_redemptions
            - redeem_by
            - times_redeemed
            - valid
            - currency_options
        customer: *ref_43
        start: *ref_44
        end: *ref_45
        promotion_code: *ref_46
        invoice:
          type: 'null'
          description: （未完成）
        invoice_item:
          type: 'null'
          description: （未完成）
        subscription: *ref_47
      x-apifox-orders:
        - id
        - object
        - checkout_session
        - coupon
        - customer
        - start
        - end
        - promotion_code
        - invoice
        - invoice_item
        - subscription
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Payment Link:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object, like 'plink_xxxx'.
        object:
          type: string
          description: '"payment_link"'
        active:
          type: boolean
          description: >-
            Whether the payment link’s url is active. If false, customers
            visiting the URL will be shown a page saying that the link has been
            deactivated.
        after_completion:
          type: object
          properties:
            type:
              type: string
              description: The specified behavior after the purchase is complete.
              enum:
                - redirect
                - hosted_confirmation
              x-apifox-enum:
                - value: redirect
                  name: ''
                  description: >-
                    Redirects the customer to the specified url after the
                    purchase is complete.
                - value: hosted_confirmation
                  name: ''
                  description: >-
                    Displays a message on the hosted surface after the purchase
                    is complete.
            hosted_confirmation:
              type: object
              properties:
                custom_message:
                  type: string
                  description: >-
                    The custom message that is displayed to the customer after
                    the purchase is complete.
              x-apifox-orders:
                - custom_message
              description: Configuration when type=hosted_confirmation.
              x-apifox-ignore-properties: []
            redirect:
              type: object
              properties:
                url:
                  type: string
                  description: >-
                    The URL the customer will be redirected to after the
                    purchase is complete.
              description: Configuration when type=redirect.
              x-apifox-orders:
                - url
              x-apifox-ignore-properties: []
          x-apifox-orders:
            - type
            - hosted_confirmation
            - redirect
          description: Behavior after the purchase is complete.
          x-apifox-ignore-properties: []
        billing_address_collection:
          type: string
          description: Configuration for collecting the customer’s billing address.
          enum:
            - auto
            - required
          x-apifox-enum:
            - value: auto
              name: ''
              description: >-
                (DEFAULT) Checkout will only collect the billing address when
                necessary.
            - value: required
              name: ''
              description: Checkout will always collect the customer’s billing address.
        currency:
          type: string
          description: Three-letter ISO currency code. Must be a supported currency.
        livemode:
          type: boolean
          description: >-
            Has the value true if the object exists in live mode or the value
            false if the object exists in test mode.
        metadata:
          type: object
          properties: {}
          x-apifox-orders: []
          description: >-
            Set of key-value pairs that you can attach to an object. This can be
            useful for storing additional information about the object in a
            structured format.
          x-apifox-ignore-properties: []
        phone_number_collection:
          type: object
          properties:
            enabled:
              type: boolean
              description: If true, a phone number will be collected during checkout.
          x-apifox-orders:
            - enabled
          description: Controls phone number collection settings during checkout.
          x-apifox-ignore-properties: []
        shipping_address_collection:
          type: object
          properties:
            allowed_countries:
              type: array
              items:
                type: string
              description: >-
                An array of two-letter ISO country codes representing which
                countries Checkout should provide as options for shipping
                locations.
          description: Configuration for collecting the customer’s shipping address.
          x-apifox-orders:
            - allowed_countries
          x-apifox-ignore-properties: []
        url:
          type: string
          description: The public URL that can be shared with customers.
        line_items:
          description: >-
            The line items representing what is being sold. This field is not
            included by default. This field is not included by default. To
            include it in the response, expand the line_items field.
          type: object
          properties:
            object:
              type: string
              default: '"list"'
            url:
              type: string
            has_more:
              type: boolean
            data:
              type: array
              items:
                type: object
                x-apifox-refs:
                  01GMT2EE0DZPW4YXF2HRYCWGP4: *ref_48
                x-apifox-orders:
                  - 01GMT2EE0DZPW4YXF2HRYCWGP4
                properties:
                  id: *ref_49
                  object: *ref_50
                  amount_subtotal: *ref_51
                  amount_total: *ref_52
                  currency: *ref_53
                  description: *ref_54
                  price:
                    type: object
                    x-apifox-refs: *ref_55
                    x-apifox-orders: *ref_56
                    properties:
                      id: *ref_1
                      object: *ref_2
                      active: *ref_3
                      billing_scheme:
                        type: string
                        description: >-
                          Describes how to compute the price per period. Either
                          per_unit or tiered
                        enum: *ref_4
                        x-apifox-enum:
                          - value: per_unit
                            name: ''
                            description: only per_unit is supported now.
                          - value: tiered
                            name: ''
                            description: ''
                      created: *ref_5
                      currency: *ref_6
                      livemode: *ref_7
                      lookup_key: *ref_8
                      metadata:
                        type: object
                        properties: {}
                        x-apifox-orders: *ref_9
                        description: >-
                          Set of key-value pairs that you can attach to an
                          object. This can be useful for storing additional
                          information about the object in a structured format.
                        x-apifox-ignore-properties: []
                      nickname: *ref_10
                      product: *ref_11
                      type:
                        type: string
                        description: >-
                          One of one_time or recurring depending on whether the
                          price is for a one-time purchase or a recurring
                          (subscription) purchase.
                        enum: *ref_12
                        x-apifox-enum:
                          - value: one_time
                            name: ''
                            description: only one-time is supported now.
                          - value: recurring
                            name: ''
                            description: ''
                      unit_amount: *ref_13
                      recurring:
                        type: object
                        properties:
                          interval:
                            type: string
                            description: >-
                              The frequency at which a subscription is billed.
                              One of day, week, month or year.
                            enum: *ref_14
                            x-apifox-enum:
                              - value: day
                                name: ''
                                description: ''
                              - value: week
                                name: ''
                                description: ''
                              - value: month
                                name: ''
                                description: ''
                              - value: year
                                name: ''
                                description: ''
                          interval_count: *ref_15
                          usage_type:
                            type: string
                            description: >-
                              Configures how the quantity per period should be
                              determined.
                            enum: *ref_16
                            x-apifox-enum:
                              - value: licensed
                                name: ''
                                description: ''
                        x-apifox-orders: *ref_17
                        description: The recurring components of a price
                        required:
                          - interval
                        x-apifox-ignore-properties: []
                      tiers:
                        type: array
                        items:
                          type: object
                          properties:
                            up_to: *ref_18
                            flat_amount: *ref_19
                            unit_amount: *ref_20
                          x-apifox-orders: *ref_21
                          x-apifox-ignore-properties: []
                        description: （未实现）
                    description: The price used to generate the line item.
                    x-apifox-ignore-properties:
                      - id
                      - object
                      - active
                      - billing_scheme
                      - created
                      - currency
                      - livemode
                      - lookup_key
                      - metadata
                      - nickname
                      - product
                      - type
                      - unit_amount
                      - recurring
                      - tiers
                  quantity: *ref_57
                x-apifox-ignore-properties:
                  - id
                  - object
                  - amount_subtotal
                  - amount_total
                  - currency
                  - description
                  - price
                  - quantity
          x-apifox-refs: {}
          x-apifox-orders:
            - object
            - url
            - has_more
            - data
          x-apifox-ignore-properties: []
        created:
          type: integer
          description: >-
            Time at which the object was created. Measured in seconds since the
            Unix epoch.
        allow_promotion_codes:
          type: boolean
          description: （未实现）
        application_fee_amount:
          type: 'null'
          description: （未实现）
        application_fee_percent:
          type: 'null'
          description: （未实现）
        automatic_tax:
          type: object
          properties:
            enabled:
              type: boolean
          x-apifox-orders:
            - enabled
          description: （未实现）
          x-apifox-ignore-properties: []
        consent_collection:
          type: 'null'
          description: （未实现）
        customer_creation:
          type: string
          description: （未实现）
        custom_text:
          type: object
          properties:
            shipping_address:
              type: 'null'
            submit:
              type: 'null'
          x-apifox-orders:
            - shipping_address
            - submit
          description: （未实现）
          x-apifox-ignore-properties: []
        payment_intent_data:
          type: 'null'
          description: （未实现）
        on_behalf_of:
          type: 'null'
          description: （未实现）
        payment_method_collection:
          type: string
          description: （未实现）
        payment_method_types:
          type: 'null'
          description: （未实现）
        shipping_options:
          type: array
          items:
            type: string
          description: （未实现）
        submit_type:
          type: string
          description: （未实现）
        transfer_data:
          type: 'null'
          description: （未实现）
        subscription_data:
          type: 'null'
          description: （未实现）
        tax_id_collection:
          type: object
          properties:
            enabled:
              type: boolean
          x-apifox-orders:
            - enabled
          description: （未实现）
          x-apifox-ignore-properties: []
      x-apifox-orders:
        - id
        - object
        - active
        - after_completion
        - billing_address_collection
        - currency
        - livemode
        - metadata
        - phone_number_collection
        - shipping_address_collection
        - url
        - line_items
        - created
        - allow_promotion_codes
        - application_fee_amount
        - application_fee_percent
        - automatic_tax
        - consent_collection
        - customer_creation
        - custom_text
        - payment_intent_data
        - on_behalf_of
        - payment_method_collection
        - payment_method_types
        - shipping_options
        - submit_type
        - transfer_data
        - subscription_data
        - tax_id_collection
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
  securitySchemes:
    basic:
      type: http
      scheme: basic
servers:
  - url: https://apitest.wooshpay.com
    description: 官网测试
security:
  - basic: []

```
