Skip to main content
POST
/
v1
/
payment-methods
Create payment method
curl --request POST \
  --url https://api.wizcommerce.com/v1/payment-methods \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "reference_id": "CRD_1234567890",
  "customer_id": "00000000-0000-0000-0000-000000000000",
  "provider": "stripe",
  "external_customer_id": "cus_ABC123456",
  "payment_method_type": "card",
  "card_type": "debit",
  "brand": "visa",
  "card_expiry": "09/25",
  "last_four_digits": "1111",
  "display_name": "John Doe",
  "is_default": false,
  "token": "PIuTv1UgBqESZ2KRDixPtDJt~1234567890",
  "address_line_1": "123 Main St",
  "address_line_2": "Apt 101",
  "city": "Anytown",
  "state": "CA",
  "country": "US",
  "zip_code": "12345",
  "email": "john.doe@example.com",
  "phone": "+14155552671",
  "first_name": "John",
  "last_name": "Doe"
}'
{
  "data": {
    "id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
    "reference_id": "EXT-878",
    "customer_id": "CST-137",
    "provider": "stax",
    "payment_method_type": "card",
    "card_type": "debit",
    "brand": "visa",
    "status": "active",
    "card_expiry": "09/25",
    "last_four_digits": "1234",
    "display_name": "John Doe",
    "token": "PIuTv1UgBqESZ2KRDixPtDJt~1234567890",
    "address_line_1": "123 Main St",
    "address_line_2": "Apt 101",
    "city": "Anytown",
    "state": "CA",
    "country": "US",
    "zip_code": "12345",
    "email": "john.doe@example.com",
    "phone": "+14155552671",
    "first_name": "John",
    "last_name": "Doe",
    "created_at": "2025-01-01T15:04:05Z",
    "updated_at": "2025-01-01T15:04:05Z",
    "is_default": false
  }
}

Authorizations

X-API-Key
string
header
required

API Key for authentication

Body

application/json

body

reference_id
string
required
Maximum length: 255
Example:

"CRD_1234567890"

customer_id
string
required
Example:

"00000000-0000-0000-0000-000000000000"

provider
string
required
Maximum length: 50
Example:

"stripe"

payment_method_type
string
required
Maximum length: 50
Example:

"card"

card_type
string
required
Maximum length: 50
Example:

"debit"

brand
string
required
Maximum length: 50
Example:

"visa"

card_expiry
string
required
Example:

"09/25"

last_four_digits
string
required
Maximum length: 4
Example:

"1111"

token
string
required
Example:

"PIuTv1UgBqESZ2KRDixPtDJt~1234567890"

external_customer_id
string
Maximum length: 255
Example:

"cus_ABC123456"

display_name
string
Maximum length: 50
Example:

"John Doe"

is_default
boolean
default:false
address_line_1
string
Maximum length: 255
Example:

"123 Main St"

address_line_2
string
Maximum length: 255
Example:

"Apt 101"

city
string
Maximum length: 50
Example:

"Anytown"

state
string
Maximum length: 50
Example:

"CA"

country
string
Example:

"US"

zip_code
string
Maximum length: 50
Example:

"12345"

email
string
Example:

"john.doe@example.com"

phone
string
Example:

"+14155552671"

first_name
string
Maximum length: 50
Example:

"John"

last_name
string
Maximum length: 50
Example:

"Doe"

Response

Created

data
object