Skip to main content
POST
cURL

Autorisierungen

Authorization
string
header
erforderlich

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Pfadparameter

id
string
erforderlich

PaymentMethod identifier

Body

The new PaymentMethod resource

Represents a payment method attached to a customer, such as a credit card, SEPA direct debit, PayPal, or bank transfer.

customer
string<uuid>

The ID of the customer that owns this payment method

Beispiel:

"ad8f3b9e-1b1a-4b9a-9b9a-9b9a9b9a9b9a"

gatewayName
enum<string>

The payment gateway used to process the payment method

Verfügbare Optionen:
wallet,
sepa_debit,
stripe,
fake_provider,
paypal,
bank_transfer,
go_cardless,
testing
type
enum<string> | null

The type of the payment method

Verfügbare Optionen:
sepa_debit,
card,
paypal,
bank_transfer,
wallet,
fake_provider,
null
referenceId
string | null

The reference ID of the payment method at the payment gateway

customerReferenceId
string | null

The customer reference ID at the payment gateway

default
boolean

Whether this is the default payment method for the customer

Beispiel:

true

status
enum<string>
Standard:active

The current status of the payment method

Verfügbare Optionen:
active,
action_required,
expired,
revoked,
gateway_unconfigured
Beispiel:

"active"

source
enum<string>
Standard:api

The source where the payment method was created

Verfügbare Optionen:
checkout,
customerfront,
api,
add_link
Beispiel:

"api"

enabled
boolean

Whether the payment method is enabled for use

Beispiel:

true

isInternal
boolean

Whether this is an internal payment method (e.g. wallet)

Beispiel:

false

name
string | null

Display name of the payment method

Beispiel:

"Visa (4242)"

data
string[]

Additional data associated with the payment method

expirationDate
string<date-time> | null

The expiration date of the payment method, if applicable

Beispiel:

"2026-12-31T23:59:59+00:00"

notifications
string<uuid>[]

List of notification IDs associated with this payment method

webhookResults
string<uuid>[]

List of webhook result IDs triggered by this payment method

gatewayData
string[]
write-only

Gateway-specific data for the payment method (write-only)

Antwort

PaymentMethod resource created

Payment method details returned when reading a payment method.

id
string
read-only

Unique identifier of the payment method

Beispiel:

"c1a2b3c4-d5e6-4f7a-8b9b-0c1d2e3f4a5b"

customer
string<uuid>

The ID of the customer that owns this payment method

Beispiel:

"ad8f3b9e-1b1a-4b9a-9b9a-9b9a9b9a9b9a"

gatewayName
enum<string>

The payment gateway used to process the payment method

Verfügbare Optionen:
wallet,
sepa_debit,
stripe,
fake_provider,
paypal,
bank_transfer,
go_cardless,
testing
type
enum<string> | null

The type of the payment method

Verfügbare Optionen:
sepa_debit,
card,
paypal,
bank_transfer,
wallet,
fake_provider,
null
referenceId
string | null

The reference ID of the payment method at the payment gateway

default
boolean

Whether this is the default payment method for the customer

Beispiel:

true

status
enum<string>
Standard:active

The current status of the payment method

Verfügbare Optionen:
active,
action_required,
expired,
revoked,
gateway_unconfigured
Beispiel:

"active"

source
enum<string>
Standard:api

The source where the payment method was created

Verfügbare Optionen:
checkout,
customerfront,
api,
add_link
Beispiel:

"api"

enabled
boolean

Whether the payment method is enabled for use

Beispiel:

true

name
string | null

Display name of the payment method

Beispiel:

"Visa (4242)"

data
string[]

Additional data associated with the payment method

creationDate
string<date-time>
read-only

The date when the payment method was created

Beispiel:

"2024-01-15T10:30:00+00:00"

expirationDate
string<date-time> | null

The expiration date of the payment method, if applicable

Beispiel:

"2026-12-31T23:59:59+00:00"

sepaMandate
object | null

The sepa mandate of the payment method, if the gatewayName is "payment_sepa"

card
object
read-only

The card data of the payment method, if the type is "card"

sepaDebit
object
read-only

The sepa mandate data of the payment method, if the type is "sepa_debit"

paypal
object
read-only

The paypal data of the payment method, if the type is "paypal"

expirationInDays
integer | null
read-only

Number of days until the payment method expires. Null if no expiration.

Beispiel:

365