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

# Get Payment Detail

> Get detailed information about a specific payment.



## OpenAPI

````yaml get /payments/{payment_id}
openapi: 3.1.0
info:
  title: public
  description: ''
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.102.0
servers:
  - url: https://test.dodopayments.com/
    description: Test Mode Server Host
  - url: https://live.dodopayments.com/
    description: Live Mode Server Host
security: []
tags:
  - name: Products
  - name: Payments
  - name: Subscriptions
  - name: Addons
  - name: Customers
  - name: Refunds
  - name: Disputes
  - name: Events
  - name: License Keys
  - name: Entitlements
  - name: Licenses
  - name: Discounts
  - name: Meters
  - name: Credit Entitlements
  - name: Credit Entitlement Balances
  - name: Outgoing Webhooks
  - name: Checkout
  - name: Webhook Events
paths:
  /payments/{payment_id}:
    get:
      tags:
        - Payments
      operationId: get_payment_handler
      parameters:
        - name: payment_id
          in: path
          description: Payment Id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponse'
        '500':
          description: Something went wrong :(
      security:
        - API_KEY: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import DodoPayments from 'dodopayments';

            const client = new DodoPayments({
              bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
            });

            const payment = await client.payments.retrieve('payment_id');

            console.log(payment.brand_id);
        - lang: Python
          source: |-
            import os
            from dodopayments import DodoPayments

            client = DodoPayments(
                bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"),  # This is the default and can be omitted
            )
            payment = client.payments.retrieve(
                "payment_id",
            )
            print(payment.brand_id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/dodopayments/dodopayments-go\"\n\t\"github.com/dodopayments/dodopayments-go/option\"\n)\n\nfunc main() {\n\tclient := dodopayments.NewClient(\n\t\toption.WithBearerToken(\"My Bearer Token\"),\n\t)\n\tpayment, err := client.Payments.Get(context.TODO(), \"payment_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", payment.BrandID)\n}\n"
        - lang: Java
          source: |-
            package com.dodopayments.api.example;

            import com.dodopayments.api.client.DodoPaymentsClient;
            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
            import com.dodopayments.api.models.payments.Payment;
            import com.dodopayments.api.models.payments.PaymentRetrieveParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

                    Payment payment = client.payments().retrieve("payment_id");
                }
            }
        - lang: Kotlin
          source: |-
            package com.dodopayments.api.example

            import com.dodopayments.api.client.DodoPaymentsClient
            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
            import com.dodopayments.api.models.payments.Payment
            import com.dodopayments.api.models.payments.PaymentRetrieveParams

            fun main() {
                val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

                val payment: Payment = client.payments().retrieve("payment_id")
            }
        - lang: Ruby
          source: |-
            require "dodopayments"

            dodo_payments = Dodopayments::Client.new(
              bearer_token: "My Bearer Token",
              environment: "test_mode" # defaults to "live_mode"
            )

            payment = dodo_payments.payments.retrieve("payment_id")

            puts(payment)
        - lang: PHP
          source: |-
            <?php

            require_once dirname(__DIR__) . '/vendor/autoload.php';

            use Dodopayments\Client;
            use Dodopayments\Core\Exceptions\APIException;

            $client = new Client(
              bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
              environment: 'test_mode',
            );

            try {
              $payment = $client->payments->retrieve('payment_id');

              var_dump($payment);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: >-
            using System;

            using DodoPayments.Client;

            using DodoPayments.Client.Models.Payments;


            DodoPaymentsClient client = new();


            PaymentRetrieveParams parameters = new() { PaymentID = "payment_id"
            };


            var payment = await client.Payments.Retrieve(parameters);


            Console.WriteLine(payment);
components:
  schemas:
    PaymentResponse:
      type: object
      required:
        - payment_id
        - business_id
        - total_amount
        - currency
        - created_at
        - disputes
        - refunds
        - customer
        - metadata
        - settlement_amount
        - settlement_currency
        - billing
        - brand_id
        - digital_products_delivered
        - retry_attempt
        - payment_provider
      properties:
        billing:
          $ref: '#/components/schemas/BillingAddress'
          description: Billing address details for payments
        brand_id:
          type: string
          description: brand id this payment belongs to
        business_id:
          type: string
          description: Identifier of the business associated with the payment
        card_holder_name:
          type:
            - string
            - 'null'
          description: Cardholder name
        card_issuing_country:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CountryCodeAlpha2'
              description: ISO2 country code of the card
        card_last_four:
          type:
            - string
            - 'null'
          description: The last four digits of the card
        card_network:
          type:
            - string
            - 'null'
          description: Card network like VISA, MASTERCARD etc.
        card_type:
          type:
            - string
            - 'null'
          description: The type of card DEBIT or CREDIT
        checkout_session_id:
          type:
            - string
            - 'null'
          description: |-
            If payment is made using a checkout session,
            this field is set to the id of the session.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the payment was created
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency used for the payment
        custom_field_responses:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/CustomFieldResponse'
          description: Customer's responses to custom fields collected during checkout
        customer:
          $ref: '#/components/schemas/CustomerLimitedDetailsResponse'
          description: Details about the customer who made the payment
        digital_products_delivered:
          type: boolean
          description: brand id this payment belongs to
        discount_id:
          type:
            - string
            - 'null'
          description: >-
            DEPRECATED: Use discounts instead. Returns the first discount's ID
            if present.
          deprecated: true
          x-stainless-deprecation-message: Use `discounts` instead.
        discounts:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/DiscountDetailResponse'
          description: All stacked discounts applied, ordered by position
        disputes:
          type: array
          items:
            $ref: '#/components/schemas/DisputeResponse'
          description: List of disputes associated with this payment
        error_code:
          type:
            - string
            - 'null'
          description: An error code if the payment failed
        error_message:
          type:
            - string
            - 'null'
          description: An error message if the payment failed
        invoice_id:
          type:
            - string
            - 'null'
          description: >-
            Invoice ID for this payment. Uses India-specific invoice ID if
            available.
        invoice_url:
          type:
            - string
            - 'null'
          description: URL to download the invoice PDF for this payment.
        metadata:
          $ref: '#/components/schemas/Metadata'
          description: Additional custom data associated with the payment
        payment_id:
          type: string
          description: Unique identifier for the payment
        payment_link:
          type:
            - string
            - 'null'
          description: Checkout URL
        payment_method:
          type:
            - string
            - 'null'
          description: Payment method used by customer (e.g. "card", "bank_transfer")
        payment_method_type:
          type:
            - string
            - 'null'
          description: Specific type of payment method (e.g. "visa", "mastercard")
        payment_provider:
          $ref: '#/components/schemas/PaymentProvider'
          description: >-
            Which processor handled this payment. `stripe` / `adyen` for BYOP
            routes

            (the merchant's own Hyperswitch connector); `dodo` for everything
            Dodo

            processed itself.
        product_cart:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/OneTimeProductCartItemResponse'
          description: List of products purchased in a one-time payment
        refund_status:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PaymentRefundStatus'
              description: >-
                Summary of the refund status for this payment. None if no
                succeeded refunds exist.
        refunds:
          type: array
          items:
            $ref: '#/components/schemas/RefundListItem'
          description: List of refunds issued for this payment
        retry_attempt:
          type: integer
          format: int32
          description: >-
            Retry attempt number for subscription renewal payments.

            `0` for the original payment, `1`+ for each scheduled off-session

            retry after a failed renewal. Always `0` for non-subscription
            payments.
        settlement_amount:
          type: integer
          format: int32
          description: >-
            The amount that will be credited to your Dodo balance after currency
            conversion and processing.

            Especially relevant for adaptive pricing where the customer's
            payment currency differs from your settlement currency.
        settlement_currency:
          $ref: '#/components/schemas/Currency'
          description: >-
            The currency in which the settlement_amount will be credited to your
            Dodo balance.

            This may differ from the customer's payment currency in adaptive
            pricing scenarios.
        settlement_tax:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            This represents the portion of settlement_amount that corresponds to
            taxes collected.

            Especially relevant for adaptive pricing where the tax component
            must be tracked separately

            in your Dodo balance.
        status:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/IntentStatus'
              description: Current status of the payment intent
        subscription_id:
          type:
            - string
            - 'null'
          description: Identifier of the subscription if payment is part of a subscription
        tax:
          type:
            - integer
            - 'null'
          format: int32
          description: Amount of tax collected in smallest currency unit (e.g. cents)
        total_amount:
          type: integer
          format: int32
          description: >-
            Total amount charged to the customer including tax, in smallest
            currency unit (e.g. cents)
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the payment was last updated
    BillingAddress:
      type: object
      required:
        - country
      properties:
        city:
          type:
            - string
            - 'null'
          description: City name
        country:
          $ref: '#/components/schemas/CountryCodeAlpha2'
          description: Two-letter ISO country code (ISO 3166-1 alpha-2)
        state:
          type:
            - string
            - 'null'
          description: State or province name
        street:
          type:
            - string
            - 'null'
          description: >-
            Street address including house number and unit/apartment if
            applicable
        zipcode:
          type:
            - string
            - 'null'
          description: Postal code or ZIP code
    CountryCodeAlpha2:
      type: string
      description: ISO country code alpha2 variant
      enum:
        - AF
        - AX
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BQ
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - KH
        - CM
        - CA
        - CV
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CG
        - CD
        - CK
        - CR
        - CI
        - HR
        - CU
        - CW
        - CY
        - CZ
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MK
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RE
        - RO
        - RU
        - RW
        - BL
        - SH
        - KN
        - LC
        - MF
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SX
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - SS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SZ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - UM
        - US
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
    Currency:
      type: string
      enum:
        - AED
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BWP
        - BYN
        - BZD
        - CAD
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - 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
        - SEK
        - SGD
        - SHP
        - SLE
        - SLL
        - SOS
        - SRD
        - SSP
        - STN
        - SVC
        - SZL
        - THB
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
    CustomFieldResponse:
      type: object
      description: Customer's response to a custom field
      required:
        - key
        - value
      properties:
        key:
          type: string
          description: Key matching the custom field definition
        value:
          type: string
          description: Value provided by customer
    CustomerLimitedDetailsResponse:
      type: object
      required:
        - customer_id
        - name
        - email
      properties:
        customer_id:
          type: string
          description: Unique identifier for the customer
        email:
          type: string
          description: Email address of the customer
        metadata:
          $ref: '#/components/schemas/Metadata'
          description: Additional metadata associated with the customer
        name:
          type: string
          description: Full name of the customer
        phone_number:
          type:
            - string
            - 'null'
          description: Phone number of the customer
    DiscountDetailResponse:
      type: object
      description: |-
        Response struct for a discount with its position in a stack and optional
        cycle-tracking information (for subscriptions).
      required:
        - position
        - discount_id
        - business_id
        - type
        - code
        - amount
        - times_used
        - restricted_to
        - created_at
        - preserve_on_plan_change
        - metadata
      properties:
        amount:
          type: integer
          format: int32
          description: The discount amount in **basis points** (e.g., 540 => 5.4%).
        business_id:
          type: string
          description: The business this discount belongs to
        code:
          type: string
          description: The discount code
        created_at:
          type: string
          format: date-time
          description: Timestamp when the discount was created
        cycles_remaining:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Remaining billing cycles for this discount on this subscription
            (None for one-time payments)
        discount_id:
          type: string
          description: The unique discount ID
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Optional date/time after which discount is expired
        metadata:
          $ref: '#/components/schemas/Metadata'
          description: Additional metadata
        name:
          type:
            - string
            - 'null'
          description: Name for the Discount
        position:
          type: integer
          format: int32
          description: Position of this discount in the stack (0-based)
        preserve_on_plan_change:
          type: boolean
          description: >-
            Whether this discount should be preserved when a subscription
            changes plans
        restricted_to:
          type: array
          items:
            type: string
          description: List of product IDs to which this discount is restricted
        subscription_cycles:
          type:
            - integer
            - 'null'
          format: int32
          description: Number of subscription billing cycles this discount is valid for
        times_used:
          type: integer
          format: int32
          description: How many times this discount has been used
        type:
          $ref: '#/components/schemas/DiscountType'
          description: The type of discount
        usage_limit:
          type:
            - integer
            - 'null'
          format: int32
          description: Usage limit for this discount, if any
    DisputeResponse:
      type: object
      required:
        - dispute_id
        - payment_id
        - business_id
        - amount
        - currency
        - dispute_status
        - dispute_stage
        - created_at
      properties:
        amount:
          type: string
          description: >-
            The amount involved in the dispute, represented as a string to
            accommodate precision.
        business_id:
          type: string
          description: The unique identifier of the business involved in the dispute.
        created_at:
          type: string
          format: date-time
          description: The timestamp of when the dispute was created, in UTC.
        currency:
          type: string
          description: >-
            The currency of the disputed amount, represented as an ISO 4217
            currency code.
        dispute_id:
          type: string
          description: The unique identifier of the dispute.
        dispute_stage:
          $ref: '#/components/schemas/DisputeStage'
          description: The current stage of the dispute process.
        dispute_status:
          $ref: '#/components/schemas/DisputeStatus'
          description: The current status of the dispute.
        is_resolved_by_rdr:
          type:
            - boolean
            - 'null'
          description: Whether the dispute was resolved by Rapid Dispute Resolution
        payment_id:
          type: string
          description: The unique identifier of the payment associated with the dispute.
        remarks:
          type:
            - string
            - 'null'
          description: Remarks
    Metadata:
      type: object
      additionalProperties:
        type: string
      propertyNames:
        type: string
    PaymentProvider:
      type: string
      description: >-
        The processor that ultimately handles a payment, surfaced to the
        dashboard

        so the UI can badge each payment / dispute as "powered by ...".


        `Stripe` and `Adyen` are returned for BYOP routes (the merchant's own

        Hyperswitch connector). `Dodo` covers every other route — both Dodo's
        own

        MoR processors (Stripe US/UK, Cashfree, Airwallex) and any payment that
        has

        no merchant connector attached.


        This type intentionally does NOT reuse the internal `Connector` enum:
        that

        one tracks Dodo's own processor pool and shouldn't leak its variants
        into

        dashboard responses.
      enum:
        - stripe
        - adyen
        - dodo
    OneTimeProductCartItemResponse:
      type: object
      title: One-Time Product Cart Item Response
      required:
        - product_id
        - quantity
      properties:
        product_id:
          type: string
        quantity:
          type: integer
          format: int32
          minimum: 0
    PaymentRefundStatus:
      type: string
      enum:
        - partial
        - full
    RefundListItem:
      type: object
      required:
        - refund_id
        - payment_id
        - business_id
        - status
        - created_at
        - is_partial
      properties:
        amount:
          type:
            - integer
            - 'null'
          format: int32
          description: The refunded amount.
        business_id:
          type: string
          description: The unique identifier of the business issuing the refund.
        created_at:
          type: string
          format: date-time
          description: The timestamp of when the refund was created in UTC.
        currency:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Currency'
              description: >-
                The currency of the refund, represented as an ISO 4217 currency
                code.
        is_partial:
          type: boolean
          description: If true the refund is a partial refund
        payment_id:
          type: string
          description: The unique identifier of the payment associated with the refund.
        reason:
          type:
            - string
            - 'null'
          description: The reason provided for the refund, if any. Optional.
        refund_id:
          type: string
          description: The unique identifier of the refund.
        status:
          $ref: '#/components/schemas/RefundStatus'
          description: The current status of the refund.
    IntentStatus:
      type: string
      enum:
        - succeeded
        - failed
        - cancelled
        - processing
        - requires_customer_action
        - requires_merchant_action
        - requires_payment_method
        - requires_confirmation
        - requires_capture
        - partially_captured
        - partially_captured_and_capturable
    DiscountType:
      type: string
      enum:
        - percentage
      x-stainless-const: true
    DisputeStage:
      type: string
      enum:
        - pre_dispute
        - dispute
        - pre_arbitration
    DisputeStatus:
      type: string
      enum:
        - dispute_opened
        - dispute_expired
        - dispute_accepted
        - dispute_cancelled
        - dispute_challenged
        - dispute_won
        - dispute_lost
    RefundStatus:
      type: string
      enum:
        - succeeded
        - failed
        - pending
        - review
  securitySchemes:
    API_KEY:
      type: http
      scheme: bearer

````