Skip to main content
A Payment object represents a single financial transaction - either a one-time purchase or a recurring subscription charge. Payments track the monetary flow, including the amount, fees, tax, and processing status. Each payment is associated with an Order and optionally with a User and Subscription. Payments contain detailed information about charges, including payment method details and invoice data when applicable.

Endpoints

MethodEndpointDescription
GET/v0/payments/listList and filter payments
GET/v0/payments/{paymentId}Retrieve a payment by ID

The Payment object

object
string
Object type identifier. Always "payment" for Payment objects.
id
string
required
Unique identifier (UUID) for this payment.
number
string
required
Human-readable payment number (e.g., #ABC123DEF456). Used for reference in invoices and support.
type
string
required
Type of payment. Possible values: one_time, subscription_initial, subscription_update, subscription_interval, subscription_extra, claim_free
status
string
required
Current payment status. Possible values: PENDING, PAID, FAILED, UNPAID, CANCELLED, REFUNDED, PARTIALLY_REFUNDED, EXPIRED
value
integer
Payment amount in the smallest currency unit (e.g., cents for USD). Includes tax but excludes fees. Defaults to 0.
tax
integer
Tax amount in the smallest currency unit. Included in the total value. Defaults to 0.
fee
integer
Processing fee in the smallest currency unit. This is deducted from your payout. Defaults to 0.
currency
string | null
Three-letter ISO 4217 currency code (e.g., "USD", "EUR", "GBP").
currencyDecimals
integer | null
Number of decimal places for this currency (e.g., 2 for USD, 0 for JPY).
createdAt
integer
Unix timestamp (milliseconds) when the payment was created.
userId
string | null
UUID of the User who made this payment.
user
User | null
Expanded User object with basic information about the payer.
orderId
string | null
UUID of the associated Order. For subscription payments, this links to the initial order.
orderNumber
string | null
Human-readable order number of the associated order.
order
Order | null
Expanded Order object with basic information.
subscriptionId
string | null
Subscription identifier if this is a subscription-related payment.
subscription
Subscription | null
Expanded Subscription object with status and ID.
discount
Discount | null
Applied Discount object if a discount code or sale was used.
invoiceNumber
string | null
Invoice number for completed payments. Only available for PAID, REFUNDED, or PARTIALLY_REFUNDED statuses.
invoiceUrl
string | null
URL to download the invoice PDF. Only available for completed payments with generated invoices.
charges
array | null
Array of charge attempts for this payment.

Example response

{
  "status": "success",
  "data": {
    "payment": {
      "object": "payment",
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "number": "#PAY123DEF456",
      "type": "one_time",
      "status": "PAID",
      "value": 2999,
      "tax": 500,
      "fee": 87,
      "currency": "USD",
      "currencyDecimals": 2,
      "createdAt": 1705590000000,
      "userId": "123e4567-e89b-12d3-a456-426614174000",
      "user": {
        "object": "user",
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "username": "johndoe"
      },
      "orderId": "550e8400-e29b-41d4-a716-446655440000",
      "orderNumber": "#ABC123DEF456",
      "order": {
        "object": "order",
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "number": "#ABC123DEF456",
        "status": "PAID"
      },
      "subscriptionId": null,
      "subscription": null,
      "discount": null,
      "invoiceNumber": "INV-2024-001234",
      "invoiceUrl": "https://api.fungies.io/invoice/INV-2024-001234",
      "charges": [
        {
          "object": "charge",
          "id": "770e8400-e29b-41d4-a716-446655440002",
          "status": "succeeded",
          "createdAt": 1705590000000,
          "ipAddress": "192.168.1.100",
          "paymentMethod": {
            "type": "card",
            "brand": "visa",
            "last4": "4242"
          }
        }
      ]
    }
  }
}