Create payment method
Authorizations
Value for the Authorization header parameter.
Body
The payment gateway to use to process the given payment method type
Possible values:
paypal
: PayPal (supports "paypal")stripe
: Stripe (supports "card")testing
: Testing (supports all)go_cardless
: GoCardless (supports "sepa_debit")bank_transfer
: Bank Transfer (supports "bank_transfer")sepa_debit
: SEPA Credit and Debit with xml file (supports "sepa_debit")wallet
: Credit Balance from Wallet (supports "wallet")
wallet
, sepa_debit
, stripe
, fake_provider
, paypal
, bank_transfer
, go_cardless
, testing
The payment method type to use for this payment method
Possible values:
sepa_debit
: SEPA Debitcard
: Credit Cardpaypal
: PayPalbank_transfer
: Bank Transferwallet
: Wallet
sepa_debit
, card
, paypal
, bank_transfer
, wallet
, fake_provider
The customer that owns this payment method. If not provided, the customer will be determined by the authenticated user.
Determines if this payment method should be used as default payment method for the customer
Determines if this payment method is allowed to be used for future payments. Otherwise the payment method is only available for this payment.
Required when gateway is "stripe". Holds all necessary data for the payment gateway to create the payment method.
Required when gateway is "sepa_debit". Holds all necessary data for the payment gateway to create the payment method.
Optional for gateway "go_cardless". It is only required when you want to migrate, or assign an existing GoCardless customer or mandate to fynn.
The redirect url to redirect the customer to after the payment method was created. This is only required, when you create a payment method with your own flow, independent from provided Hosted-Checkout, Hosted-Customerfront or Fynn.JS. Otherwise this has no effect.
Response
Possible values:
action_required
: The payment method requires an action to be taken by the customersuccess
: The payment method was successfully createdfailed
: The payment method could not be created
action_required
, success
, failed
The action required if the payment method requires an action to be taken by the customer
- redirect_to_gateway: The customer needs to be redirected to the payment gateway
- client_site_action: The customer needs to take an action on the client site
The fail reason if status is failed
The created payment method, if status is success
Was this page helpful?