Create Credit Card Payment Method

Allows a user to directly submit their payment method information to Stax Bill without touching your servers. Y

Your site must be added to an account's allow list as a valid origin in order to allow clients to submit their payment method.

This requires validation using reCaptcha. A key is provided on the same page as the above, or your own can be set there as well.

This requires a gateway to be configured on the account before being able to save payment methods.

There is a basic test gateway available. There are test cards available for that test gateway.

ACH and EFT payment methods use a different private endpoint .

The first card added to a customer will become their default payment method. It can be replaced using Replace credit card payment method., deleted, or set as default separately.

Some gateways support payment method import instead.

Stripe

BrainTree

Stax Payments

Global Payments

PayPal Express - Deprecated by Paypal.

Body Params
string
required
string
required

The reCAPTCHA token response. Required as part of submission.

int32
required

Customer ID, created and provided as part of a [Create Customer]

string
required

**This should be a string, escaped with ". Otherwise values might be interpreted incorrectly.

string
required

Payment method first name, may not exactly match customer first name. Used for validating credit card.

string
required

Payment method last name, may not exactly match customer last name. Used for validating credit card.

int32
required

2 digit value for month of year. Used for card validation.

int32
required
string
required

This must be sent as a string, otherwise any leading 0 will be trimmed and validation will fail.

boolean

Set as true to make this the main payment method moving forward. If left blank, it will default to false. First payment method added to an account default as true.

string

Gateways may require these fields for additional validation. If not provided, payment method may fail.

string
string

Payment method city address. Used for card validation.

int32

Payment method address state. Used for payment method validation.

int32

Payment method address country. Used for payment method validation.

string

Postal or Zip code. Make sure this is a string, otherwise leading 0's, which are common, will end up removed unintentionally.

paymentCollectOptions
object

Additional collection amount of a specific value or automatically collecting any outstanding balances.

Headers
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses

Language
LoadingLoading…
Response
Choose an example:
application/json