POST
/
charges
curl --request POST \
  --url https://api.plane.com/v1/charges \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "payments": [
    {}
  ],
  "source": "<string>",
  "date": "<string>",
  "reference": "<string>",
  "note": "<string>",
  "metadata": "<string>"
}'
{
  "id": "ch_oUEpLsdApEb3EGzEeYTBRvGv",
  "source": "src_CKC3YwrnW4x9AYpEwU8tSw6H",
  "date": "2023-09-01",
  "amount": "1283.50",
  "currency": "USD",
  "reference": "ODH8U1MX",
  "note": null,
  "metadata": {}
}

When you create a Payment on Plane, it will not process unless it’s funded. Charges are used to fund payments.

You can create a Charge by passing in a list of payments that you’re looking to fund.

Parameters

payments
array
required

A list of payment IDs that you’re attempting to charge.

source
string

ID of the Source you will use to fund this Charge. When omitted, your default Source will be used.

date
date

The date when you want Plane to collect funds from your bank account. When left blank, Plane will use the closest available date.

reference
string

A reference for this charge visible on your bank statement. When ommitted, Plane will generate a new 8-character reference for each charge.

note
string

An additional description to be attached to the charge. This will not be shown on your bank statement.

metadata
hash

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

Returns

Returns the Charge object after successful charge creation. Returns an error code if create parameters are invalid.