Create payment

The Create payment method is used for creating a payment for topping up the balance of an account of the current reseller or any of its downstream resellers.

XML
POST {base_url}/api/v3/resellers/{reseller_id}/payments
JSON
{
    "data":
    {
        "attributes":
        {
            "account_id": {account_id},
            "total": {amount_of_payment},
            "comment": "{comment}",
            "purpose": "{payment_purpose}"
        }
    }
      
}

Arguments

Name

Parameter Type

Data type

Required/ Optional

Description

X-Api-Token

header

string

Required

API token of a manager that performs the operation (see


)

Content-Type

header

string

Required

Media type of the request. Specify the following: application/vnd.api+json

Accept

header

string

Required

Supported media types of the answer. Specify the following: application/vnd.api+json

base_url

path

string

Required

ActivePlatform URL

reseller_id

path

number

Required

ID of the current reseller or any of its downstream resellers (see 


)

account_id

form

number

Required

ID of the account to top up the balance

total

form

number

Required

Total amount of the payment

comment

form

string

Required

Comment on the payment

purpose

form

string

Optional

The purpose of the top-up payment displayed in the receipt (see 


)

Response model

If no errors are encountered, the method returns information about the created payment (see Get payment without the included parameter) with the 201 Created status.

Request example

XML
POST /api/v3/resellers/1/payments
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
JSON
{
    "data":
    {
        "attributes":
        {
            "account_id": 505,
            "total": 199.99,
            "comment": "top-up payment",
            "purpose": "prepay payment"
        }
    }
      
}

Response example

JSON
{
    "data": {
        "id": "2162",
        "type": "payments",
        "attributes": {
            "created_at": "2025-07-28T10:44:11.723416+0300",
            "updated_at": "2025-07-28T10:44:11.723416+0300",
            "account_id": 463,
            "discount_amount": "0.0",
            "total": "199.99",
            "amount_paid_from_balance": null,
            "initial_total": "199.99",
            "currency_code": "USD",
            "comment": "top-up payment",
            "status": "waiting_for_payment",
            "document_id": "002018",
            "expiration_date": null,
            "payment_method_id": null,
            "requester_ip": null,
            "manager_id": null,
            "purpose": "prepay payment",
            "external_total": null,
            "external_currency": null,
            "due_date": null,
            "payment_method_name": null,
            "closed_at": null
        },
        "relationships": {
            "orders": {
                "data": []
            },
            "invoices": {
                "data": []
            },
            "charges": {
                "data": []
            },
            "corrections": {
                "data": []
            },
            "reseller": {
                "data": {
                    "id": "1",
                    "type": "resellers"
                }
            },
            "account": {
                "data": {
                    "id": "463",
                    "type": "accounts"
                }
            },
            "payment_method": {
                "data": null
            }
        }
    }
}