Skip to main content
POST
/
payment_methods
Create a Payment Method (tokenize)
curl --request POST \
  --url https://sandbox.api.hixbe.com/payment/payment_methods \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Hixbe-Version: <hixbe-version>' \
  --data '
{
  "type": "card",
  "card": {
    "number": "4242424242424242",
    "exp_month": 12,
    "exp_year": 2027,
    "cvc": "123"
  }
}
'
{
  "id": "pm_card_123",
  "type": "card",
  "card": {
    "brand": "visa",
    "last4": "4242",
    "exp_month": 12,
    "exp_year": 2027
  },
  "created_at": "2023-11-07T05:31:56Z",
  "customer": "<string>"
}

Authorizations

Authorization
string
header
required

Use your secret API key. Example: Authorization: Bearer sk_test_xxx

Headers

Hixbe-Version
string
default:2026-01-01
required

API version header. Use '2026-01-01' for the latest version.

X-Request-Id
string

Optional client-provided request id for tracing.

Body

application/json
type
enum<string>
default:card
Available options:
card
card
object

Response

PaymentMethod created

id
string
required
Example:

"pm_card_123"

type
string
required
Example:

"card"

card
object
created_at
string<date-time>
customer
string | null