Skip to main content

CustomerPaymentMethod

A payment method saved to a customer. A successful payment that names the customer in customerId saves one when it sets generatePaymentToken, or when it is the first payment of a recurring sequence. Only card, Bizum and SEPA payment methods are saved. Full card numbers and IBANs are never returned: a card or a SEPA account shows only its last four digits. A Bizum payment method shows its phone number.

type CustomerPaymentMethod {
id: ID!
type: String!
paymentMethod: PaymentMethod
expireAt: AWSTimestamp
createdAt: AWSDateTime
sequence: Boolean!
}

Fields​

CustomerPaymentMethod.id ● ID! non-null scalar​

Payment method ID. Pass it as paymentToken to createPayment to charge it, or to deleteCustomerPaymentMethod to remove it. When sequence is false, you can also set it as the customer's defaultTokenId.

CustomerPaymentMethod.type ● String! non-null scalar​

Token type: STICKY or ENCRYPTED_STICKY. Both can be charged again. The kind of payment method (card, Bizum, SEPA) is in paymentMethod.method.

CustomerPaymentMethod.paymentMethod ● PaymentMethod object​

Display details of the payment method: its kind in method, and for a card the brand and last four digits.

CustomerPaymentMethod.expireAt ● AWSTimestamp scalar​

When the payment method expires, in Unix seconds. For a card, one month after the card's expiry date. null when it does not expire (Bizum, SEPA). An expired payment method is not listed.

CustomerPaymentMethod.createdAt ● AWSDateTime scalar​

When the payment method was saved, as an ISO 8601 date-time.

CustomerPaymentMethod.sequence ● Boolean! non-null scalar​

Whether this is a sequence payment method. The first payment of a recurring sequence saves one for the merchant-initiated payments that follow, such as subscription renewals. Its id is the sequenceId of those payments. false for a payment method the buyer saved for reuse. A sequence payment method cannot be the customer's default.

Returned By​

customerPaymentMethods query