Payment methods
The payment_method object
A payment method is a customer's saved way to pay, such as a card, stored at a payment provider so you can charge it again later. It is created when the customer completes a setup intent or saves the method while paying.
Attributes
idstringRequiredUnique identifier for the object.
objectstringRequiredString naming the object's type.
livemodebooleanRequiredtruewhen the object exists in live mode,falsein test mode.createdtimestampRequiredTime the object was created, in Unix seconds.
updatedtimestampRequiredTime the object last changed, in Unix seconds.
customer_idstringRequiredID of the customer that owns the payment method.
card_holder_namestringRequiredName of the cardholder; empty when not provided.
last4stringRequiredLast four digits of the card or account number.
fingerprintstringIdentifies the card number: two payment methods for the same card share a fingerprint. Omitted when the payment provider does not report one.
exp_monthintegerRequiredExpiration month of the card, 1 to 12;
0when not applicable.exp_yearintegerRequiredExpiration year of the card;
0when not applicable.typestringRequiredKind of payment method, such as
card. Credit and debit cards are both reported ascard.brandstringRequiredCard brand in lowercase, such as
visaormastercard; empty when the payment method is not a card.cardobjectNullableCard details; omitted when the payment method has none.
Show child attributes
card.brandstringCard brand in lowercase, such as
visaormastercard.card.issuerstringBank that issued the card, in lowercase.
card.last4stringLast four digits of the card number.
card.exp_monthintegerExpiration month of the card, 1 to 12.
card.exp_yearintegerExpiration year of the card.
billing_detailsobjectBilling details collected with the payment method; omitted when none were collected.
allow_redisplaystringWhether the payment method may be offered to the customer again in later payments; omitted when not set.
reference_idstringRequiredID of the payment method at the payment provider that stores it.
providerstringRequiredPayment provider that stores the payment method, such as
stripeoromise.metadataobjectRequiredKey-value pairs attached to the payment method. Paycose may add
customer_reference_id, the customer's ID at the payment provider.The full customer object when you expand
customer; otherwise omitted.provider_connection_statusstringStatus of the payment provider account that stores the payment method. Returned only by list endpoints.
activeThe provider account is in use.
stagedThe provider account is set up but has no credentials in place yet.
retiredThe provider account was removed from routing; payment methods it stores can still be used.
purgedThe provider account was deleted together with its credentials.
missingThe provider account no longer exists.
needs_recollectionbooleantruewhen the provider account that stores the payment method can no longer be used, so the customer has to add the payment method again. Returned only by list endpoints; omitted whenfalse.