Add Reseller Credit API

Add credit to reseller accounts for service distribution and transactions

Credit Management

Add Reseller Credit API

Add credit balance to reseller accounts. Credits allow resellers to provision services, manage users, and conduct transactions on the platform.

Top Up Balance

Add funds to reseller accounts.

Enable Business

Credits power reseller operations.

Tracked Transactions

Full audit trail of all credits.


Endpoint Overview

MUTATION/graphql

Add credit to a reseller's account. The credit amount is added to their existing balance.

Authentication:Bearer Token
Required scopes:admin

Request Parameters

resellerIdInt!Required

The unique identifier of the reseller receiving the credit.

creditString!Required

The amount of credit to add (as a string to preserve precision).


GraphQL Mutation

mutation addResellerCredit($resellerId: Int!, $credit: String!) {
  addResellerCredit(resellerId: $resellerId, credit: $credit) {
    id
    email
    firstName
    lastName
    credit
    level
    phone
  }
}

Variables:

{
  "resellerId": 12345,
  "credit": "500.00"
}

HTTP Request:

curl -X POST https://api.orbnet.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -d '{
    "query": "mutation addResellerCredit($resellerId: Int!, $credit: String!) { addResellerCredit(resellerId: $resellerId, credit: $credit) { id email credit level } }",
    "variables": {
      "resellerId": 12345,
      "credit": "500.00"
    }
  }'

Response

200Credit Added Successfully
{
  "data": {
    "addResellerCredit": {
      "id": "12345",
      "email": "partner@company.com",
      "firstName": "John",
      "lastName": "Partner",
      "credit": "1500.00",
      "level": "GOLD",
      "phone": "+1234567890"
    }
  }
}
400Reseller Not Found
{
  "errors": [
    {
      "message": "Reseller with ID 12345 not found",
      "path": ["addResellerCredit"],
      "extensions": {
        "code": "NOT_FOUND"
      }
    }
  ],
  "data": null
}
400Invalid Credit Amount
{
  "errors": [
    {
      "message": "Invalid credit amount format",
      "path": ["addResellerCredit"],
      "extensions": {
        "code": "INVALID_AMOUNT"
      }
    }
  ],
  "data": null
}

Credit Use Cases

Service Provisioning

Credits used to create user subscriptions.

Subscription Renewals

Renew user subscriptions from credit balance.

Feature Purchases

Buy add-ons and extra services.

Bulk Operations

Fund bulk user creation or updates.


Credit Workflow

Payment Received

Verify Payment

Add Credit

Credit Available


Best Practices

Verify Payment

Always confirm payment before adding credit.

Precise Amounts

Use exact amounts with proper decimal precision.

Record Transaction

Keep records of all credit additions.

Notify Reseller

Send confirmation when credit is added.



Additive Operation

This API adds to the existing balance. To view the current balance before adding, use the Get Reseller or Resellers Credits API.

Monitor Reseller Activity

Track how resellers use their credits by viewing their user management activity.

View Reseller Users