Skip to Content
Paycose Docs
Payment methods

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

  • idstringRequired

    Unique identifier for the object.

  • objectstringRequired

    String naming the object's type.

  • livemodebooleanRequired

    true when the object exists in live mode, false in test mode.

  • createdtimestampRequired

    Time the object was created, in Unix seconds.

  • updatedtimestampRequired

    Time the object last changed, in Unix seconds.

  • customer_idstringRequired

    ID of the customer that owns the payment method.

  • card_holder_namestringRequired

    Name of the cardholder; empty when not provided.

  • last4stringRequired

    Last four digits of the card or account number.

  • fingerprintstring

    Identifies the card number: two payment methods for the same card share a fingerprint. Omitted when the payment provider does not report one.

  • exp_monthintegerRequired

    Expiration month of the card, 1 to 12; 0 when not applicable.

  • exp_yearintegerRequired

    Expiration year of the card; 0 when not applicable.

  • typestringRequired

    Kind of payment method, such as card. Credit and debit cards are both reported as card.

  • brandstringRequired

    Card brand in lowercase, such as visa or mastercard; empty when the payment method is not a card.

  • cardobjectNullable

    Card details; omitted when the payment method has none.

    Show child attributes
    • card.brandstring

      Card brand in lowercase, such as visa or mastercard.

    • card.issuerstring

      Bank that issued the card, in lowercase.

    • card.last4string

      Last four digits of the card number.

    • card.exp_monthinteger

      Expiration month of the card, 1 to 12.

    • card.exp_yearinteger

      Expiration year of the card.

  • billing_detailsobject

    Billing details collected with the payment method; omitted when none were collected.

  • allow_redisplaystring

    Whether the payment method may be offered to the customer again in later payments; omitted when not set.

  • reference_idstringRequired

    ID of the payment method at the payment provider that stores it.

  • providerstringRequired

    Payment provider that stores the payment method, such as stripe or omise.

  • metadataobjectRequired

    Key-value pairs attached to the payment method. Paycose may add customer_reference_id, the customer's ID at the payment provider.

  • customerobject (customer)NullableExpandable

    The full customer object when you expand customer; otherwise omitted.

  • provider_connection_statusstring

    Status of the payment provider account that stores the payment method. Returned only by list endpoints.

    • active

      The provider account is in use.

    • staged

      The provider account is set up but has no credentials in place yet.

    • retired

      The provider account was removed from routing; payment methods it stores can still be used.

    • purged

      The provider account was deleted together with its credentials.

    • missing

      The provider account no longer exists.

  • needs_recollectionboolean

    true when 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 when false.