POST
/
payment_methods
curl --request POST \
  --url https://api.chargeapi.co/v1/payment_methods
{
  "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
}

Response

200 - application/json
A newly created payment_method.

A Payment Method represents a saved way to pay for charging sessions, such as a credit card. It can be attached to a driver, a fleet, or an account and is used during session billing or reservation fees.

id
string

Unique identifier for the payment method object.

Example:

null

object
string

String representing the object’s type. Always payment_method.

Example:

null

billing_details
object

Billing contact information associated with the payment method.

created
integer

Time at which the payment method was added.

Example:

null

details
object

Card or method-specific details (non-sensitive).

driver
string | null

ID of the driver this payment method is associated with, if any.

Example:

null

fleet
string | null

ID of the fleet this payment method is associated with, if any.

Example:

null

type
string

Type of payment method (e.g., card, wallet).

Example:

null