Get payment transaction

Changed on

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Returns one payment in full, read live from its payment provider.

Get the required transaction_id from List payment transactions. Send the row's timestamp too when you have it, and send action=refund for a refund row, since Wix tracks a refund under its own ID.

<Warning>The response includes the customer's personal details, such as the cardholder name, masked card number, and billing email and phone. Only a user with write access to the app can read it, and only with a personal access token set to Full access.</Warning>

Stripe resolves a Checkout Session, invoice, or dispute ID to the charge behind it, so transaction_id in the response can differ from the one you sent. Keep using the ID from the transactions list, since that's the one checked against the app.

<Note>This endpoint accepts a personal access token belonging to a user with write access to the app. A read-only personal access token is refused, and so is a viewer.</Note>

get/api/apps/{app_id}/payments/analytics/transactions/{transaction_id}

Request

  • Base URL: https://app.base44.com
  • URL: https://app.base44.com/api/apps/{app_id}/payments/analytics/transactions/{transaction_id}
  • Auth: HTTP bearer

Path parameters

app_idstring required

ID of the Base44 app.

transaction_idstring required

ID of the transaction, taken from transaction_id on a row from List payment transactions.

Query parameters

provider'stripe' | 'wix' required

Payment provider whose transactions to use. Either stripe or wix. stripe covers payments taken through the app's Stripe integration, and wix covers payments taken through Wix Payments (Base44 Payments). The provider has to be connected to the app.

timestampstring date-time

The row's own timestamp from List payment transactions, which makes the lookup faster. Leave it out rather than guess, since a wrong value can make the transaction look like it isn't the app's.

action'payment' | 'refund'

The row's own action from the transactions list. Either payment or refund. Send refund for a refund row so the payment it refunded is returned. Defaults to payment.

Response

The payment, in full.

transaction_idstring required

Provider ID of the payment. For Stripe this is the charge, which can differ from the ID you looked it up by.

statusstring

Where the payment stands. Either succeeded, pending, failed, refunded, partially_refunded, pending_refund, or chargeback. Other provider values come through in lowercase.

payment_typestring

Either one_time or recurring, or an empty string when the provider doesn't say.

created_datestring

When the payment was made, as an ISO 8601 timestamp. Empty when the provider doesn't say.

currencystring

Three-letter ISO 4217 code of the payment's currency, in uppercase. Defaults to USD.

amountinteger

Amount paid, in the smallest unit of the payment's currency.

feeinteger nullable

Processing fee the provider took, in the smallest unit of the payment's currency, or null when none was taken, as on a declined payment.

netinteger nullable

What the merchant kept after the fee, in the smallest unit of the payment's currency, or null when no money moved.

service_feeinteger nullable

Application fee taken on top of the processing fee, in the smallest unit of the payment's currency, or null when there is none.

refunded_amountinteger

Total refunded so far, in the smallest unit of the payment's currency.

method_kindstring

Payment method type as the provider names it, for example card. Empty when the provider doesn't say.

method_motoboolean

true when the merchant entered the card for the customer, as in a phone or mail order, and false otherwise. Always false for Stripe.

card_networkstring nullable

Card network, or null when the payment wasn't by card.

card_maskedstring nullable

Masked card number, or null when the payment wasn't by card. Stripe gives only the last four digits.

card_holderstring nullable

Cardholder name, or null when the provider doesn't have it.

provider_idstring

Processor that handled the payment. Always stripe for Stripe. For Wix, the processor Wix routed the payment through.

merchant_account_idstring nullable

Merchant account at the processor, or null when unknown. Always null for Stripe.

display_order_idstring nullable

Order number shown to the customer, or null when there is none. Always null for Stripe.

decline_reasonstring nullable

Why the payment was declined, as the provider words it, or null when it wasn't declined.

Example response

{
  "transaction_id": "ch_T7mK2p9Q4r6S8v",
  "status": "partially_refunded",
  "payment_type": "one_time",
  "created_date": "2026-08-25T10:00:00Z",
  "currency": "USD",
  "amount": 2500,
  "fee": 103,
  "net": 2397,
  "service_fee": 50,
  "refunded_amount": 1000,
  "refunds": [
    {
      "amount": 1000,
      "created_date": "2026-08-26T09:15:00Z",
      "id": "re_T7mK2p9Q4r6S8v",
      "status": "succeeded"
    }
  ],
  "method_kind": "card",
  "card_network": "visa",
  "card_masked": "4242",
  "card_holder": "Jane Doe",
  "provider_id": "stripe",
  "merchant_account_id": "4f1c2a7e-9b3d-4e8f-a6c5-2d7e9f0b1a3c",
  "display_order_id": "10042",
  "items": [
    {
      "amount": 2500,
      "name": "Oak side table",
      "quantity": 1
    }
  ],
  "billing": {
    "name": "Jane Doe",
    "address": "500 Terry Francine St",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94158",
    "country_code": "US",
    "email": "jane@example.com",
    "phone": "+14155550123"
  },
  "shipping": {
    "name": "Jane Doe",
    "address": "500 Terry Francine St",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94158",
    "country_code": "US",
    "email": "jane@example.com",
    "phone": "+14155550123"
  },
  "disputes": [],
  "history": [
    {
      "date": "2026-08-26T09:15:00Z",
      "kind": "refund",
      "lines": [
        {
          "amount": 1000,
          "label": "refunded_amount"
        }
      ],
      "status": "succeeded"
    },
    {
      "date": "2026-08-25T10:00:00Z",
      "kind": "payment",
      "lines": [
        {
          "amount": 2500,
          "label": "amount"
        },
        {
          "amount": -103,
          "label": "processing_fee"
        },
        {
          "amount": 2397,
          "label": "net"
        }
      ],
      "status": "succeeded"
    }
  ],
  "decline_reason": "Your card has insufficient funds."
}

Changes

    • breaking

      the query request parameter action was restricted to a list of enum values

    • breaking

      query request parameter action list-of-types was narrowed by removing types null

    • breaking

      query request parameter timestamp list-of-types was narrowed by removing types null

    • info

      added the new enum value payment to the query request parameter action

    • info

      added the new enum value refund to the query request parameter action

    • info

      for the query request parameter action, the type was generalized from no type to string

    • info

      for the query request parameter timestamp, the type was generalized from no type to string, and format from no format to date-time

    • info

      the endpoint scheme security PersonalAccessTokenAuth was added to the API