API REFERENCE v1

CORE RESOURCES

Payment methods

The Payment method object

Payment methods of a customer: brand, last4, expiry and type only, never card numbers.

Metadata only. NoChurn never stores card numbers.

ATTRIBUTES

Show 8 more attributesHide 8 attributes

Schema: PaymentMethod

THE PAYMENT METHOD OBJECT
{
  "object": "payment_method",
  "id": "npm_ToLxz1qiAXPyXm2j",
  "customer": "cst_TDtZmEc1VKdDucfv",
  "stripe_payment_method_id": "pm_1",
  "livemode": false,
  "type": "card",
  "brand": "visa",
  "last4": "4242",
  "exp_month": 12,
  "exp_year": 2030,
  "funding": "credit",
  "country": "FR",
  "wallet": null,
  "is_default": false,
  "detached_at": null,
  "created_at": "2026-11-04T10:00:00.000Z"
}

List payment methods, optionally for one customer

  • Secret key (nc_test_… or nc_live_…). Restricted keys need read access.
  • AI apps (OAuth): read scope.

QUERY PARAMETERS

RETURNS

ERRORS

GET/v1/payment_methods
curl https://api.nochurn.sh/v1/payment_methods \
  -H "Authorization: Bearer nc_test_…"
const res = await fetch("https://api.nochurn.sh/v1/payment_methods", {
  headers: {
    Authorization: "Bearer nc_test_…",
  },
});
const page = await res.json();
import requests

res = requests.get(
    "https://api.nochurn.sh/v1/payment_methods",
    headers={
        "Authorization": "Bearer nc_test_…",
    },
)
page = res.json()
require "net/http"
require "json"

uri = URI("https://api.nochurn.sh/v1/payment_methods")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer nc_test_…"

res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
page = JSON.parse(res.body)
RESPONSE 200
{
  "object": "list",
  "data": [
    {
      "object": "payment_method",
      "id": "npm_ToLxz1qiAXPyXm2j",
      "customer": "cst_TDtZmEc1VKdDucfv",
      "stripe_payment_method_id": "pm_1",
      "livemode": false,
      "type": "card",
      "brand": "visa",
      "last4": "4242",
      "exp_month": 12,
      "exp_year": 2030,
      "funding": "credit",
      "country": "FR",
      "wallet": null,
      "is_default": false,
      "detached_at": null,
      "created_at": "2026-11-04T10:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}