> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corrily.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create charge

> Notify Corrily that one of your customers has initiated a one-time transaction.

<RequestExample>
  ```bash Bash theme={null}
  curl --request POST \
       --url https://client.corrily.com/v1/charges \
       --header 'Accept: application/json' \
       --header 'Content-Type: application/json' \
       --data '
  {
       "amount": 50,
       "amount_refunded": 0,
       "created": 1662444537,
       "currency": "USD",
       "country": "US",
       "origin": "stripe",
       "origin_id": "sub_JaHy9Kl6ZMLvId",
       "product": "monthly",
       "status": "succeeded",
       "user_id": "test_user"
  }
  '
  ```
</RequestExample>

<Warning>
  <h3>Custom payment gateway integrations only</h3>

  You do not need to use this endpoint if you have [granted Corrily automated
  access](../payment-gateways/integration-guide#recommended-provide-automated-access-of-subscription-and-charge-events)
  to your payment gateway's subscription and charge events.
</Warning>

## Body Params

<ParamField body="amount" type="float" required>
  The amount (price) of the charge.
</ParamField>

<ParamField body="amount_refunded" type="float" default="0">
  The amount refunded by the charge. Only required if amount is undefined.
</ParamField>

<ParamField body="created" type="integer" required>
  A 10-digit (seconds) [UNIX timestamp](https://en.wikipedia.org/wiki/Unix_time)
  indicating when the charge was created. This timestamp should represent when
  the charge was initialized, regardless of the status of the charge during the
  initialization. It's rare to need to update `created` after initially setting
  it.
</ParamField>

<ParamField body="currency" type="string" required>
  The three-letter [(ISO
  4217\)](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code.
</ParamField>

<ParamField body="country" type="string">
  User's two-letter ISO3166 country code.
</ParamField>

<ParamField body="origin" type="string" required>
  The payment gateway that handled the charge. Accepted values: `stripe`,
  `paypal`, `chargebee`.
</ParamField>

<ParamField body="origin_id" type="string" required>
  A unique identifier for the charge. This can be the ID that the payment
  gateway assigned to the charge.
</ParamField>

<ParamField body="product" type="string" required>
  A product ID string or a payment gateway integration object. Product IDs are
  created by Corrily when you set up your Corrily account. Email
  [support@corrily.com](mailto:support@corrily.com) if you don't know them. See the response of the [calculate
  price](../calculate-price) endpoint for an example of the structure of
  integration objects.
</ParamField>

<ParamField body="status" type="string" required>
  The status of the charge. Accepted values: `pending`, `succeeded`, `failed`.
</ParamField>

<ParamField body="user_id" type="string" required>
  A [User ID](../users/user-ids).
</ParamField>

<ParamField body="metadata" type="object">
  Free form key-value data. Metadata is useful for storing additional, structured information for a charge.
</ParamField>
