POST
/
payment_methods
curl --request POST \
  --url https://api.chargeapi.co/v1/payment_methods \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "card",
  "details": {
    "number": "4242424242424242",
    "exp_month": 12,
    "exp_year": 2027,
    "cvc": "123"
  },
  "billing_details": {
    "name": "John Doe",
    "address": {
      "line1": "123 Elm Street",
      "city": "Springfield",
      "state": "IL",
      "postal_code": "62704",
      "country": "US"
    }
  }
}'
{
  "id": null,
  "object": null,
  "billing_details": {
    "address": {
      "city": null,
      "country": null,
      "line1": null,
      "line2": null,
      "postal_code": null,
      "state": null
    },
    "email": null,
    "name": null,
    "phone": null
  },
  "created": null,
  "details": {
    "brand": null,
    "last4": null,
    "exp_month": null,
    "exp_year": null
  },
  "driver": null,
  "fleet": null,
  "type": null
}

Body

application/json

Response

200
application/json

Returns the newly created Payment Method object.