Skip to main content
POST
/
merchant
/
credit
/
edit_config
Edit Credit Config
curl --request POST \
  --url https://api.unibee.dev/merchant/credit/edit_config \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "currency": "<string>",
  "type": 123,
  "description": "<string>",
  "discountCodeExclusive": 123,
  "exchangeRate": 123,
  "logo": "<string>",
  "logoUrl": "<string>",
  "metaData": {},
  "name": "<string>",
  "payoutEnable": 123,
  "previewDefaultUsed": 123,
  "rechargeEnable": 123,
  "recurring": 123
}
'
{
  "code": 123,
  "data": {
    "creditConfig": {
      "createTime": 123,
      "currency": "<string>",
      "description": "<string>",
      "discountCodeExclusive": 123,
      "exchangeRate": 123,
      "id": 123,
      "logo": "<string>",
      "logoUrl": "<string>",
      "merchantId": 123,
      "metaData": {},
      "name": "<string>",
      "payoutEnable": 123,
      "previewDefaultUsed": 123,
      "rechargeEnable": 123,
      "recurring": 123,
      "totalDecrementAmount": 123,
      "totalIncrementAmount": 123,
      "type": 123
    }
  },
  "merchantId": 123,
  "message": "<string>",
  "redirect": "<string>",
  "requestId": "<string>"
}

Endpoint Overview

POST https://api.unibee.dev/merchant/credit/edit_config Edit Credit Config

Authorization

All UniBee Merchant API requests require authentication via API key.
HeaderRequiredDescription
AuthorizationYesBearer <your_api_key>
Content-TypeYesapplication/json (for request body)

Parameters

Parameters for this endpoint are listed below. The schema is also shown in the Try it panel.

Request body

NameTypeRequiredDescription
currencystringYescurrency
descriptionstringNodescription
discountCodeExclusiveintegerNodiscount code exclusive when purchase, default no, 0-no, 1-yes
exchangeRateintegerNokeep two decimal places,scale = 100, 1 currency = 1 credit * (exchange_rate/100), main account fixed rate to 100
logostringNologo image base64, show when user purchase
logoUrlstringNologo url, show when user purchase
metaDataobjectNometa_data(json)
namestringNoname
payoutEnableintegerNocredit account can payout or not, default no, 0-no, 1-yes
previewDefaultUsedintegerNois default used when in purchase preview, default no, 0-no, 1-yes
rechargeEnableintegerNocredit account can recharge or not, default no, 0-no, 1-yes
recurringintegerNoapply to recurring, default no, 0-no,1-yes
typeintegerYestype of credit account, 1-main account, 2-promo credit account

Request examples

cURL

curl -X POST "https://api.unibee.dev/merchant/credit/edit_config" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "currency": "",
  "description": "",
  "discountCodeExclusive": 0,
  "exchangeRate": 0,
  "logo": "",
  "logoUrl": "https://example.com",
  "metaData": {},
  "name": "",
  "payoutEnable": 0,
  "previewDefaultUsed": 0,
  "rechargeEnable": 0,
  "recurring": 0,
  "type": 0
}'

Sandbox

curl -X POST "https://api-sandbox.unibee.top/merchant/credit/edit_config" \
  -H "Authorization: Bearer YOUR_SANDBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "currency": "",
  "description": "",
  "discountCodeExclusive": 0,
  "exchangeRate": 0,
  "logo": "",
  "logoUrl": "https://example.com",
  "metaData": {},
  "name": "",
  "payoutEnable": 0,
  "previewDefaultUsed": 0,
  "rechargeEnable": 0,
  "recurring": 0,
  "type": 0
}'

Response

Success responses return a JSON envelope with code, data, message, redirect, and requestId. code 0 indicates success.
FieldTypeDescription
codeintegerResponse code. 0 = success
dataobjectResponse payload
data.creditConfigobject
messagestringHuman-readable message
requestIdstringRequest ID for support

Error handling

HTTP statusMeaning
400Bad request — invalid or missing parameters. Check message in the body.
401Unauthorized — missing or invalid API key.
404Not found — invalid path or resource.
500Server error — retry with backoff.
When code in the response body is non-zero, check message for details. Use requestId when contacting support.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
currency
string<string>
required

currency

type
integer<int>
required

type of credit account, 1-main account, 2-promo credit account

description
string<*string>

description

discountCodeExclusive
integer<*int>

discount code exclusive when purchase, default no, 0-no, 1-yes

exchangeRate
integer<*int64>

keep two decimal places,scale = 100, 1 currency = 1 credit * (exchange_rate/100), main account fixed rate to 100

logo image base64, show when user purchase

logoUrl
string<*string>

logo url, show when user purchase

metaData
object

meta_data(json)

name
string<*string>

name

payoutEnable
integer<*int>

credit account can payout or not, default no, 0-no, 1-yes

previewDefaultUsed
integer<*int>

is default used when in purchase preview, default no, 0-no, 1-yes

rechargeEnable
integer<*int>

credit account can recharge or not, default no, 0-no, 1-yes

recurring
integer<*int>

apply to recurring, default no, 0-no,1-yes

Response

200 - application/json
code
integer<int>
data
object
merchantId
integer<int64>
message
string<string>
redirect
string<string>
requestId
string<string>