Payments

Get Payment

Get a payment with invoice, customer, subscription, and plan context. When possible, includes PSP payment method details (card brand/last4) using the external payment ID.

GET
/payments/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

Use your secret API key as the bearer token

In: header

Path Parameters

id*string

Payment ID

Match^pay_[A-Za-z0-9]{22}$

Response Body

application/json

application/json

application/json

curl -X GET "https://api.getlumen.dev/v1/payments/string"
{
  "payment": {
    "id": "pay_7mHn2Qx9rP5aW3kD0",
    "invoiceId": "inv_c9MBd7QfJH5s2r4aLvXK",
    "paymentMethodId": "pm_4sD1Xk6Vn9QeZ0tL3",
    "externalPaymentId": "pi_3NK6...",
    "amountCents": 12900,
    "currency": "USD",
    "status": "succeeded",
    "refundStatus": "none",
    "refundedAmountCents": 0,
    "paymentProvider": "stripe",
    "customer": {
      "id": "cus_Lo4xGg1Yk9pB2eWv3sNt",
      "name": "Alicia Keys",
      "email": "alicia@example.com",
      "billingCountry": "US",
      "billingCity": "New York"
    },
    "invoice": {
      "id": "inv_c9MBd7QfJH5s2r4aLvXK",
      "customerInvoiceNumber": "LO4XGG-001",
      "totalAmountCents": 12900,
      "currency": "USD",
      "status": "issued",
      "issueDate": "2025-02-20T00:00:00.000Z",
      "dueDate": "2025-03-05T00:00:00.000Z",
      "hasPdf": true
    },
    "pspPaymentMethod": {
      "id": "pm_1NYC...",
      "type": "card",
      "cardLastFour": "4242",
      "cardBrand": "visa"
    },
    "createdAt": "2025-02-20T17:00:00.000Z",
    "updatedAt": "2025-02-20T17:01:10.000Z"
  }
}
{
  "error": "Payment not found"
}
{
  "error": "Failed to fetch payment"
}