Zum Hauptinhalt springen
PUT
/
customers
/
{customerId}
/
payment-method
cURL
curl -X PUT \
 /customers/{customerId}/payment-method \
 --header "Content-Type: application/json" \
 --header "Authorization: Bearer <token>" \
 --data '{
    "paymentMethodId": ""
}'
{
  "id": "<string>",
  "customer": "https://example.com/",
  "gatewayName": "wallet",
  "type": "sepa_debit",
  "referenceId": "<string>",
  "default": true,
  "status": "active",
  "source": "api",
  "enabled": true,
  "name": "<string>",
  "data": [
    "<string>"
  ],
  "creationDate": "2023-11-07T05:31:56Z",
  "expirationDate": "2023-11-07T05:31:56Z",
  "sepaMandate": {
    "id": "ad8f0b9c-0b1a-4e1a-8b0a-0b1a4e1a8b0a",
    "status": "active",
    "creditorIdentifier": "<string>",
    "mandateReference": "MNDT-2021-0001",
    "bankAccount": {
      "id": "ad8f0b9c-4b1e-4e0e-8b9c-4b1e4e0e8b9c",
      "iban": "DE12500105170648489890",
      "bic": "PBNKDEFFXXX",
      "accountHolder": "Max Mustermann",
      "bankName": "Commerzbank"
    },
    "sequenceType": "FRST",
    "sepaType": "core"
  },
  "card": {
    "brand": "Visa",
    "last4": "4242",
    "expMonth": 12,
    "expYear": 2022,
    "cardHolder": "Max Mustermann"
  },
  "sepaDebit": {
    "iban": "DE8937*********3232",
    "bic": "COBADEFFXXX",
    "mandateReference": "MNDT-2021-123456",
    "signingDate": "2021-01-01T00:00:00+00:00"
  },
  "paypal": {
    "email": "[email protected]",
    "billingAgreementId": "I-1J5gqz2eZvKYlo2C2X2X2X2X"
  },
  "expirationInDays": 123
}

Autorisierungen

Authorization
string
header
erforderlich

Value for the Authorization header parameter.

Pfadparameter

customerId
string
erforderlich

PaymentMethod identifier

Body

The updated PaymentMethod resource

paymentMethodId
string
erforderlich

The new default payment method which should be used for new invoices, subscriptions and other offers.

Antwort

PaymentMethod resource updated

id
string
customer
string<iri-reference>
Beispiel:

"https://example.com/"

gatewayName
enum<string>
Verfügbare Optionen:
wallet,
sepa_debit,
stripe,
fake_provider,
paypal,
bank_transfer,
go_cardless,
testing
type
enum<string> | null
Verfügbare Optionen:
sepa_debit,
card,
paypal,
bank_transfer,
wallet,
fake_provider,
referenceId
string | null
default
boolean
status
enum<string>
Standard:active
Verfügbare Optionen:
active,
action_required,
expired,
revoked,
gateway_unconfigured
Beispiel:

"active"

source
enum<string>
Standard:api
Verfügbare Optionen:
checkout,
customerfront,
api,
add_link
Beispiel:

"api"

enabled
boolean
name
string | null
data
string[]
creationDate
string<date-time>
expirationDate
string<date-time> | null
sepaMandate
object

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

card
object

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

sepaDebit
object

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

paypal
object

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

expirationInDays
integer | null