Skip to main content
curl -X POST https://api.chargeapi.co/v1/payment_methods \
  -H "Authorization: Bearer ch_sk_test_..." \
  --json '{
  "card": {
    "cvc": "123",
    "exp_month": 12,
    "exp_year": 2030,
    "number": "4242424242424242"
  },
  "type": "card"
}'
{
    "id": "pm_OWLw9r5C9sPDAy5T4ncxNy8JAYTJmnpP",
    "object": "payment_method",
    "bank_account": null,
    "billing_details": {
        "address": {
            "city": "Paris",
            "country": "FR",
            "line1": "10 Rue de la Paix",
            "line2": "Batiment A",
            "postal_code": "75002",
            "state": "Ile-de-France"
        },
        "email": "example@example.com",
        "name": "Example",
        "phone": "+33189000023"
    },
    "card": {
        "brand": "visa",
        "exp_month": 12,
        "exp_year": 2030,
        "fingerprint": "fp_card_example",
        "last4": "4242"
    },
    "created": "2026-04-01T00:08:13.589Z",
    "driver": null,
    "fleet": null,
    "type": "card",
    "wallet": null
}
Creates a payment method. Use payment methods for charging sessions, reservations, and invoice payments.
curl -X POST https://api.chargeapi.co/v1/payment_methods \
  -H "Authorization: Bearer ch_sk_test_..." \
  --json '{
  "card": {
    "cvc": "123",
    "exp_month": 12,
    "exp_year": 2030,
    "number": "4242424242424242"
  },
  "type": "card"
}'
{
    "id": "pm_OWLw9r5C9sPDAy5T4ncxNy8JAYTJmnpP",
    "object": "payment_method",
    "bank_account": null,
    "billing_details": {
        "address": {
            "city": "Paris",
            "country": "FR",
            "line1": "10 Rue de la Paix",
            "line2": "Batiment A",
            "postal_code": "75002",
            "state": "Ile-de-France"
        },
        "email": "example@example.com",
        "name": "Example",
        "phone": "+33189000023"
    },
    "card": {
        "brand": "visa",
        "exp_month": 12,
        "exp_year": 2030,
        "fingerprint": "fp_card_example",
        "last4": "4242"
    },
    "created": "2026-04-01T00:08:13.589Z",
    "driver": null,
    "fleet": null,
    "type": "card",
    "wallet": null
}

Parameters

billing_details
object
Billing details fields for payment method requests.
type
string
required
Type of payment method being created.Available options: card, bank_account, wallet

More parameters

bank_account
object | null
Present when type is bank_account.
card
object | null
Present when type is card.
wallet
object | null
Present when type is wallet.

Returns

Returns the created payment method.