> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paynext.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Find payments

> Find payments you've previously created using PayNext's Search Query Language. Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind.

## Search Query Language

Build a search query by combining one or more search clauses. A clause has the format `field operator value` where the operators are `:`, `~`, `>`, `<`, `>=`, `<=`, or the prefix `-` for negation.

### Operators

| Operator | Description | Example |
|---|---|---|
| `:` | Exact match (case-insensitive) | `payment_status:"SETTLED"` |
| `~` | Substring match (min 3 chars, case-insensitive) | `statement_descriptor~"ACME"` |
| `>` | Greater than | `amount>5000` |
| `>=` | Greater than or equal | `amount>=5000` |
| `<` | Less than | `amount<10000` |
| `<=` | Less than or equal | `amount<=10000` |
| `-` | Negation (prefix) | `-payment_status:"CANCELLED"` |

### Logical Operators

Combine clauses with `AND` or `OR`. Clauses separated by a space default to `AND` logic. You cannot mix `AND` and `OR` in the same query. Maximum of 10 clauses per query.

### Quoting

String values must be enclosed in single or double quotes. Numeric values do not require quotes. Escape quotes with a backslash.

### Metadata

Query metadata fields using bracket notation: `metadata["key"]:"value"`. Check for the presence of a metadata key: `-metadata["key"]:null`.

### Null Checks

Use `field:null` to find records where a field is empty or absent. Use `-field:null` to find records where a field is present.

### Nested Fields

Access nested object fields using dot notation. Examples:
- `customer.email:"jane@example.com"`
- `payment_method.type:"CARD"`
- `payment_method.details.last4:"1111"`
- `subscription.status:"active"`

### Searchable Payment Fields

**Top-level fields:**

| Field | Type | Operators |
|---|---|---|
| `id` | token | `:` |
| `amount` | numeric | `:`, `>`, `>=`, `<`, `<=` |
| `amount_usd` | numeric | `:`, `>`, `>=`, `<`, `<=` |
| `currency_code` | string (ISO 4217) | `:` |
| `payment_status` | string (PENDING/FAILED/AUTHORIZED/SETTLING/SETTLED/DECLINED/BLOCKED/CANCELLED) | `:` |
| `payment_type` | string (MIT/CIT) | `:` |
| `transaction_type` | string (Auth/Settle) | `:` |
| `payment_token_type` | string (CARD_PAN/NETWORK_TOKEN/PROCESSOR_TOKEN) | `:` |
| `refunded_amount` | numeric | `:`, `>`, `>=`, `<`, `<=` |
| `statement_descriptor` | string | `:`, `~` |
| `created_at` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |
| `updated_at` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |
| `metadata["key"]` | string | `:` |

**Nested customer fields:**

| Field | Type | Operators |
|---|---|---|
| `customer.id` | token | `:` |
| `customer.email` | string | `:`, `~` |
| `customer.full_name` | string | `:`, `~` |
| `customer.phone` | string | `:`, `~` |
| `customer.external_id` | token | `:` |
| `customer.created_at` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |
| `customer.updated_at` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |
| `customer.metadata["key"]` | string | `:` |
| `customer.address.country` | string (ISO-2) | `:` |
| `customer.address.city` | string | `:`, `~` |
| `customer.address.state` | string | `:` |
| `customer.address.postal_code` | string | `:` |
| `customer.address.line1` | string | `:`, `~` |
| `customer.address.line2` | string | `:`, `~` |

**Nested payment_method fields — common:**

| Field | Type | Operators |
|---|---|---|
| `payment_method.type` | string (CARD/PAYPAL/VENMO/CASHAPP/APPLEPAY/GPAY) | `:` |

**When `payment_method.type:"CARD"`:**

| Field | Type | Operators |
|---|---|---|
| `payment_method.details.bin` | string | `:` |
| `payment_method.details.last4` | string | `:` |
| `payment_method.details.exp_month` | numeric | `:`, `>`, `>=`, `<`, `<=` |
| `payment_method.details.exp_year` | numeric | `:`, `>`, `>=`, `<`, `<=` |
| `payment_method.details.bin_data.brand` | string | `:` |
| `payment_method.details.bin_data.country` | string (ISO-2) | `:` |
| `payment_method.details.bin_data.funding` | string | `:` |
| `payment_method.details.bin_data.issuer` | string | `:`, `~` |

**When `payment_method.type:"PAYPAL"`:**

| Field | Type | Operators |
|---|---|---|
| `payment_method.details.payer_info.email` | string | `:`, `~` |
| `payment_method.details.payer_info.first_name` | string | `:`, `~` |
| `payment_method.details.payer_info.last_name` | string | `:`, `~` |
| `payment_method.details.payer_info.payer_id` | token | `:` |
| `payment_method.details.processor_customer_email` | string | `:`, `~` |
| `payment_method.details.processor_customer_id` | token | `:` |
| `payment_method.details.processor_payment_method_id` | token | `:` |

**When `payment_method.type:"VENMO"` / `"CASHAPP"`:**

| Field | Type | Operators |
|---|---|---|
| `payment_method.details.processor_customer_id` | token | `:` (CashApp only) |
| `payment_method.details.processor_payment_method_id` | token | `:` |

**When `payment_method.type:"APPLEPAY"` / `"GPAY"`:**

| Field | Type | Operators |
|---|---|---|
| `payment_method.details.token` | string | `:` |
| `payment_method.details.token_exp_month` | numeric | `:`, `>`, `>=`, `<`, `<=` |
| `payment_method.details.token_exp_year` | numeric | `:`, `>`, `>=`, `<`, `<=` |
| `payment_method.details.token_service_provider` | string | `:` |

**Nested payment_details fields:**

| Field | Type | Operators |
|---|---|---|
| `payment_details.arn` | string | `:` |
| `payment_details.auth_code` | string | `:` |
| `payment_details.network_payment_id` | string | `:` |
| `payment_details.processor_transaction_id` | string | `:` |

**Nested processor fields:**

| Field | Type | Operators |
|---|---|---|
| `processor.id` | token | `:` |
| `processor.type` | string (STRIPE/...) | `:` |

**Nested subscription fields:**

| Field | Type | Operators |
|---|---|---|
| `subscription.id` | token | `:` |
| `subscription.status` | string (trial/active/past_due/cancelled/scheduled_for_cancellation) | `:` |
| `subscription.created_at` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |
| `subscription.updated_at` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |
| `subscription.current_period_start` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |
| `subscription.current_period_end` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |
| `subscription.next_billing_date` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |
| `subscription.metadata["key"]` | string | `:` |

**Nested refund / check fields:**

| Field | Type | Operators |
|---|---|---|
| `refund.status` | string (PENDING/DECLINED/SETTLING/SETTLED) | `:` |
| `refund.amount` | numeric | `:`, `>`, `>=`, `<`, `<=` |
| `avs_check.result.postal_code` | string (pass/fail/...) | `:` |
| `avs_check.result.street_address` | string | `:` |
| `cvc_check.result.cvc` | string | `:` |
| `status_reason.status` | string (declined/failed) | `:` |
| `status_reason.decline_code` | string | `:` |
| `three_d_secure.status` | string (action-required/success/failure) | `:` |

**Card network token fields (when present):**

| Field | Type | Operators |
|---|---|---|
| `payment_method.details.network_token.bin` | string | `:` |
| `payment_method.details.network_token.last4` | string | `:` |
| `payment_method.details.network_token.expiry_month` | string | `:` |
| `payment_method.details.network_token.expiry_year` | string | `:` |

**Tax fields:**

| Field | Type | Operators |
|---|---|---|
| `tax.status` | string | `:` |
| `tax.behavior` | string (INCLUSIVE/EXCLUSIVE) | `:` |
| `tax.error.code` | string | `:` |
| `tax.error.message` | string | `:` |

**3-D Secure fields:**

| Field | Type | Operators |
|---|---|---|
| `three_d_secure.attempted` | boolean | `:` |
| `three_d_secure.flow` | string | `:` |
| `three_d_secure.liability_shift` | string | `:` |
| `three_d_secure.eci_value` | string | `:` |
| `three_d_secure.eci_result` | string | `:` |
| `three_d_secure.status_reason` | string | `:` |

**Decline detail and refund flag:**

| Field | Type | Operators |
|---|---|---|
| `status_reason.message` | string | `:`, `~` |
| `refund.is_refunded` | boolean | `:` |

**Fraud prevention fields:**

| Field | Type | Operators |
|---|---|---|
| `fraud_prevention` | object (presence; use `:null` / `-...:null`) | `:` |
| `fraud_prevention.visa_order_insight.type` | string | `:` |
| `fraud_prevention.visa_compelling_evidence.status` | string (accepted/declined) | `:` |
| `fraud_prevention.visa_rdr.status` | string (accepted/declined) | `:` |
| `fraud_prevention.visa_rdr.reason.code` | string | `:` |
| `fraud_prevention.visa_rdr.reason.name` | string | `:` |
| `fraud_prevention.visa_rdr.reason.category` | string | `:` |
| `fraud_prevention.mastercard_consumer_clarity.type` | string | `:` |



## OpenAPI

````yaml /api-reference/openapi3-v2.0.0.json get /payments
openapi: 3.0.1
info:
  contact: {}
  description: Billing API
  title: Billing v2.0.0
  version: '3.0'
servers:
  - url: https://sandbox-api.paynext.com/
security: []
paths:
  /payments:
    get:
      tags:
        - Payments
      summary: Find payments
      description: >-
        Find payments you've previously created using PayNext's Search Query
        Language. Don't use search in read-after-write flows where strict
        consistency is necessary. Under normal operating conditions, data is
        searchable in less than a minute. Occasionally, propagation of new or
        updated data can be up to an hour behind.


        ## Search Query Language


        Build a search query by combining one or more search clauses. A clause
        has the format `field operator value` where the operators are `:`, `~`,
        `>`, `<`, `>=`, `<=`, or the prefix `-` for negation.


        ### Operators


        | Operator | Description | Example |

        |---|---|---|

        | `:` | Exact match (case-insensitive) | `payment_status:"SETTLED"` |

        | `~` | Substring match (min 3 chars, case-insensitive) |
        `statement_descriptor~"ACME"` |

        | `>` | Greater than | `amount>5000` |

        | `>=` | Greater than or equal | `amount>=5000` |

        | `<` | Less than | `amount<10000` |

        | `<=` | Less than or equal | `amount<=10000` |

        | `-` | Negation (prefix) | `-payment_status:"CANCELLED"` |


        ### Logical Operators


        Combine clauses with `AND` or `OR`. Clauses separated by a space default
        to `AND` logic. You cannot mix `AND` and `OR` in the same query. Maximum
        of 10 clauses per query.


        ### Quoting


        String values must be enclosed in single or double quotes. Numeric
        values do not require quotes. Escape quotes with a backslash.


        ### Metadata


        Query metadata fields using bracket notation: `metadata["key"]:"value"`.
        Check for the presence of a metadata key: `-metadata["key"]:null`.


        ### Null Checks


        Use `field:null` to find records where a field is empty or absent. Use
        `-field:null` to find records where a field is present.


        ### Nested Fields


        Access nested object fields using dot notation. Examples:

        - `customer.email:"jane@example.com"`

        - `payment_method.type:"CARD"`

        - `payment_method.details.last4:"1111"`

        - `subscription.status:"active"`


        ### Searchable Payment Fields


        **Top-level fields:**


        | Field | Type | Operators |

        |---|---|---|

        | `id` | token | `:` |

        | `amount` | numeric | `:`, `>`, `>=`, `<`, `<=` |

        | `amount_usd` | numeric | `:`, `>`, `>=`, `<`, `<=` |

        | `currency_code` | string (ISO 4217) | `:` |

        | `payment_status` | string
        (PENDING/FAILED/AUTHORIZED/SETTLING/SETTLED/DECLINED/BLOCKED/CANCELLED)
        | `:` |

        | `payment_type` | string (MIT/CIT) | `:` |

        | `transaction_type` | string (Auth/Settle) | `:` |

        | `payment_token_type` | string (CARD_PAN/NETWORK_TOKEN/PROCESSOR_TOKEN)
        | `:` |

        | `refunded_amount` | numeric | `:`, `>`, `>=`, `<`, `<=` |

        | `statement_descriptor` | string | `:`, `~` |

        | `created_at` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |

        | `updated_at` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |

        | `metadata["key"]` | string | `:` |


        **Nested customer fields:**


        | Field | Type | Operators |

        |---|---|---|

        | `customer.id` | token | `:` |

        | `customer.email` | string | `:`, `~` |

        | `customer.full_name` | string | `:`, `~` |

        | `customer.phone` | string | `:`, `~` |

        | `customer.external_id` | token | `:` |

        | `customer.created_at` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |

        | `customer.updated_at` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=` |

        | `customer.metadata["key"]` | string | `:` |

        | `customer.address.country` | string (ISO-2) | `:` |

        | `customer.address.city` | string | `:`, `~` |

        | `customer.address.state` | string | `:` |

        | `customer.address.postal_code` | string | `:` |

        | `customer.address.line1` | string | `:`, `~` |

        | `customer.address.line2` | string | `:`, `~` |


        **Nested payment_method fields — common:**


        | Field | Type | Operators |

        |---|---|---|

        | `payment_method.type` | string
        (CARD/PAYPAL/VENMO/CASHAPP/APPLEPAY/GPAY) | `:` |


        **When `payment_method.type:"CARD"`:**


        | Field | Type | Operators |

        |---|---|---|

        | `payment_method.details.bin` | string | `:` |

        | `payment_method.details.last4` | string | `:` |

        | `payment_method.details.exp_month` | numeric | `:`, `>`, `>=`, `<`,
        `<=` |

        | `payment_method.details.exp_year` | numeric | `:`, `>`, `>=`, `<`,
        `<=` |

        | `payment_method.details.bin_data.brand` | string | `:` |

        | `payment_method.details.bin_data.country` | string (ISO-2) | `:` |

        | `payment_method.details.bin_data.funding` | string | `:` |

        | `payment_method.details.bin_data.issuer` | string | `:`, `~` |


        **When `payment_method.type:"PAYPAL"`:**


        | Field | Type | Operators |

        |---|---|---|

        | `payment_method.details.payer_info.email` | string | `:`, `~` |

        | `payment_method.details.payer_info.first_name` | string | `:`, `~` |

        | `payment_method.details.payer_info.last_name` | string | `:`, `~` |

        | `payment_method.details.payer_info.payer_id` | token | `:` |

        | `payment_method.details.processor_customer_email` | string | `:`, `~`
        |

        | `payment_method.details.processor_customer_id` | token | `:` |

        | `payment_method.details.processor_payment_method_id` | token | `:` |


        **When `payment_method.type:"VENMO"` / `"CASHAPP"`:**


        | Field | Type | Operators |

        |---|---|---|

        | `payment_method.details.processor_customer_id` | token | `:` (CashApp
        only) |

        | `payment_method.details.processor_payment_method_id` | token | `:` |


        **When `payment_method.type:"APPLEPAY"` / `"GPAY"`:**


        | Field | Type | Operators |

        |---|---|---|

        | `payment_method.details.token` | string | `:` |

        | `payment_method.details.token_exp_month` | numeric | `:`, `>`, `>=`,
        `<`, `<=` |

        | `payment_method.details.token_exp_year` | numeric | `:`, `>`, `>=`,
        `<`, `<=` |

        | `payment_method.details.token_service_provider` | string | `:` |


        **Nested payment_details fields:**


        | Field | Type | Operators |

        |---|---|---|

        | `payment_details.arn` | string | `:` |

        | `payment_details.auth_code` | string | `:` |

        | `payment_details.network_payment_id` | string | `:` |

        | `payment_details.processor_transaction_id` | string | `:` |


        **Nested processor fields:**


        | Field | Type | Operators |

        |---|---|---|

        | `processor.id` | token | `:` |

        | `processor.type` | string (STRIPE/...) | `:` |


        **Nested subscription fields:**


        | Field | Type | Operators |

        |---|---|---|

        | `subscription.id` | token | `:` |

        | `subscription.status` | string
        (trial/active/past_due/cancelled/scheduled_for_cancellation) | `:` |

        | `subscription.created_at` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=`
        |

        | `subscription.updated_at` | date (RFC3339) | `:`, `>`, `>=`, `<`, `<=`
        |

        | `subscription.current_period_start` | date (RFC3339) | `:`, `>`, `>=`,
        `<`, `<=` |

        | `subscription.current_period_end` | date (RFC3339) | `:`, `>`, `>=`,
        `<`, `<=` |

        | `subscription.next_billing_date` | date (RFC3339) | `:`, `>`, `>=`,
        `<`, `<=` |

        | `subscription.metadata["key"]` | string | `:` |


        **Nested refund / check fields:**


        | Field | Type | Operators |

        |---|---|---|

        | `refund.status` | string (PENDING/DECLINED/SETTLING/SETTLED) | `:` |

        | `refund.amount` | numeric | `:`, `>`, `>=`, `<`, `<=` |

        | `avs_check.result.postal_code` | string (pass/fail/...) | `:` |

        | `avs_check.result.street_address` | string | `:` |

        | `cvc_check.result.cvc` | string | `:` |

        | `status_reason.status` | string (declined/failed) | `:` |

        | `status_reason.decline_code` | string | `:` |

        | `three_d_secure.status` | string (action-required/success/failure) |
        `:` |


        **Card network token fields (when present):**


        | Field | Type | Operators |

        |---|---|---|

        | `payment_method.details.network_token.bin` | string | `:` |

        | `payment_method.details.network_token.last4` | string | `:` |

        | `payment_method.details.network_token.expiry_month` | string | `:` |

        | `payment_method.details.network_token.expiry_year` | string | `:` |


        **Tax fields:**


        | Field | Type | Operators |

        |---|---|---|

        | `tax.status` | string | `:` |

        | `tax.behavior` | string (INCLUSIVE/EXCLUSIVE) | `:` |

        | `tax.error.code` | string | `:` |

        | `tax.error.message` | string | `:` |


        **3-D Secure fields:**


        | Field | Type | Operators |

        |---|---|---|

        | `three_d_secure.attempted` | boolean | `:` |

        | `three_d_secure.flow` | string | `:` |

        | `three_d_secure.liability_shift` | string | `:` |

        | `three_d_secure.eci_value` | string | `:` |

        | `three_d_secure.eci_result` | string | `:` |

        | `three_d_secure.status_reason` | string | `:` |


        **Decline detail and refund flag:**


        | Field | Type | Operators |

        |---|---|---|

        | `status_reason.message` | string | `:`, `~` |

        | `refund.is_refunded` | boolean | `:` |


        **Fraud prevention fields:**


        | Field | Type | Operators |

        |---|---|---|

        | `fraud_prevention` | object (presence; use `:null` / `-...:null`) |
        `:` |

        | `fraud_prevention.visa_order_insight.type` | string | `:` |

        | `fraud_prevention.visa_compelling_evidence.status` | string
        (accepted/declined) | `:` |

        | `fraud_prevention.visa_rdr.status` | string (accepted/declined) | `:`
        |

        | `fraud_prevention.visa_rdr.reason.code` | string | `:` |

        | `fraud_prevention.visa_rdr.reason.name` | string | `:` |

        | `fraud_prevention.visa_rdr.reason.category` | string | `:` |

        | `fraud_prevention.mastercard_consumer_clarity.type` | string | `:` |
      operationId: findPayments
      parameters:
        - description: Specifies the version of the API to use
          in: header
          name: X-API-Version
          schema:
            enum:
              - 2.0.0
            type: string
            default: 2.0.0
          required: true
        - in: query
          name: query
          required: true
          schema:
            type: string
          description: >-
            The search query string. Uses PayNext's Search Query Language.
            Supports exact match (`:`), substring match (`~`), numeric
            comparisons (`>`, `>=`, `<`, `<=`), negation (`-`), logical
            operators (`AND`, `OR`), and nested field access (dot notation).
            Field names use dotted paths (for example `payment_status`,
            `customer.email`, `payment_method.details.last4`); short aliases are
            not accepted. See the endpoint description for the full list of
            searchable fields and their types. Maximum 10 clauses per query.
          example: payment_status:"SETTLED" AND customer.email~"jane"
        - in: query
          name: limit
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
          description: >-
            A limit on the number of objects to be returned. Limit can range
            between 1 and 100, and the default is 10.
        - in: query
          name: page
          schema:
            type: string
          description: >-
            A cursor for pagination across multiple pages of results. Don't
            include this parameter on the first call. Use the next_page value
            returned in a previous response to request subsequent results.
      responses:
        '200':
          description: >-
            A dictionary with a data property that contains an array of up to
            limit payments. If no payments match the query, the resulting array
            will be empty.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payments.SearchResultDTO'
              example:
                object: payments
                url: /v1/payments
                has_more: false
                next_page: null
                data:
                  - id: pay_e8a1b2c3-d4f5-6789-abcd-ef0123456789
                    amount: 15000
                    amount_usd: 15000
                    currency_code: USD
                    payment_status: SETTLED
                    payment_type: CIT
                    payment_token_type: CARD_PAN
                    refunded_amount: 0
                    refund_reason: null
                    statement_descriptor: ACME CORP
                    customer:
                      id: cus_b8d0fe7e-3a7f-4b5f-a68b-d31358b49c3f
                      email: alice.johnson@example.com
                      external_id: ext_001
                      full_name: Alice Johnson
                      phone: +1-555-123-4567
                      address:
                        city: San Francisco
                        country: US
                        line1: 123 Market Street
                        line2: Suite 400
                        postal_code: '94105'
                        state: CA
                      metadata:
                        key: value
                      created_at: '2025-05-28T14:00:00Z'
                      updated_at: '2025-05-28T14:05:00Z'
                    payment_method:
                      type: CARD
                      billing_address:
                        city: San Francisco
                        country: US
                        line1: 123 Market Street
                        line2: Suite 400
                        postal_code: '94105'
                        state: CA
                      details:
                        bin: '411111'
                        last4: '1111'
                        exp_month: 12
                        exp_year: 2028
                        is_network_tokenized: true
                        number: '4111111111111111'
                        bin_data:
                          brand: visa
                          country: US
                          currency_code: USD
                          description: Chase Sapphire Preferred
                          funding: credit
                          issuer: Chase Bank
                          type: consumer
                    payment_details:
                      arn: '74922051234567'
                      auth_code: '334385'
                      network_payment_id: '119676610486528'
                      processor_transaction_id: pi_3RgN6TJVVBuowJOx0B4fpGWi
                    processor:
                      id: a1b2c3d4-5678-90ab-cdef-1234567890ab
                      description: Stripe US
                      type: STRIPE
                      processor_merchant_id: '12345678'
                    subscription:
                      id: sub_123e4567-e89b-12d3-a456-426614174000
                      status: active
                      current_period_start: '2025-05-26T10:00:00Z'
                      current_period_end: '2025-06-26T10:00:00Z'
                      cancelled_at: null
                      cancellation_details:
                        reason: null
                        trigger_payment_id: null
                      next_billing_date: '2025-06-26T12:00:00Z'
                      past_due:
                        attempt_count: 0
                        max_attempts_count: 7
                      plan:
                        id: price_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                        name: Pro Plan
                        type: recurring
                        interval: months
                        interval_count: 1
                        trial_interval: days
                        trial_interval_count: 14
                        price:
                          amount: 1999
                          currency: USD
                        trial_price:
                          amount: 0
                          currency: USD
                        tax:
                          collect_tax: DEFAULT
                      metadata: {}
                      created_at: '2025-05-26T10:00:00Z'
                      updated_at: '2025-05-27T10:00:00Z'
                    refund:
                      amount: 0
                      amount_usd: 0
                      status: PENDING
                      processor_transaction_id: ''
                      created_at: '2025-05-26T10:15:00Z'
                      updated_at: '2025-05-26T10:15:00Z'
                    avs_check:
                      result:
                        postal_code: pass
                        street_address: pass
                    cvc_check:
                      result:
                        cvc: pass
                    tax:
                      amount_subtotal: 15000
                      amount_subtotal_usd: 15000
                      amount_tax: 0
                      amount_tax_usd: 0
                      behavior: EXCLUSIVE
                      status: calculated
                      provider:
                        id: numeral
                        type: NUMERAL
                      calculation_id: calc_123
                      transaction_id: tx_123
                    three_d_secure:
                      authentication_flow: challenge
                      status: success
                      version: 2.2.0
                      transaction_id: 3ds_123
                      electronic_commerce_indicator:
                        liability_shift: true
                        result: pass
                        value: '05'
                    status_reason:
                      status: declined
                      status_reason:
                        advice_code: do_not_try_again
                        decline_code: insufficient_funds
                        message: Card has insufficient funds
                    metadata:
                      order_id: ORD-12345
                    created_at: '2025-05-25T14:30:00Z'
                    updated_at: '2025-05-26T10:15:00Z'
                  - id: pay_e8a1b2c3-d4f5-6789-abcd-ef0123456789
                    amount: 15000
                    amount_usd: 15000
                    currency_code: USD
                    payment_status: SETTLED
                    payment_type: CIT
                    payment_token_type: CARD_PAN
                    refunded_amount: 0
                    refund_reason: null
                    statement_descriptor: ACME CORP
                    customer:
                      id: cus_b8d0fe7e-3a7f-4b5f-a68b-d31358b49c3f
                      email: alice.johnson@example.com
                      external_id: ext_001
                      full_name: Alice Johnson
                      phone: +1-555-123-4567
                      address:
                        city: San Francisco
                        country: US
                        line1: 123 Market Street
                        line2: Suite 400
                        postal_code: '94105'
                        state: CA
                      metadata:
                        key: value
                      created_at: '2025-05-28T14:00:00Z'
                      updated_at: '2025-05-28T14:05:00Z'
                    payment_method:
                      type: PAYPAL
                      details:
                        payer_info:
                          email: alice.johnson@example.com
                          first_name: Alice
                          last_name: Johnson
                          payer_id: PAYER12345
                          tenant: Tenant
                        processor_customer_email: alice.johnson@example.com
                        processor_customer_id: cus_pp_1234567890
                        processor_payment_method_id: pm_pp_1234567890
                      billing_address:
                        city: San Francisco
                        country: US
                        line1: 123 Market Street
                        line2: Suite 400
                        postal_code: '94105'
                        state: CA
                    payment_details:
                      arn: '74922051234567'
                      auth_code: '334385'
                      network_payment_id: '119676610486528'
                      processor_transaction_id: pi_3RgN6TJVVBuowJOx0B4fpGWi
                    processor:
                      id: a1b2c3d4-5678-90ab-cdef-1234567890ab
                      description: Stripe US
                      type: STRIPE
                      processor_merchant_id: '12345678'
                    subscription:
                      id: sub_123e4567-e89b-12d3-a456-426614174000
                      status: active
                      current_period_start: '2025-05-26T10:00:00Z'
                      current_period_end: '2025-06-26T10:00:00Z'
                      cancelled_at: null
                      cancellation_details:
                        reason: null
                        trigger_payment_id: null
                      next_billing_date: '2025-06-26T12:00:00Z'
                      past_due:
                        attempt_count: 0
                        max_attempts_count: 7
                      plan:
                        id: price_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                        name: Pro Plan
                        type: recurring
                        interval: months
                        interval_count: 1
                        trial_interval: days
                        trial_interval_count: 14
                        price:
                          amount: 1999
                          currency: USD
                        trial_price:
                          amount: 0
                          currency: USD
                        tax:
                          collect_tax: DEFAULT
                      metadata: {}
                      created_at: '2025-05-26T10:00:00Z'
                      updated_at: '2025-05-27T10:00:00Z'
                    refund:
                      amount: 0
                      amount_usd: 0
                      status: PENDING
                      processor_transaction_id: ''
                      created_at: '2025-05-26T10:15:00Z'
                      updated_at: '2025-05-26T10:15:00Z'
                    avs_check:
                      result:
                        postal_code: pass
                        street_address: pass
                    cvc_check:
                      result:
                        cvc: pass
                    tax:
                      amount_subtotal: 15000
                      amount_subtotal_usd: 15000
                      amount_tax: 0
                      amount_tax_usd: 0
                      behavior: EXCLUSIVE
                      status: calculated
                      provider:
                        id: numeral
                        type: NUMERAL
                      calculation_id: calc_123
                      transaction_id: tx_123
                    three_d_secure:
                      authentication_flow: challenge
                      status: success
                      version: 2.2.0
                      transaction_id: 3ds_123
                      electronic_commerce_indicator:
                        liability_shift: true
                        result: pass
                        value: '05'
                    status_reason:
                      status: declined
                      status_reason:
                        advice_code: do_not_try_again
                        decline_code: insufficient_funds
                        message: Card has insufficient funds
                    metadata:
                      order_id: ORD-12345
                    created_at: '2025-05-25T14:30:00Z'
                    updated_at: '2025-05-26T10:15:00Z'
                  - id: pay_e8a1b2c3-d4f5-6789-abcd-ef0123456789
                    amount: 15000
                    amount_usd: 15000
                    currency_code: USD
                    payment_status: SETTLED
                    payment_type: CIT
                    payment_token_type: CARD_PAN
                    refunded_amount: 0
                    refund_reason: null
                    statement_descriptor: ACME CORP
                    customer:
                      id: cus_b8d0fe7e-3a7f-4b5f-a68b-d31358b49c3f
                      email: alice.johnson@example.com
                      external_id: ext_001
                      full_name: Alice Johnson
                      phone: +1-555-123-4567
                      address:
                        city: San Francisco
                        country: US
                        line1: 123 Market Street
                        line2: Suite 400
                        postal_code: '94105'
                        state: CA
                      metadata:
                        key: value
                      created_at: '2025-05-28T14:00:00Z'
                      updated_at: '2025-05-28T14:05:00Z'
                    payment_method:
                      type: VENMO
                      details:
                        processor_payment_method_id: pm_venmo_1234567890
                    payment_details:
                      arn: '74922051234567'
                      auth_code: '334385'
                      network_payment_id: '119676610486528'
                      processor_transaction_id: pi_3RgN6TJVVBuowJOx0B4fpGWi
                    processor:
                      id: a1b2c3d4-5678-90ab-cdef-1234567890ab
                      description: Stripe US
                      type: STRIPE
                      processor_merchant_id: '12345678'
                    subscription:
                      id: sub_123e4567-e89b-12d3-a456-426614174000
                      status: active
                      current_period_start: '2025-05-26T10:00:00Z'
                      current_period_end: '2025-06-26T10:00:00Z'
                      cancelled_at: null
                      cancellation_details:
                        reason: null
                        trigger_payment_id: null
                      next_billing_date: '2025-06-26T12:00:00Z'
                      past_due:
                        attempt_count: 0
                        max_attempts_count: 7
                      plan:
                        id: price_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                        name: Pro Plan
                        type: recurring
                        interval: months
                        interval_count: 1
                        trial_interval: days
                        trial_interval_count: 14
                        price:
                          amount: 1999
                          currency: USD
                        trial_price:
                          amount: 0
                          currency: USD
                        tax:
                          collect_tax: DEFAULT
                      metadata: {}
                      created_at: '2025-05-26T10:00:00Z'
                      updated_at: '2025-05-27T10:00:00Z'
                    refund:
                      amount: 0
                      amount_usd: 0
                      status: PENDING
                      processor_transaction_id: ''
                      created_at: '2025-05-26T10:15:00Z'
                      updated_at: '2025-05-26T10:15:00Z'
                    avs_check:
                      result:
                        postal_code: pass
                        street_address: pass
                    cvc_check:
                      result:
                        cvc: pass
                    tax:
                      amount_subtotal: 15000
                      amount_subtotal_usd: 15000
                      amount_tax: 0
                      amount_tax_usd: 0
                      behavior: EXCLUSIVE
                      status: calculated
                      provider:
                        id: numeral
                        type: NUMERAL
                      calculation_id: calc_123
                      transaction_id: tx_123
                    three_d_secure:
                      authentication_flow: challenge
                      status: success
                      version: 2.2.0
                      transaction_id: 3ds_123
                      electronic_commerce_indicator:
                        liability_shift: true
                        result: pass
                        value: '05'
                    status_reason:
                      status: declined
                      status_reason:
                        advice_code: do_not_try_again
                        decline_code: insufficient_funds
                        message: Card has insufficient funds
                    metadata:
                      order_id: ORD-12345
                    created_at: '2025-05-25T14:30:00Z'
                    updated_at: '2025-05-26T10:15:00Z'
                  - id: pay_e8a1b2c3-d4f5-6789-abcd-ef0123456789
                    amount: 15000
                    amount_usd: 15000
                    currency_code: USD
                    payment_status: SETTLED
                    payment_type: CIT
                    payment_token_type: CARD_PAN
                    refunded_amount: 0
                    refund_reason: null
                    statement_descriptor: ACME CORP
                    customer:
                      id: cus_b8d0fe7e-3a7f-4b5f-a68b-d31358b49c3f
                      email: alice.johnson@example.com
                      external_id: ext_001
                      full_name: Alice Johnson
                      phone: +1-555-123-4567
                      address:
                        city: San Francisco
                        country: US
                        line1: 123 Market Street
                        line2: Suite 400
                        postal_code: '94105'
                        state: CA
                      metadata:
                        key: value
                      created_at: '2025-05-28T14:00:00Z'
                      updated_at: '2025-05-28T14:05:00Z'
                    payment_method:
                      type: CASHAPP
                      details:
                        processor_customer_id: cus_ca_1234567890
                        processor_payment_method_id: pm_ca_1234567890
                    payment_details:
                      arn: '74922051234567'
                      auth_code: '334385'
                      network_payment_id: '119676610486528'
                      processor_transaction_id: pi_3RgN6TJVVBuowJOx0B4fpGWi
                    processor:
                      id: a1b2c3d4-5678-90ab-cdef-1234567890ab
                      description: Stripe US
                      type: STRIPE
                      processor_merchant_id: '12345678'
                    subscription:
                      id: sub_123e4567-e89b-12d3-a456-426614174000
                      status: active
                      current_period_start: '2025-05-26T10:00:00Z'
                      current_period_end: '2025-06-26T10:00:00Z'
                      cancelled_at: null
                      cancellation_details:
                        reason: null
                        trigger_payment_id: null
                      next_billing_date: '2025-06-26T12:00:00Z'
                      past_due:
                        attempt_count: 0
                        max_attempts_count: 7
                      plan:
                        id: price_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                        name: Pro Plan
                        type: recurring
                        interval: months
                        interval_count: 1
                        trial_interval: days
                        trial_interval_count: 14
                        price:
                          amount: 1999
                          currency: USD
                        trial_price:
                          amount: 0
                          currency: USD
                        tax:
                          collect_tax: DEFAULT
                      metadata: {}
                      created_at: '2025-05-26T10:00:00Z'
                      updated_at: '2025-05-27T10:00:00Z'
                    refund:
                      amount: 0
                      amount_usd: 0
                      status: PENDING
                      processor_transaction_id: ''
                      created_at: '2025-05-26T10:15:00Z'
                      updated_at: '2025-05-26T10:15:00Z'
                    avs_check:
                      result:
                        postal_code: pass
                        street_address: pass
                    cvc_check:
                      result:
                        cvc: pass
                    tax:
                      amount_subtotal: 15000
                      amount_subtotal_usd: 15000
                      amount_tax: 0
                      amount_tax_usd: 0
                      behavior: EXCLUSIVE
                      status: calculated
                      provider:
                        id: numeral
                        type: NUMERAL
                      calculation_id: calc_123
                      transaction_id: tx_123
                    three_d_secure:
                      authentication_flow: challenge
                      status: success
                      version: 2.2.0
                      transaction_id: 3ds_123
                      electronic_commerce_indicator:
                        liability_shift: true
                        result: pass
                        value: '05'
                    status_reason:
                      status: declined
                      status_reason:
                        advice_code: do_not_try_again
                        decline_code: insufficient_funds
                        message: Card has insufficient funds
                    metadata:
                      order_id: ORD-12345
                    created_at: '2025-05-25T14:30:00Z'
                    updated_at: '2025-05-26T10:15:00Z'
                  - id: pay_e8a1b2c3-d4f5-6789-abcd-ef0123456789
                    amount: 15000
                    amount_usd: 15000
                    currency_code: USD
                    payment_status: SETTLED
                    payment_type: CIT
                    payment_token_type: CARD_PAN
                    refunded_amount: 0
                    refund_reason: null
                    statement_descriptor: ACME CORP
                    customer:
                      id: cus_b8d0fe7e-3a7f-4b5f-a68b-d31358b49c3f
                      email: alice.johnson@example.com
                      external_id: ext_001
                      full_name: Alice Johnson
                      phone: +1-555-123-4567
                      address:
                        city: San Francisco
                        country: US
                        line1: 123 Market Street
                        line2: Suite 400
                        postal_code: '94105'
                        state: CA
                      metadata:
                        key: value
                      created_at: '2025-05-28T14:00:00Z'
                      updated_at: '2025-05-28T14:05:00Z'
                    payment_method:
                      type: APPLEPAY
                      details:
                        token: ap_token_12345678
                        token_exp_month: 12
                        token_exp_year: 2028
                        token_service_provider: APPLE
                      billing_address:
                        city: San Francisco
                        country: US
                        line1: 123 Market Street
                        line2: Suite 400
                        postal_code: '94105'
                        state: CA
                    payment_details:
                      arn: '74922051234567'
                      auth_code: '334385'
                      network_payment_id: '119676610486528'
                      processor_transaction_id: pi_3RgN6TJVVBuowJOx0B4fpGWi
                    processor:
                      id: a1b2c3d4-5678-90ab-cdef-1234567890ab
                      description: Stripe US
                      type: STRIPE
                      processor_merchant_id: '12345678'
                    subscription:
                      id: sub_123e4567-e89b-12d3-a456-426614174000
                      status: active
                      current_period_start: '2025-05-26T10:00:00Z'
                      current_period_end: '2025-06-26T10:00:00Z'
                      cancelled_at: null
                      cancellation_details:
                        reason: null
                        trigger_payment_id: null
                      next_billing_date: '2025-06-26T12:00:00Z'
                      past_due:
                        attempt_count: 0
                        max_attempts_count: 7
                      plan:
                        id: price_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                        name: Pro Plan
                        type: recurring
                        interval: months
                        interval_count: 1
                        trial_interval: days
                        trial_interval_count: 14
                        price:
                          amount: 1999
                          currency: USD
                        trial_price:
                          amount: 0
                          currency: USD
                        tax:
                          collect_tax: DEFAULT
                      metadata: {}
                      created_at: '2025-05-26T10:00:00Z'
                      updated_at: '2025-05-27T10:00:00Z'
                    refund:
                      amount: 0
                      amount_usd: 0
                      status: PENDING
                      processor_transaction_id: ''
                      created_at: '2025-05-26T10:15:00Z'
                      updated_at: '2025-05-26T10:15:00Z'
                    avs_check:
                      result:
                        postal_code: pass
                        street_address: pass
                    cvc_check:
                      result:
                        cvc: pass
                    tax:
                      amount_subtotal: 15000
                      amount_subtotal_usd: 15000
                      amount_tax: 0
                      amount_tax_usd: 0
                      behavior: EXCLUSIVE
                      status: calculated
                      provider:
                        id: numeral
                        type: NUMERAL
                      calculation_id: calc_123
                      transaction_id: tx_123
                    three_d_secure:
                      authentication_flow: challenge
                      status: success
                      version: 2.2.0
                      transaction_id: 3ds_123
                      electronic_commerce_indicator:
                        liability_shift: true
                        result: pass
                        value: '05'
                    status_reason:
                      status: declined
                      status_reason:
                        advice_code: do_not_try_again
                        decline_code: insufficient_funds
                        message: Card has insufficient funds
                    metadata:
                      order_id: ORD-12345
                    created_at: '2025-05-25T14:30:00Z'
                    updated_at: '2025-05-26T10:15:00Z'
                  - id: pay_e8a1b2c3-d4f5-6789-abcd-ef0123456789
                    amount: 15000
                    amount_usd: 15000
                    currency_code: USD
                    payment_status: SETTLED
                    payment_type: CIT
                    payment_token_type: CARD_PAN
                    refunded_amount: 0
                    refund_reason: null
                    statement_descriptor: ACME CORP
                    customer:
                      id: cus_b8d0fe7e-3a7f-4b5f-a68b-d31358b49c3f
                      email: alice.johnson@example.com
                      external_id: ext_001
                      full_name: Alice Johnson
                      phone: +1-555-123-4567
                      address:
                        city: San Francisco
                        country: US
                        line1: 123 Market Street
                        line2: Suite 400
                        postal_code: '94105'
                        state: CA
                      metadata:
                        key: value
                      created_at: '2025-05-28T14:00:00Z'
                      updated_at: '2025-05-28T14:05:00Z'
                    payment_method:
                      type: GPAY
                      details:
                        token: gp_token_12345678
                        token_exp_month: 12
                        token_exp_year: 2028
                        token_service_provider: GOOGLE
                      billing_address:
                        city: San Francisco
                        country: US
                        line1: 123 Market Street
                        line2: Suite 400
                        postal_code: '94105'
                        state: CA
                    payment_details:
                      arn: '74922051234567'
                      auth_code: '334385'
                      network_payment_id: '119676610486528'
                      processor_transaction_id: pi_3RgN6TJVVBuowJOx0B4fpGWi
                    processor:
                      id: a1b2c3d4-5678-90ab-cdef-1234567890ab
                      description: Stripe US
                      type: STRIPE
                      processor_merchant_id: '12345678'
                    subscription:
                      id: sub_123e4567-e89b-12d3-a456-426614174000
                      status: active
                      current_period_start: '2025-05-26T10:00:00Z'
                      current_period_end: '2025-06-26T10:00:00Z'
                      cancelled_at: null
                      cancellation_details:
                        reason: null
                        trigger_payment_id: null
                      next_billing_date: '2025-06-26T12:00:00Z'
                      past_due:
                        attempt_count: 0
                        max_attempts_count: 7
                      plan:
                        id: price_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                        name: Pro Plan
                        type: recurring
                        interval: months
                        interval_count: 1
                        trial_interval: days
                        trial_interval_count: 14
                        price:
                          amount: 1999
                          currency: USD
                        trial_price:
                          amount: 0
                          currency: USD
                        tax:
                          collect_tax: DEFAULT
                      metadata: {}
                      created_at: '2025-05-26T10:00:00Z'
                      updated_at: '2025-05-27T10:00:00Z'
                    refund:
                      amount: 0
                      amount_usd: 0
                      status: PENDING
                      processor_transaction_id: ''
                      created_at: '2025-05-26T10:15:00Z'
                      updated_at: '2025-05-26T10:15:00Z'
                    avs_check:
                      result:
                        postal_code: pass
                        street_address: pass
                    cvc_check:
                      result:
                        cvc: pass
                    tax:
                      amount_subtotal: 15000
                      amount_subtotal_usd: 15000
                      amount_tax: 0
                      amount_tax_usd: 0
                      behavior: EXCLUSIVE
                      status: calculated
                      provider:
                        id: numeral
                        type: NUMERAL
                      calculation_id: calc_123
                      transaction_id: tx_123
                    three_d_secure:
                      authentication_flow: challenge
                      status: success
                      version: 2.2.0
                      transaction_id: 3ds_123
                      electronic_commerce_indicator:
                        liability_shift: true
                        result: pass
                        value: '05'
                    status_reason:
                      status: declined
                      status_reason:
                        advice_code: do_not_try_again
                        decline_code: insufficient_funds
                        message: Card has insufficient funds
                    metadata:
                      order_id: ORD-12345
                    created_at: '2025-05-25T14:30:00Z'
                    updated_at: '2025-05-26T10:15:00Z'
        '400':
          description: Bad Request — missing or invalid query parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    payments.SearchResultDTO:
      type: object
      properties:
        object:
          type: string
          enum:
            - payments
          description: String representing the object's type. Value is always `payments`.
          example: payments
        total_count:
          description: >-
            The accurate total number of records matching the query (not capped
            at 10,000). Returned alongside the cursor pagination fields.
          example: 142
          type: integer
        url:
          type: string
          description: The URL for accessing this list.
          example: /v1/payments
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/core_model.PaymentWithSubscriptionPlanCustomerRelationsResDTO
          description: >-
            An array of up to limit payments that match the query. Each entry in
            the array is a separate payment object. If no payments match the
            query, the resulting array will be empty.
        has_more:
          type: boolean
          description: >-
            Whether or not there are more elements available after this set. If
            false, this set comprises the end of the list.
          example: false
        next_page:
          type: string
          description: >-
            A cursor for use in pagination. If has_more is true, you can pass
            the value of next_page to a subsequent call to fetch the next page
            of results.
          example: null
          nullable: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - invalid_request_error
                - authentication_error
              description: The type of error returned.
              example: invalid_request_error
            code:
              type: string
              description: >-
                For some errors that could be handled programmatically, a short
                string indicating the error code reported.
              example: parameter_missing
            message:
              type: string
              description: A human-readable message providing more details about the error.
              example: 'Missing required parameter: email'
            param:
              type: string
              description: >-
                If the error is parameter-specific, the parameter related to the
                error.
              example: email
          required:
            - type
            - message
    core_model.PaymentWithSubscriptionPlanCustomerRelationsResDTO:
      properties:
        id:
          description: Unique identifier of the payment.
          example: pay_e8a1b2c3-d4f5-6789-abcd-ef0123456789
          type: string
          x-order: '0'
        fraud_prevention:
          allOf:
            - $ref: '#/components/schemas/core_model.FraudPreventionDTO'
          description: >-
            Fraud-prevention signals recorded against the payment by upstream
            Visa / Verifi / Mastercard notification flows (Visa Order Insight,
            Verifi Compelling Evidence (CE 3.0), Visa Rapid Dispute Resolution
            (RDR), Early Fraud Warning, Mastercard Consumer Clarity). Omitted
            when no signals have been recorded yet.
          type: object
        payment_attempts:
          description: >-
            Chronological list of processor attempts made for this payment.
            Populated when payment routing cascades across multiple processors;
            each entry records the processor used and its outcome.
          items:
            $ref: '#/components/schemas/core_model.PaymentAttemptWebhookData'
          nullable: true
          type: array
        amount:
          description: Payment amount in the specified currency (e.g., cents)
          example: 15000
          type: integer
        amount_usd:
          description: Payment amount converted to USD (e.g., cents)
          example: 15000
          type: integer
        avs_check:
          allOf:
            - $ref: '#/components/schemas/core_model.PaymentResAvsCheckDTO'
          description: Avs check
          type: object
        currency_code:
          description: >-
            The 3-letter currency code in ISO 4217 format. e.g. use USD for US
            dollars.
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYN
            - BZD
            - CAD
            - CDF
            - CHF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HTG
            - HUF
            - IDR
            - ILS
            - IMP
            - INR
            - IQD
            - IRR
            - ISK
            - JEP
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRU
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLE
            - SOS
            - SRD
            - SSP
            - STD
            - STN
            - SVC
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - BOV
            - COU
            - CHE
            - CHW
            - MXV
            - UGX
            - VES
            - VND
            - VUV
            - XAF
            - XCD
            - XCG
            - XOF
            - XPF
            - YER
            - USD
          type: string
        customer:
          $ref: '#/components/schemas/core_model.CustomerResDTO'
        cvc_check:
          allOf:
            - $ref: '#/components/schemas/core_model.PaymentResCVCCheckDTO'
          description: CVC check
          type: object
        payment_details:
          allOf:
            - $ref: '#/components/schemas/core_model.PaymentResPaymentDetailsDTO'
          description: Transaction details related to payment
          type: object
        payment_method:
          allOf:
            - $ref: '#/components/schemas/core_model.PaymentMethodResDTO'
          nullable: true
        payment_status:
          description: Current status of the payment
          enum:
            - PENDING
            - FAILED
            - AUTHORIZED
            - SETTLING
            - SETTLED
            - DECLINED
            - BLOCKED
            - CANCELLED
          type: string
        payment_token_type:
          description: Type of card token used, if applicable
          enum:
            - CARD_PAN
            - NETWORK_TOKEN
            - PROCESSOR_TOKEN
          type: string
        payment_type:
          description: >-
            Indicates whether the transaction was merchant-initiated (MIT) or
            customer-initiated (CIT).
          enum:
            - MIT
            - CIT
          type: string
        processor:
          $ref: '#/components/schemas/core_model.ProcessorResDTO'
        refund:
          allOf:
            - $ref: '#/components/schemas/core_model.RefundData'
          description: Information about refund
          type: object
        refunded_amount:
          description: Amount refunded from the original payment
          example: 0
          type: integer
        refund_reason:
          description: >-
            Server-attested reason the payment was refunded; present only once a
            refund has executed, null otherwise
          enum:
            - merchant_initiated
            - fraud_prevention
          example: fraud_prevention
          type: string
        statement_descriptor:
          description: Statement descriptor shown on the customer's bank statement
          example: MY COMPANY
          type: string
        status_reason:
          allOf:
            - $ref: '#/components/schemas/core_model.PaymentResStatusReasonDTO'
          description: Reason of payment status
          type: object
        subscription:
          $ref: '#/components/schemas/core_model.CustomerSubscriptionWithPlanResDTO'
        tax:
          allOf:
            - $ref: '#/components/schemas/core_model.PaymentTax'
          description: Tax info (provider, calculation/transaction ids, amounts, status)
          type: object
        three_d_secure:
          allOf:
            - $ref: '#/components/schemas/core_model.ThreeDSecureDataResDTO'
          description: Information about 3DS
          type: object
        metadata:
          additionalProperties:
            type: string
          description: |-
            Custom metadata associated with the payment
            A dictionary of key-value pairs.
          example:
            key: value
          type: object
        created_at:
          description: The date and time at which the payment was created in UTC format.
          example: '2025-05-25T14:30:00Z'
          type: string
          x-order: '1'
        updated_at:
          description: The date and time of the last payment update in UTC format.
          example: '2025-05-26T10:15:00Z'
          type: string
          x-order: '2'
      type: object
    core_model.FraudPreventionDTO:
      description: >-
        Structured fraud-prevention signals recorded against the payment by
        upstream Visa / Verifi / Mastercard notification flows. Each sub-object
        is set independently; absence of a sub-object means no signal of that
        kind has been recorded yet.
      properties:
        early_fraud_warning:
          allOf:
            - $ref: '#/components/schemas/core_model.EarlyFraudWarningDTO'
          description: >-
            Most recent Early Fraud Warning raised by an upstream PSP on this
            payment.
          type: object
        mastercard_consumer_clarity:
          allOf:
            - $ref: '#/components/schemas/core_model.MastercardConsumerClarityDTO'
          description: >-
            Most recent Mastercard Consumer Clarity (CC) inquiry recorded for
            this payment.
          type: object
        visa_compelling_evidence:
          allOf:
            - $ref: '#/components/schemas/core_model.VisaCompellingEvidenceDTO'
          description: >-
            Most recent Verifi Compelling Evidence (CE 3.0) decision recorded
            for this payment.
          type: object
        visa_order_insight:
          allOf:
            - $ref: '#/components/schemas/core_model.VisaOrderInsightDTO'
          description: Most recent Visa /orders insight lookup recorded for this payment.
          type: object
        visa_rdr:
          allOf:
            - $ref: '#/components/schemas/core_model.VisaRdrDTO'
          description: >-
            Most recent Visa Rapid Dispute Resolution (RDR) decision recorded
            for this payment.
          type: object
      type: object
    core_model.PaymentAttemptWebhookData:
      description: >-
        A single processor attempt recorded for the payment. When payment
        routing cascades across processors, each attempt (successful or failed)
        is captured here in chronological order.
      properties:
        created_at:
          description: The date and time at which the attempt was made, in UTC format.
          example: '2025-05-25T14:30:00Z'
          type: string
        payment_status:
          description: Status of this attempt.
          enum:
            - PENDING
            - FAILED
            - AUTHORIZED
            - SETTLING
            - SETTLED
            - DECLINED
            - BLOCKED
            - CANCELLED
          example: DECLINED
          type: string
        payment_token_type:
          description: Type of card token used for this attempt, if applicable.
          enum:
            - CARD_PAN
            - NETWORK_TOKEN
            - PROCESSOR_TOKEN
          type: string
        processor:
          allOf:
            - $ref: '#/components/schemas/core_model.ProcessorResDTO'
          description: Processor used for this attempt.
          type: object
        processor_transaction_id:
          description: >-
            Processor-side transaction identifier for this attempt, if
            available.
          example: ch_3Q9d2X2eZvKYlo2C0aBcDeFg
          type: string
        status_reason:
          allOf:
            - $ref: '#/components/schemas/core_model.Decline'
          description: Failure reason for this attempt, when it did not succeed.
          type: object
      type: object
    core_model.PaymentResAvsCheckDTO:
      properties:
        result:
          allOf:
            - $ref: '#/components/schemas/core_model.PaymentResAvsCheckResultDTO'
          description: Avs check result
          type: object
      type: object
    core_model.CustomerResDTO:
      properties:
        id:
          description: Unique identifier
          example: cus_b8d0fe7e-3a7f-4b5f-a68b-d31358b49c3f
          type: string
          x-order: '0'
        address:
          allOf:
            - $ref: '#/components/schemas/core_model.BillingAddress'
          description: Address associated with customer
          type: object
          x-order: '3'
        email:
          description: Email of the customer
          example: alice.johnson@example.com
          type: string
          x-order: '4'
        external_id:
          description: External ID of the customer
          example: ext_001
          type: string
          x-order: '5'
        full_name:
          description: Full name of the customer
          example: Alice Johnson
          type: string
          x-order: '7'
        phone:
          description: Customer's phone number
          example: +1-555-123-4567
          type: string
          x-order: '8'
        metadata:
          additionalProperties:
            type: string
          description: Additional metadata as a JSON object
          example:
            key: value
          type: object
          x-order: '6'
        created_at:
          description: The date and time the customer was created in UTC format
          example: '2025-05-28T14:00:00Z'
          type: string
          x-order: '1'
        updated_at:
          description: The date and time the customer was last updated in UTC format
          example: '2025-05-28T14:05:00Z'
          type: string
          x-order: '2'
      type: object
    core_model.PaymentResCVCCheckDTO:
      properties:
        result:
          allOf:
            - $ref: '#/components/schemas/core_model.PaymentResCVCCheckResultDTO'
          description: CVC check result
          type: object
      type: object
    core_model.PaymentResPaymentDetailsDTO:
      properties:
        arn:
          description: ARN
          example: '123453'
          type: string
        auth_code:
          description: Auth code
          example: '334385'
          type: string
        network_payment_id:
          description: Network payment ID
          example: '119676610486528'
          type: string
        processor_transaction_id:
          description: Processor transaction ID
          example: pi_3RgN6TJVVBuowJOx0B4fpGWi
          type: string
      type: object
    core_model.PaymentMethodResDTO:
      discriminator:
        mapping:
          APPLEPAY:
            $ref: '#/components/schemas/ApplepayAPISchema'
          CARD:
            $ref: '#/components/schemas/CardAPISchema'
          CASHAPP:
            $ref: '#/components/schemas/CashappAPISchema'
          GPAY:
            $ref: '#/components/schemas/GpayAPISchema'
          PAYPAL:
            $ref: '#/components/schemas/PaypalAPISchema'
          VENMO:
            $ref: '#/components/schemas/VenmoAPISchema'
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/CardAPISchema'
        - $ref: '#/components/schemas/PaypalAPISchema'
        - $ref: '#/components/schemas/VenmoAPISchema'
        - $ref: '#/components/schemas/CashappAPISchema'
        - $ref: '#/components/schemas/ApplepayAPISchema'
        - $ref: '#/components/schemas/GpayAPISchema'
    core_model.ProcessorResDTO:
      properties:
        description:
          description: Description of the processor
          example: Stripe US
          type: string
        id:
          description: Unique identifier of the processor
          example: a1b2c3d4-5678-90ab-cdef-1234567890ab
          type: string
          x-order: '0'
        processor_merchant_id:
          description: Merchant ID of the processor
          example: '12345678'
          type: string
        type:
          description: Type of the processor
          example: STRIPE
          type: string
      type: object
    core_model.RefundData:
      properties:
        amount:
          type: integer
        amount_usd:
          type: integer
        created_at:
          type: string
        processor_transaction_id:
          type: string
        status:
          $ref: '#/components/schemas/core_model.RefundStatus'
        updated_at:
          type: string
      type: object
    core_model.PaymentResStatusReasonDTO:
      properties:
        status:
          description: Status of error
          enum:
            - declined
            - failed
          example: declined
          type: string
        status_reason:
          allOf:
            - $ref: '#/components/schemas/core_model.PaymentStatusReason'
          description: Status Reason
          type: object
      type: object
    core_model.CustomerSubscriptionWithPlanResDTO:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the subscription
          example: sub_123e4567-e89b-12d3-a456-426614174000
        current_period_start:
          type: string
        current_period_end:
          type: string
        cancelled_at:
          description: >-
            UTC timestamp of when the subscription became cancelled; null unless
            the subscription is cancelled
          example: '2026-06-10T14:32:08Z'
          type: string
        cancellation_details:
          description: >-
            Server-attested cancellation attribution. Always present; sub-fields
            are null unless the subscription is cancelled (or scheduled for
            cancellation).
          properties:
            reason:
              description: Why the subscription was cancelled
              enum:
                - merchant_initiated
                - past_due_max_attempts_reached
                - workflow_action
                - fraud_prevention
              example: fraud_prevention
              type: string
            trigger_payment_id:
              description: >-
                Payment that triggered a system cancellation (prefixed pay_);
                null for merchant-initiated cancels
              example: pay_e8a1b2c3-1d2e-3f4a-5b6c-7d8e9f0a1b2c
              type: string
          type: object
        next_billing_date:
          description: Next scheduled billing date for the subscription
          example: '2025-06-26T12:00:00Z'
          type: string
        status:
          description: Current status of the subscription
          enum:
            - trial
            - active
            - past_due
            - cancelled
            - scheduled_for_cancellation
          type: string
        plan:
          $ref: '#/components/schemas/core_model.PlanCustomerResDTO'
        past_due:
          allOf:
            - $ref: '#/components/schemas/core_model.SubscriptionPastDueAttemptsInfo'
          description: Information about past due attempts
        metadata:
          additionalProperties:
            type: string
          description: Custom metadata associated with the subscription (key-value pairs).
          example:
            key: value
          type: object
        created_at:
          type: string
          description: >-
            The date and time at which the subscription was created in UTC
            format
          example: '2025-05-26T10:00:00Z'
        updated_at:
          type: string
          description: The date and time of the last subscription update in UTC format
          example: '2025-05-27T10:00:00Z'
    core_model.PaymentTax:
      properties:
        amount_subtotal:
          type: integer
        amount_subtotal_usd:
          type: integer
        amount_tax:
          type: integer
        amount_tax_usd:
          type: integer
        behavior:
          allOf:
            - $ref: '#/components/schemas/core_model.TaxCalculationType'
          description: exclusive / inclusive
          type: object
        calculation_id:
          type: string
        error:
          $ref: '#/components/schemas/core_model.PaymentTaxError'
        provider:
          $ref: '#/components/schemas/core_model.PaymentTaxProvider'
        status:
          allOf:
            - $ref: '#/components/schemas/core_model.PaymentTaxStatus'
          description: calculated, submitted, reversed, failed
          type: object
        transaction_id:
          type: string
      type: object
    core_model.ThreeDSecureDataResDTO:
      properties:
        authentication_flow:
          type: string
        electronic_commerce_indicator:
          $ref: '#/components/schemas/core_model.ThreeDSecureDataECIResDTO'
        status:
          $ref: '#/components/schemas/core_model.ThreeDSStatus'
        status_reason:
          type: string
        transaction_id:
          type: string
        version:
          type: string
      type: object
    core_model.EarlyFraudWarningDTO:
      description: >-
        An Early Fraud Warning raised by an upstream PSP (Stripe
        radar.early_fraud_warning, Braintree DFR, Unlimit disputes type=FR) on
        this payment.
      properties:
        fraud_id:
          description: >-
            Source-PSP unique identifier for this EFW (e.g. Stripe `issfr_…`,
            Unlimit hex group id, Braintree DFR row id). Free-form string;
            formats differ across PSPs.
          example: issfr_1Q9d2X2eZvKYlo2C4j9rT4Yk
          type: string
        fraud_type:
          description: >-
            Normalised fraud type. Closed enum derived from Stripe's fraud-type
            vocabulary; PSP-specific codes are mapped onto these values
            upstream.
          enum:
            - made_with_lost_card
            - made_with_stolen_card
            - card_never_received
            - fraudulent_card_application
            - made_with_counterfeit_card
            - misc
            - unauthorized_use_of_card
          example: unauthorized_use_of_card
          type: string
        updated_at:
          description: >-
            PSP-supplied ISO-8601 UTC timestamp ending in `Z` (the wall-clock
            time of the warning, not server receipt time).
          example: '2026-04-23T12:45:51Z'
          type: string
      type: object
    core_model.MastercardConsumerClarityDTO:
      description: >-
        Latest Mastercard Consumer Clarity (CC) inquiry on the payment — the
        synchronous issuer order-inquiry equivalent of Visa Order Insight
        (distinct from the Ethoca alert feed).
      properties:
        insight_id:
          description: >-
            Per-inquiry correlation id (requestReference.correlationId).
            Free-form string — not guaranteed to be a UUID and not stable across
            calls.
          example: 7c1f0a2b-9d4e-4f31-8a6c-2b5e1d7f9c33
          type: string
        type:
          description: >-
            Optional originator channel passed through from the Mastercard
            request (e.g. DIGITAL / CALL_CENTRE / MASTERCOM / TRANSACTION_DATA).
            Free-form open string.
          example: DIGITAL
          type: string
        updated_at:
          description: ISO-8601 UTC timestamp ending in `Z` — the inquiry receipt time.
          example: '2026-04-23T12:45:51Z'
          type: string
      type: object
    core_model.VisaCompellingEvidenceDTO:
      description: >-
        Terminal Verifi Compelling Evidence (CE 3.0) decision recorded against
        the payment.
      properties:
        case_id:
          description: CE case identifier (UUID).
          example: a6cf8f35-d753-4a66-8e09-65b451c96eed
          type: string
        status:
          description: Terminal CE 3.0 decision.
          enum:
            - accepted
            - declined
          example: accepted
          type: string
        updated_at:
          description: ISO-8601 UTC timestamp ending in `Z`.
          example: '2026-04-23T12:45:54Z'
          type: string
      type: object
    core_model.VisaOrderInsightDTO:
      description: Latest Visa /orders inquiry recorded on the payment.
      properties:
        insight_id:
          description: UUID of the most recent Visa /orders insight for this payment.
          example: 4bfe0233-7b19-4e82-9c0a-1e8d2f3c5b11
          type: string
        type:
          description: >-
            Insight type. Open enum — currently OI / OID / CE; unknown values
            are passed through.
          example: OI
          type: string
        updated_at:
          description: ISO-8601 UTC timestamp ending in `Z`.
          example: '2026-04-23T12:45:51Z'
          type: string
      type: object
    core_model.VisaRdrDTO:
      description: >-
        Terminal Visa Rapid Dispute Resolution (RDR) decision recorded against
        the payment.
      properties:
        case_id:
          description: RDR case identifier (UUID).
          example: 3d2ec10c-8a6c-4ef2-b7e9-0c7b1a9f23ea
          type: string
        reason:
          allOf:
            - $ref: '#/components/schemas/core_model.VisaRdrReasonDTO'
          description: Visa dispute reason details.
          type: object
        status:
          description: Terminal RDR decision.
          enum:
            - accepted
            - declined
          example: accepted
          type: string
        updated_at:
          description: ISO-8601 UTC timestamp ending in `Z`.
          example: '2026-04-23T12:45:51Z'
          type: string
      type: object
    core_model.Decline:
      description: >-
        Failure detail for a single processor attempt (see
        `PaymentAttemptWebhookData.status_reason`).
      properties:
        status:
          description: Outcome status of the attempt.
          enum:
            - FAILED
            - DECLINED
          example: DECLINED
          type: string
        status_reason:
          allOf:
            - $ref: '#/components/schemas/core_model.PaymentStatusReason'
          description: Structured decline details (advice code, decline code, PSP message).
          type: object
      type: object
    core_model.PaymentResAvsCheckResultDTO:
      properties:
        postal_code:
          description: |-
            Avs check postal code result
            Available values: `fail`, `pass`, `unavailable`, `unchecked`
          example: pass
          type: string
        street_address:
          description: |-
            Avs check street address result.
            Available values: `fail`, `pass`, `unavailable`, `unchecked`
          example: pass
          type: string
      type: object
    core_model.BillingAddress:
      properties:
        city:
          example: San Francisco
          type: string
        country:
          enum:
            - AD
            - AE
            - AF
            - AG
            - AL
            - AM
            - AO
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BW
            - BY
            - BZ
            - CA
            - CD
            - CF
            - CG
            - CH
            - CI
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CU-P
            - CV
            - CW
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GT
            - GU
            - GW
            - GY
            - HK
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PS
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - XK
            - YE
            - YT
            - ZA
            - ZM
            - ZW
          type: string
        line1:
          example: 123 Market Street
          type: string
        line2:
          example: Suite 400
          type: string
        postal_code:
          example: '94105'
          type: string
        state:
          example: CA
          type: string
      type: object
    core_model.PaymentResCVCCheckResultDTO:
      properties:
        cvc:
          description: |-
            CVC check result
            Available values: `fail`, `pass`, `unavailable`, `unchecked`
          example: pass
          type: string
      type: object
    ApplepayAPISchema:
      properties:
        billing_address:
          allOf:
            - $ref: '#/components/schemas/core_model.BillingAddress'
          description: Billing address associated with the payment method
          type: object
          x-order: '2'
        details:
          $ref: '#/components/schemas/ApplePayPaymentMethodDetails'
        status:
          description: >-
            Lifecycle status of the payment method. For a card this describes
            the card itself, not its network token.
          enum:
            - active
            - expired
            - replaced
            - closed
            - invalid
            - revoked
          example: active
          type: string
          x-order: '5'
        type:
          enum:
            - APPLEPAY
          type: string
      required:
        - type
        - details
      title: Apple Pay API Schema
      type: object
    CardAPISchema:
      properties:
        billing_address:
          allOf:
            - $ref: '#/components/schemas/core_model.BillingAddress'
          description: Billing address associated with the payment method
          type: object
          x-order: '2'
        card_updater:
          description: Whether the card is enrolled in the Card Account Updater service.
          example: true
          type: boolean
          x-order: '6'
        details:
          $ref: '#/components/schemas/CardPaymentMethodDetails'
        fpan_out_of_sync:
          description: >-
            Informational. The stored card number is known to be out of date and
            a refresh is pending. Do not gate charging on this field.
          example: false
          type: boolean
          x-order: '7'
        status:
          description: >-
            Lifecycle status of the payment method. For a card this describes
            the card itself, not its network token.
          enum:
            - active
            - expired
            - replaced
            - closed
            - invalid
            - revoked
          example: active
          type: string
          x-order: '5'
        type:
          enum:
            - CARD
          type: string
      required:
        - type
        - details
      title: Card API Schema
      type: object
    CashappAPISchema:
      properties:
        details:
          $ref: '#/components/schemas/CashAppPaymentMethodDetails'
        status:
          description: >-
            Lifecycle status of the payment method. For a card this describes
            the card itself, not its network token.
          enum:
            - active
            - expired
            - replaced
            - closed
            - invalid
            - revoked
          example: active
          type: string
          x-order: '5'
        type:
          enum:
            - CASHAPP
          type: string
      required:
        - type
        - details
      title: CashApp API Schema
      type: object
    GpayAPISchema:
      properties:
        billing_address:
          allOf:
            - $ref: '#/components/schemas/core_model.BillingAddress'
          description: Billing address associated with the payment method
          type: object
          x-order: '2'
        card_updater:
          description: Whether the card is enrolled in the Card Account Updater service.
          example: true
          type: boolean
          x-order: '6'
        details:
          $ref: '#/components/schemas/GooglePayPaymentMethodDetails'
        fpan_out_of_sync:
          description: >-
            Informational. The stored card number is known to be out of date and
            a refresh is pending. Do not gate charging on this field.
          example: false
          type: boolean
          x-order: '7'
        status:
          description: >-
            Lifecycle status of the payment method. For a card this describes
            the card itself, not its network token.
          enum:
            - active
            - expired
            - replaced
            - closed
            - invalid
            - revoked
          example: active
          type: string
          x-order: '5'
        type:
          enum:
            - GPAY
          type: string
      required:
        - type
        - details
      title: Google Pay API Schema
      type: object
    PaypalAPISchema:
      properties:
        details:
          $ref: '#/components/schemas/PayPalPaymentMethodDetails'
        status:
          description: >-
            Lifecycle status of the payment method. For a card this describes
            the card itself, not its network token.
          enum:
            - active
            - expired
            - replaced
            - closed
            - invalid
            - revoked
          example: active
          type: string
          x-order: '5'
        type:
          enum:
            - PAYPAL
          type: string
      required:
        - type
        - details
      title: PayPal API Schema
      type: object
    VenmoAPISchema:
      properties:
        details:
          $ref: '#/components/schemas/VenmoPaymentMethodDetails'
        status:
          description: >-
            Lifecycle status of the payment method. For a card this describes
            the card itself, not its network token.
          enum:
            - active
            - expired
            - replaced
            - closed
            - invalid
            - revoked
          example: active
          type: string
          x-order: '5'
        type:
          enum:
            - VENMO
          type: string
      required:
        - type
        - details
      title: Venmo API Schema
      type: object
    core_model.RefundStatus:
      enum:
        - PENDING
        - DECLINED
        - SETTLING
        - SETTLED
      type: string
      x-enum-varnames:
        - RefundStatusPENDING
        - RefundStatusDECLINED
        - RefundStatusSETTLING
        - RefundStatusSETTLED
    core_model.PaymentStatusReason:
      properties:
        advice_code:
          description: Advice code
          enum:
            - try_again_later
            - do_not_try_again
          example: do_not_try_again
          type: string
        decline_code:
          description: Decline code
          enum:
            - insufficient_funds
            - authentication_required
            - card_issuer_decline
            - generic_decline
            - withdrawal_limit_exceeded
            - do_not_honor
            - expired_card
            - suspected_fraud
            - incorrect_cvc
            - invalid_card_number
            - issuer_unavailable
            - card_lost_or_stolen
            - card_declined
          type: string
        message:
          description: Message from psp
          type: string
      type: object
    core_model.PlanCustomerResDTO:
      properties:
        id:
          description: Unique identifier for the plan
          example: price_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
          type: string
          x-order: '0'
        archived_at:
          description: The date and time at which the plan was archived in UTC format
          example: '2025-06-01T10:00:00Z'
          type: string
        interval:
          description: Type of the billing period
          enum:
            - days
            - months
            - years
          example: days
          type: string
          x-order: '4'
        interval_count:
          description: Number of billing periods per cycle
          example: 1
          type: integer
          x-order: '5'
        name:
          description: Display name of the plan
          example: Pro Plan
          type: string
          x-order: '2'
        price:
          allOf:
            - $ref: '#/components/schemas/core_model.PlanPrice'
          description: Pricing details for the plan
          type: object
          x-order: '6'
        tax:
          allOf:
            - $ref: '#/components/schemas/core_model.PlanTax'
          description: Tax info
          type: object
          x-order: '10'
        trial_interval:
          description: Type of trial period
          enum:
            - days
            - months
            - years
          example: days
          type: string
          x-order: '7'
        trial_interval_count:
          description: Length of the trial period
          example: 14
          type: integer
          x-order: '8'
        trial_price:
          allOf:
            - $ref: '#/components/schemas/core_model.PlanPrice'
          description: Trial pricing details
          type: object
          x-order: '9'
        type:
          description: Type of the plan
          enum:
            - recurring
            - one-off
          example: recurring
          type: string
          x-order: '3'
      type: object
    core_model.SubscriptionPastDueAttemptsInfo:
      properties:
        attempt_count:
          description: Number of current attempts count
          example: 2
          type: integer
        max_attempts_count:
          description: Maximum count of attempts
          example: 7
          type: integer
      type: object
    core_model.TaxCalculationType:
      enum:
        - INCLUSIVE
        - EXCLUSIVE
      type: string
      x-enum-varnames:
        - TaxCalculationTypeINCLUSIVE
        - TaxCalculationTypeEXCLUSIVE
    core_model.PaymentTaxError:
      properties:
        code:
          allOf:
            - $ref: '#/components/schemas/core_model.PaymentTaxErrorCode'
          description: timeout or calculation_failed
          type: object
        message:
          type: string
      type: object
    core_model.PaymentTaxProvider:
      properties:
        id:
          type: string
        type:
          $ref: '#/components/schemas/core_model.TaxProviderTypeName'
      type: object
    core_model.PaymentTaxStatus:
      enum:
        - calculated
        - submitted
        - reversed
        - failed
      type: string
      x-enum-varnames:
        - PaymentTaxStatusCalculated
        - PaymentTaxStatusSubmitted
        - PaymentTaxStatusReversed
        - PaymentTaxStatusFailed
    core_model.ThreeDSecureDataECIResDTO:
      properties:
        liability_shift:
          type: boolean
        result:
          type: string
        value:
          type: string
      type: object
    core_model.ThreeDSStatus:
      enum:
        - action-required
        - success
        - failure
      type: string
      x-enum-varnames:
        - ThreeDSStatusActionRequired
        - ThreeDSStatusSuccess
        - ThreeDSStatusFailure
    core_model.VisaRdrReasonDTO:
      description: Visa-supplied reason metadata for an RDR decision.
      properties:
        category:
          description: >-
            Optional category — open enum (today: fraud / authorization /
            processing / consumer). Null when the upstream resolver doesn't
            recognise the code.
          example: fraud
          nullable: true
          type: string
        code:
          description: Visa reason code, e.g. "10.4". Open enum.
          example: '10.4'
          type: string
        name:
          description: >-
            Optional human-readable reason name. Null when the upstream resolver
            doesn't recognise the code.
          example: Other Fraud — Card Absent Environment
          nullable: true
          type: string
      type: object
    ApplePayPaymentMethodDetails:
      properties:
        token:
          description: Apple Pay token number
          example: '12345678'
          type: string
          x-order: '7'
        token_exp_month:
          description: Expiration month of the card
          example: 12
          type: integer
          x-order: '91'
        token_exp_year:
          description: Expiration year of the card
          example: 2028
          type: integer
          x-order: '92'
        token_service_provider:
          description: Apple Pay token service provider
          example: provider
          type: string
          x-order: '8'
      type: object
    CardPaymentMethodDetails:
      properties:
        bin:
          description: First 6 digits of the card number
          example: '411111'
          type: string
          x-order: '0'
        bin_data:
          allOf:
            - $ref: '#/components/schemas/core_model.EvervaultCardBinData'
          description: Bin data
          type: object
          x-order: '95'
        exp_month:
          description: Expiration month of the card
          example: 12
          type: integer
          x-order: '2'
        exp_year:
          description: Expiration year of the card
          example: 2028
          type: integer
          x-order: '3'
        is_network_tokenized:
          description: Is network tokenized
          example: true
          type: boolean
          x-order: '4'
        last4:
          description: Last 4 digits of the card number
          example: '1111'
          type: string
          x-order: '1'
        network_token:
          allOf:
            - $ref: '#/components/schemas/CardNetworkToken'
          description: Network token details, when the card is network tokenized
          type: object
          x-order: '6'
        number:
          description: Full card number
          example: '4111111111111111'
          type: string
          x-order: '5'
      type: object
    CashAppPaymentMethodDetails:
      properties:
        processor_customer_id:
          description: Processor customer ID
          example: cus_1234567890
          type: string
          x-order: '96'
        processor_payment_method_id:
          description: Processor payment method ID
          example: pm_1234567890
          type: string
          x-order: '97'
      type: object
    GooglePayPaymentMethodDetails:
      properties:
        token:
          description: Apple Pay token number
          example: '12345678'
          type: string
          x-order: '7'
        token_exp_month:
          description: Expiration month of the card
          example: 12
          type: integer
          x-order: '91'
        token_exp_year:
          description: Expiration year of the card
          example: 2028
          type: integer
          x-order: '92'
        token_service_provider:
          description: Apple Pay token service provider
          example: provider
          type: string
          x-order: '8'
      type: object
    PayPalPaymentMethodDetails:
      properties:
        payer_info:
          allOf:
            - $ref: '#/components/schemas/core_model.PaypalDataPayerInfo'
          description: Paypal payer info
          type: object
          x-order: '94'
        processor_customer_email:
          description: Processor customer email
          example: example@gmail.com
          type: string
          x-order: '98'
        processor_customer_id:
          description: Processor customer ID
          example: cus_1234567890
          type: string
          x-order: '96'
        processor_payment_method_id:
          description: Processor payment method ID
          example: pm_1234567890
          type: string
          x-order: '97'
      type: object
    VenmoPaymentMethodDetails:
      properties:
        processor_payment_method_id:
          description: Processor payment method ID
          example: pm_1234567890
          type: string
          x-order: '97'
      type: object
    core_model.PlanPrice:
      properties:
        amount:
          description: Price amount  in minor units
          example: 1999
          type: integer
        currency:
          description: >-
            The 3-letter currency code in ISO 4217 format. e.g. use USD for US
            dollars
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYN
            - BZD
            - CAD
            - CDF
            - CHF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HTG
            - HUF
            - IDR
            - ILS
            - IMP
            - INR
            - IQD
            - IRR
            - ISK
            - JEP
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRU
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLE
            - SOS
            - SRD
            - SSP
            - STD
            - STN
            - SVC
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - BOV
            - COU
            - CHE
            - CHW
            - MXV
            - UGX
            - VES
            - VND
            - VUV
            - XAF
            - XCD
            - XCG
            - XOF
            - XPF
            - YER
            - USD
          example: AED
          type: string
      type: object
    core_model.PlanTax:
      properties:
        collect_tax:
          allOf:
            - $ref: '#/components/schemas/core_model.PlanTaxCollection'
          example: DEFAULT
          type: object
      type: object
    core_model.PaymentTaxErrorCode:
      enum:
        - timeout
        - calculation_failed
      type: string
      x-enum-varnames:
        - PaymentTaxErrorCodeTimeout
        - PaymentTaxErrorCodeCalculationFailed
    core_model.TaxProviderTypeName:
      enum:
        - NUMERAL
      type: string
      x-enum-varnames:
        - TaxProviderTypeNameNUMERAL
    core_model.EvervaultCardBinData:
      properties:
        brand:
          description: Brand of the card
          enum:
            - visa
            - mastercard
            - american-express
            - discover
            - diners-club
            - jcb
            - unionpay
          type: string
        country:
          description: ISO country code (e.g., US, DE)
          enum:
            - AD
            - AE
            - AF
            - AG
            - AL
            - AM
            - AO
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BW
            - BY
            - BZ
            - CA
            - CD
            - CF
            - CG
            - CH
            - CI
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CU-P
            - CV
            - CW
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GT
            - GU
            - GW
            - GY
            - HK
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PS
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - XK
            - YE
            - YT
            - ZA
            - ZM
            - ZW
          type: string
        currency_code:
          description: >-
            The 3-letter currency code in ISO 4217 format. e.g. use USD for US
            dollars
          type: string
        description:
          description: Product or card name assigned by the issuer
          example: Chase Sapphire Preferred
          type: string
        funding:
          description: Type of funding source
          enum:
            - debit
            - credit
            - prepaid
            - deferred-debit
            - charge
          type: string
        issuer:
          description: Issuing bank or institution name
          example: Chase Bank
          type: string
        type:
          description: Classification of the card type
          enum:
            - consumer
            - commercial
            - business
            - payouts
            - all
          type: string
      type: object
    CardNetworkToken:
      properties:
        bin:
          description: BIN of the network token. Differs from the card BIN.
          example: '48953700'
          type: string
          x-order: '0'
        last4:
          description: >-
            Last 4 digits of the network token. Differs from the last 4 digits
            of the card.
          example: '0370'
          type: string
          x-order: '1'
        exp_month:
          description: Expiration month of the network token
          example: 5
          type: integer
          x-order: '2'
        exp_year:
          description: Expiration year of the network token, 2 digits
          example: 31
          type: integer
          x-order: '3'
        status:
          description: >-
            Lifecycle status of the network token. On a customer this is the
            current status; on a payment it is the status at the time of the
            charge. A card whose own status is expired is still chargeable while
            this is active.
          enum:
            - active
            - inactive
            - blocked
            - provisioning
            - suspended
            - deleted
            - expired
            - retired
            - unknown
          example: active
          type: string
          x-order: '4'
        last_synced_at:
          description: >-
            When the network token state was last refreshed from the card
            network. On a customer this is the current value; on a payment it is
            the value at the time of the charge.
          example: '2025-05-26T10:15:00Z'
          type: string
          x-order: '5'
      type: object
    core_model.PaypalDataPayerInfo:
      properties:
        email:
          description: Paypal payer email
          example: example@email.com
          type: string
        first_name:
          description: Paypal payer first name
          example: John
          type: string
        last_name:
          description: Paypal payer last name
          example: Doe
          type: string
        payer_id:
          description: Paypal payer id
          example: '1234567'
          type: string
        tenant:
          description: Paypal payer tenant
          example: Tenant
          type: string
      type: object
    core_model.PlanTaxCollection:
      enum:
        - DEFAULT
        - COLLECT
        - DONT_COLLECT
      type: string
      x-enum-varnames:
        - PlanTaxCollectionDEFAULT
        - PlanTaxCollectionCOLLECT
        - PlanTaxCollectionDONTCOLLECT

````