Member Authentication
Merchant
Credit
Promo Credit
Discount
User Discount
Email Template
Gateway
- POSTPayment Gateway Archive
- GETPayment Gateway
- POSTPayment Gateway
- POSTPayment Gateway Edit
- POSTPayment Gateway Country Config Edit
- POSTEdit Payment Gateway Sort
- GETGet Payment Gateway List
- POSTPayment Gateway Setup
- POSTExchange Rate Api Setup
- GETGet Payment Gateway Setup List
- POSTPayment Gateway Webhook Setup
- POSTWire Transfer Edit
- POSTWire Transfer Setup
- POSTSegment Setup
Invoice
- POSTAdmin Cancel Invoice
- POSTDelete Pending Invoice
- GETInvoice Detail
- POSTInvoice Detail
- POSTInvoice Edit
- POSTFinish Invoice
- GETGet Invoice List
- POSTGet Invoice List
- POSTMark Invoice Refund
- POSTMark Invoice Refund As Success
- POSTMark Wire Transfer Invoice As Success
- POSTNew Invoice
- POSTGenerate Invoice PDF
- POSTUpdate Invoice PDF
- POSTAdmin Reconvert Crypto Data and Send Invoice Email
- POSTCreate InvoiceRefund
- POSTSend Invoice Email
Admin Member
Metric
Metric Event
Payment
- POSTCancel Payment
- POSTCapture Payment
- GETPayment Detail
- GETGet OneTime Payment Item List
- GETGet Payment List
- POSTDelete Payment Method
- GETPayment Method
- GETPayment Method List
- POSTCreate New Payment Method
- POSTNew Payment
- POSTCancel Payment Refund
- GETPayment Refund Detail
- GETGet Payment Refund List
- POSTNew Payment Refund
- GETGet Payment TimeLine List
- POSTGet Payment TimeLine List
Plan
Product
Search
Session
Subscription Update
Subscription
- POSTAppend Subscription TrialEnd
- POSTCancel Subscription Immediately
- POSTCancel Subscription At Period End
- POSTCancel Last Cancel Subscription At Period End
- POSTChange Subscription Gateway
- POSTCreate Subscription Preview
- POSTCreate Subscription
- GETSubscription Detail
- POSTSubscription Detail
- GETGet Subscription List
- POSTGet Subscription List
- GETSubscription Next Invoice Preview
- GETUser Pending Crypto Subscription Detail
- POSTUser Pending Crypto Subscription Detail
- GETUser Subscription Detail
- POSTUser Subscription Detail
Subscription Note
Subscription Config
Subscription Payment
Subscription Timeline
User
- GETGet User Admin Note List
- POSTGet User Admin Note List
- POSTChange User Email
- POSTChange User Default Gateway
- POSTClear AutoCharge Method
- GETUser Count
- GETGet User Profile
- GETUser List
- POSTUser List
- POSTNew User
- POSTNew Admin Note
- POSTResume User
- GETUser Search
- POSTUser Search
- POSTSuspend User
- POSTUpdate User Profile
Vat Gateway
New Merchant Metric Event
curl --request POST \
--url https://api.unibee.top/merchant/metric/event/new \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"aggregationUniqueId": "<string>",
"aggregationValue": 123,
"email": "account@unibee.dev",
"externalEventId": "<string>",
"externalUserId": "<string>",
"metricCode": "<string>",
"metricProperties": {},
"productId": 123,
"userId": 123
}'
{
"code": 123,
"data": {
"merchantMetricEvent": {
"aggregationPropertyData": "<string>",
"aggregationPropertyInt": 123,
"aggregationPropertyString": "<string>",
"chargeInvoiceId": "<string>",
"createTime": 123,
"eventCharge": {
"chargeAmount": 123,
"chargePricing": {
"chargeType": 123,
"graduatedAmounts": [
{
"endValue": 123,
"flatAmount": 123,
"perAmount": 123,
"startValue": 123
}
],
"metricId": 123,
"standardAmount": 123,
"standardStartValue": 123
},
"currency": "<string>",
"currentValue": 123,
"graduatedStep": {
"endValue": 123,
"flatAmount": 123,
"perAmount": 123,
"startValue": 123
},
"planId": 123,
"totalChargeAmount": 123,
"unitAmount": 123
},
"externalEventId": "<string>",
"id": 123,
"merchantId": 123,
"metricId": 123,
"metricLimit": 123,
"subscriptionIds": "<string>",
"subscriptionPeriodEnd": 123,
"subscriptionPeriodStart": 123,
"used": 123,
"userId": 123
}
},
"message": "<string>",
"redirect": "<string>",
"requestId": "<string>"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
ExternalEventId, unique
MetricCode
AggregationUniqueId, valid when AggregationType is count unique
AggregationValue, valid when AggregationType latest, max or sum
Email, UserId, ExternalUserId, or Email provides one of three options
ExternalUserId, UserId, ExternalUserId, or Email provides one of three options
default product will use if productId not specified and subscriptionId is blank
UserId, UserId, ExternalUserId, or Email provides one of three options
Response
aggregation property data (Json)
aggregation property int, use for metric of max|sum type
aggregation property string, use for metric of count|count_unique type
charge invoice id
create utc time
ChargeAmount
ChargeType,0-standard pricing 1-graduated pricing
GraduatedAmounts, used for graduated pricing
MetricId
StandardAmount, used for standard pricing,cent
StandardStartValue, used for standard pricing
Currency
CurrentUsedValue
EndValue, -1 = infinity value(∞)
FlatAmount,cent
PerAmount,cent
StartValue
PlanId
TotalChargeAmount
UnitAmount
external_event_id, should be unique
Id
merchantId
metric_id
matched subscription's current_period_end
matched subscription's current_period_start
user_id
curl --request POST \
--url https://api.unibee.top/merchant/metric/event/new \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"aggregationUniqueId": "<string>",
"aggregationValue": 123,
"email": "account@unibee.dev",
"externalEventId": "<string>",
"externalUserId": "<string>",
"metricCode": "<string>",
"metricProperties": {},
"productId": 123,
"userId": 123
}'
{
"code": 123,
"data": {
"merchantMetricEvent": {
"aggregationPropertyData": "<string>",
"aggregationPropertyInt": 123,
"aggregationPropertyString": "<string>",
"chargeInvoiceId": "<string>",
"createTime": 123,
"eventCharge": {
"chargeAmount": 123,
"chargePricing": {
"chargeType": 123,
"graduatedAmounts": [
{
"endValue": 123,
"flatAmount": 123,
"perAmount": 123,
"startValue": 123
}
],
"metricId": 123,
"standardAmount": 123,
"standardStartValue": 123
},
"currency": "<string>",
"currentValue": 123,
"graduatedStep": {
"endValue": 123,
"flatAmount": 123,
"perAmount": 123,
"startValue": 123
},
"planId": 123,
"totalChargeAmount": 123,
"unitAmount": 123
},
"externalEventId": "<string>",
"id": 123,
"merchantId": 123,
"metricId": 123,
"metricLimit": 123,
"subscriptionIds": "<string>",
"subscriptionPeriodEnd": 123,
"subscriptionPeriodStart": 123,
"used": 123,
"userId": 123
}
},
"message": "<string>",
"redirect": "<string>",
"requestId": "<string>"
}