POST
/
payment_methods
/
{payment_method}
curl --request POST \
  --url https://api.chargeapi.co/v1/payment_methods/{payment_method} \
  --header 'Content-Type: application/json' \
  --data '{
  "bank_account": {
    "bank_name": "<string>",
    "currency": "<string>"
  },
  "billing_details": {
    "address": {
      "city": "<string>",
      "country": "<string>",
      "line1": "<string>",
      "line2": "<string>",
      "postal_code": "<string>",
      "state": "<string>"
    },
    "email": "jsmith@example.com",
    "name": "<string>",
    "phone": "<string>"
  },
  "card": {
    "exp_month": 123,
    "exp_year": 123
  }
}'
{
  "id": "<string>",
  "object": "<string>",
  "bank_account": {
    "bank_name": "<string>",
    "country": "<string>",
    "currency": "<string>",
    "fingerprint": "<string>",
    "last4": "<string>",
    "status": "pending"
  },
  "billing_details": {
    "address": {
      "city": null,
      "country": null,
      "line1": null,
      "line2": null,
      "postal_code": null,
      "state": null
    },
    "email": null,
    "name": null,
    "phone": null
  },
  "card": {
    "brand": "<string>",
    "exp_month": 123,
    "exp_year": 123,
    "fingerprint": "<string>",
    "last4": "<string>"
  },
  "created": 123,
  "driver": "<string>",
  "fleet": "<string>",
  "type": "bank_account",
  "wallet": {
    "balance": 123,
    "currency": "<string>",
    "fingerprint": "<string>",
    "status": "active"
  }
}

Path Parameters

payment_method
string
required

The unique identifier for the Payment Method to update.

Body

application/json

Response

200
application/json

Returns the updated Payment Method object. If the Payment Method does not exist, an error is returned.

A Payment Method object 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.