Create Charge
https://api.baremetrics.com/v1/{source_id}/chargesCreate "One-Off" charges that are not linked to a subscription.
These charges do not affect MRR. They only impact Net Revenue and Other Revenue.
[!CAUTION] If you are managing subscription charges manually, please note that this will not impact the subscription state or MRR. For example, if you stop sending charges, the subscription will stay active until you cancel it. This feature is purely designed to allow people to control the timing of charges, and for people who have custom proration methods.
If you want to manually manage subscription charges, then please contact support.
Otherwise, we will automatically create charges.
[!CAUTION] Zero-decimal currencies
Our API expects currencies to be submitted in their smallest unit. The value 100 USD, for example, should be submitted to our API as 10,000 (i.e. 10,000 cents).
We consider the following currencies to be zero-decimal:\ BIF, DJF, JPY, KRW, PYG, VND, XAF, XPF, CLP, GNF, KMF, MGA, RWF, VUV, XOF, ISK, HUF
Special Exceptions
Although the Hungarian Forint (HUF) is sometimes considered to have an exponent of 2, our API treats HUF as a zero-decimal currency. All HUF values should therefore be rounded to the nearest whole number (e.g. a charge of HUF 100.95 should be submitted to our API as 101).
Path parameters
source_idstring requiredPlease see Sources
Body
application/jsonoidstring requiredYour unique reference for this charge
amountinteger · int32 requiredThe charge amount (in cents)
currencystring requiredThe ISO code of the currency of this plan. E.G: usd
customer_oidstring requiredYour unique ID for the customer
createdstring · date-timeUnix timestamp of when this was created
Default
"NOW"statusstringThe status of this charge. Can be paid or failed. Defaults to paid.
Default
"paid"feeinteger · int32Default
0subscription_oidstringThis can only be supplied when Subscription Auto Charging is disabled. Please contact support if you want to handle your subscription charges manually.
Responses
{
"charge": {
"oid": "your_unique_id",
"source_id": "source_id",
"source": "baremetrics",
"status": "paid",
"created": 1475452800,
"customer": {
"oid": "customer_1",
"source_id": "source_1",
"source": "stripe",
"created": 1492605754,
"email": "customer_1@baremetrics.com",
"name": "Customer 1",
"display_image": "https://logo.clearbit.com/baremetrics.com",
"display_name": "Customer 1",
"notes": "Here are some notes",
"ltv": 50000
},
"subscription": null,
"amount": 450000,
"currency": "USD",
"original_amount": 450000,
"fee": 500,
"original_fee": 500
}
}{}