POST
/
v1
/
charges

Custom payment gateway integrations only

You do not need to use this endpoint if you have granted Corrily automated access to your payment gateway’s subscription and charge events.

Body Params

amount
float
required

The amount (price) of the charge.

amount_refunded
float
default: "0"

The amount refunded by the charge. Only required if amount is undefined.

created
integer
required

A 10-digit (seconds) UNIX timestamp 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.

currency
string
required

The three-letter (ISO 4217) currency code.

country
string

User’s two-letter ISO3166 country code.

origin
string
required

The payment gateway that handled the charge. Accepted values: stripe, paypal, chargebee.

origin_id
string
required

A unique identifier for the charge. This can be the ID that the payment gateway assigned to the charge.

product
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 if you don’t know them. See the response of the calculate price endpoint for an example of the structure of integration objects.

status
string
required

The status of the charge. Accepted values: pending, succeeded, failed.

user_id
string
required
metadata
object

Free form key-value data. Metadata is useful for storing additional, structured information for a charge.