Skip to main content
API resource reference for PaymentMethod, part of the Billing service. To create or change one, see Changing resources; to inspect, see Reading resources.
This resource is part of the v1alpha1 API and is subject to change. Fields and behavior may change in future releases.

Identity

Groupbilling.miloapis.com
Versionv1alpha1
KindPaymentMethod
ScopeProject

Overview

A PaymentMethod associates a payment instrument — such as a credit card or US bank account — with a BillingAccount. You create one carrying only a reference to the billing account and a human-readable display name. The billing service then injects the PaymentMethodClass that selects the provider, and the provider controller drives the setup flow and reports the confirmed instrument back on status once it is active. Use it when you need to register a new way to pay for a billing account within a Project.

Spec fields

FieldTypeRequiredDescription
spec.billingAccountRefObjectYesReferences the BillingAccount this payment method belongs to. The BillingAccount must reside in the same Project.
spec.billingAccountRef.namestringYesThe name of the BillingAccount.
spec.displayNamestringYesA human-readable label shown in the portal and on invoices (e.g., Corporate Visa).
spec.paymentMethodClassRefObjectNoSelects the PaymentMethodClass — and through it the provider controller — that owns the setup flow. Left unset by consumers and injected by the defaulting webhook. Immutable once set.
spec.paymentMethodClassRef.namestringNoThe name of the PaymentMethodClass.

Status fields (read-only)

FieldTypeDescription
status.phasestringCurrent lifecycle phase: Pending, AwaitingConfirmation, Active, or Failed.
status.detailsObjectNormalized, provider-agnostic description of the confirmed instrument. Populated once the phase reaches Active.
status.details.typestringThe instrument category: card or usBankAccount.
status.details.cardObjectCard details, populated when type is card.
status.details.usBankAccountObjectUS bank account details, populated when type is usBankAccount.
status.failureReasonstringShort, machine-parseable failure code (e.g., card_declined). Set when phase is Failed.
status.failureMessagestringHuman-readable description of the failure.
status.conditions[]ObjectLatest available observations of the payment method’s state.
status.observedGenerationintegerMost recent generation observed by the reconciling controller.

Usage

apiVersion: billing.miloapis.com/v1alpha1
kind: PaymentMethod
metadata:
  name: corporate-visa
spec:
  billingAccountRef:
    name: acme-billing
  displayName: Corporate Visa
datumctl apply -f paymentmethod.yaml --project my-project
datumctl get paymentmethods --project my-project
datumctl describe paymentmethod corporate-visa --project my-project
Run datumctl explain paymentmethods --recursive to see the full, live field tree for this resource.
Last modified on July 2, 2026