Skip to main content
POST
/
referred-businesses
/
{business_uuid}
/
add-credits
Add credits
curl --request POST \
  --url https://api.usetyms.com/v1/adam/referred-businesses/{business_uuid}/add-credits \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "credits": 500
}'
import requests

url = "https://api.usetyms.com/v1/adam/referred-businesses/{business_uuid}/add-credits"

payload = { "credits": 500 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({credits: 500})
};

fetch('https://api.usetyms.com/v1/adam/referred-businesses/{business_uuid}/add-credits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "status": "success",
  "message": "Credits granted successfully.",
  "data": {
    "allocation": {
      "uuid": "c3d4e5f6",
      "allocation_type": "credits",
      "quantity": 500,
      "subscription_reference": "partner_credit_7a8b9c",
      "subscription_expires_at": "2027-07-09T02:00:00.000000Z",
      "meta": {
        "holding_credits_charged": 500,
        "credits_granted": 500
      }
    },
    "holding_credits_charged": 500,
    "partner_holding_balance": 8825,
    "business_credit_balance": 1250.5
  }
}
{
"status": "failed",
"message": "<string>"
}
{
"status": "failed",
"message": "<string>"
}
{
"status": "failed",
"message": "Insufficient partner credit holding.",
"error_code": "insufficient_partner_credit_holding"
}
{
"status": "failed",
"message": "<string>"
}
{
"status": "failed",
"message": "<string>"
}
{
"status": "failed",
"message": "<string>"
}
1:1 transfer from holding to the business ledger. Use when plan credits run low or you prefer pay-as-you-go top-ups instead of Add seats. Blocked when credit_from_referral_partner is true.

Authorizations

X-API-Key
string
header
default:your_tyms_sk_or_partner_key
required

Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.

Path Parameters

business_uuid
string
required

Body

application/json
credits
number
required

Holding credits to transfer to the business at 1:1.

Required range: 1 <= x <= 1000000

Response

Credits transferred

status
string
Example:

"success"

message
string
data
object