Create Refund
https://api.baremetrics.com/v1/{source_id}/refundsCreate "One-Off" refunds that are not linked to a subscription.
These refunds do not affect MRR. They only impact Net Revenue and Other Revenue.
[!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
charge_oidstring requiredWhich charge do you want to refund? This must be an API charge.
createdstring · date-timeUnix timestamp of when this was created
Default
"NOW"
Responses
{
"refund": {
"oid": "your_unique_id",
"source_id": "source_id",
"source": "baremetrics",
"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
},
"charge": {
"oid": "123",
"source_id": "source_id",
"source": "baremetrics",
"status": "paid",
"created": 1475452800,
"currency": "usd",
"amount": 450000,
"original_amount": 450000
},
"amount": 450000
}
}{}