Skip to main content
GET
/
payment_methods
/
{payment_method}
Retrieve a Payment Method
curl --request GET \
  --url https://api.chargeapi.co/v1/payment_methods/{payment_method} \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "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 retrieve.

Query Parameters

driver
string

If provided, the request is scoped to this driver. The API will only return the Payment Method if it belongs to the specified driver.

expand[]
string[]

Fields to expand in the response.

fleet
string

If provided, the request is scoped to this fleet. The API will only return the Payment Method if it belongs to the specified fleet.

Body

application/json · object

Response

Returns the Payment Method object.

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.

id
string
required

Unique identifier for the Payment Method object.

object
string
required

String representing the object’s type. Always 'payment_method'.

created
integer
required

Time at which the Payment Method was created. Measured in seconds since the Unix epoch.

type
enum<string>
required

The type of the Payment Method. An additional hash is included on the Payment Method with a name matching this value, containing fields specific to that payment method type. For example, if the type is card, the Payment Method will include a card hash with card-specific details.

Available options:
bank_account,
card,
wallet
bank_account
object | null

Present when type is bank_account. Contains bank account-specific details.

billing_details
object

Billing information associated with the Payment Method.

card
object | null

Present when type is card. Contains card-specific details.

driver
string | null

ID of the driver this Payment Method is attached to, if any.

fleet
string | null

ID of the fleet this Payment Method is attached to, if any.

wallet
object | null

Present when type is wallet. Contains wallet-specific details.