Get payment

The Get payment method returns payment details of the current reseller or any of its downstream resellers.

XML
GET {base_url}/api/v3/resellers/{reseller_id}/payments/{payment_id}

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

integer

Required

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


)

payment_id

path

integer

Required

Payment ID

include

query

string

Optional

Returns additional information about objects related to the payment. The parameter can be a comma-separated list if information about several objects is required. The following objects and possible values are supported:

Object

Parameter Value

Invoices

invoices

Orders

orders

Account

account

Payment method

payment_method

Reseller

reseller

Charges

charges

Corrections

corrections

Response model

Name

Data type

Description

data

object

Response data


id

string

Payment ID


type

string

Data type


attributes

object

Information about the payment



created_at

string

Date and time when the payment was created



updated_at

string

Date and time when the payment was updated



account_id

integer

Account ID



discount_amount

string

Discount amount



total

string

Amount to be paid



amount_paid_from_balance

string

Amount paid from the balance



initial_total

string

Original payment amount



currency_code

string

Payment currency code



comment

string

Comment on the payment



status

string

Payment status (for the list of statuses, see


)



document_id

string

Payment number



expiration_date

string

Expiration date of the payment for a postpaid subscription. Returns null if absent



payment_method_id

integer

ID of the payment method that was used for completing the payment (see


). Returns null if absent



requester_ip

string

IP address of the payer. Returns null if absent



manager_id

integer

The ID of the current personal manager of the account. Returns null if absent



purpose

string

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


)



external_total

string

The third-party invoice amount. Only for a payment linked to a postpaid invoice with external management (see

Approve invoice

). Returns null if absent



external_currency

string

The ISO code of the third-party invoice currency. Only for a payment linked to a postpaid invoice with external management (see Approve invoice). Returns null if absent



due_date

string

The latest date for completing the payment for a postpaid subscription (YYYY-MM-DD). Calculated as expiration_date minus 1 day. Returns null if absent



payment_method_name

string

Name of the payment method that was used for completing the payment. Returns null if absent



closed_at

string

Date and time when the payment was completed


relationships

object

Related objects



orders

object

The list of orders to pay




data

array

Related object information:

Name

Data type

Description

id

string

ID of the object

type

string

Data type



invoices

object

The list of invoices




data

array

Related object information:

Name

Data type

Description

id

string

ID of the object

type

string

Data type



charges

object

The list of charges




data

array

Related object information:

Name

Data type

Description

id

string

ID of the object

type

string

Data type



corrections

object

The list of corrections (see Complete payment by document ID)




data

array

Related object information:

Name

Data type

Description

id

string

ID of the object

type

string

Data type



reseller

object

Information about the reseller




data

object

Related object information:

Name

Data type

Description

id

string

ID of the object

type

string

Data type



account

object

Information about the account




data

object

Related object information:

Name

Data type

Description

id

string

ID of the object

type

string

Data type



payment_method

object

Information about the payment method that was used for completing the payment




data

object

Related object information:

Name

Data type

Description

id

string

ID of the object

type

string

Data type

included

array

Additional information about objects listed in the request:

Name

Data type

Description

id

integer

ID of the object

type

string

Data type

attributes

array

Attributes of the object (see details below)

    • For an invoice, see Get invoice.

    • For an account, see Get account.

    • For a reseller, see Get downstream reseller.

    • Fir a charge, see Get charge.

    • For an order:

      Name

      Data type

      Description

      created_at

      string

      Date and time when the order was created

      updated_at

      string

      Date and time when the order was updated

      account_id

      integer

      Account ID

      total

      string

      Total amount of the order

      payment_id

      integer

      ID of the payment method (see


      )

      status

      string

      Order status (for the list of statuses, see


      )

      type

      string

      Order type (for the list of types, see


      )

      expiration_date

      string

      Expiration date of the order (см.


      )

      owner_id

      integer

      ID of the account owner

      promo_code

      string

      Promo code used to apply a discount

      document_id

      string

      Order number

      requester_ip

      string

      IP address of the requester

      manager_id

      integer

      Manager ID

      custom_price

      bool

      Attribute of the individual prices:

      • true .

      • false .

      net_cost

      string

      Subscription net cost

      discount_amount

      string

      Amount of the discount

      payment_model

      string

      Payment model:

      • prepay

      • postpay

      closed_at

      string

      Date and time when the order was completed

    • For a payment method:

      Название

      Тип данных

      Описание

      created_at

      string

      Date and time when the payment method was created

      updated_at

      string

      Date and time when the payment method was updated

      name

      string

      Name of the payment method

      description

      string

      Description of the payment method

      enabled

      bool

      Status of the payment method:

      • true — the payment method is available in the Operator Control Panel and Customer Control Panel.

      • false — the payment method is not available.

      plugin_id

      string

      Name of the payment plugin (see


      )

    • For a correction (see Complete payment by document ID):
      NameData typeDescriptioncreated_atstringDate and time of the correction creationupdated_atstringDate and time of the correction updateaccount_idintegerThe ID of an account for which the correction is appliedstatusstringThe current status of the correction:approval_required — the correction is created but not processed.approved — the correction is approved.declined — the correction is declined.totalstringThe correction amountсommentboolA comment for the correctionperiod_fromstringAlways nullperiod_tostringAlways nullapproved_atstringThe date of the correction approval (YYYY-MM-DD)subscription_idintegerAlways null

Request example

XML
GET /api/v3/resellers/1/payments/9714?include=invoices,orders,account,payment_method,reseller,charges
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json

Response example

JSON
{
    "data": {
        "id": "9714",
        "type": "payments",
        "attributes": {
            "created_at": "2022-03-22T16:37:21.321874+0300",
            "updated_at": "2022-03-22T16:37:30.163316+0300",
            "account_id": 1349,
            "discount_amount": "0.0",
            "total": "715.76",
            "amount_paid_from_balance": null,
            "initial_total": "715.76",
            "currency_code": "USD",
            "comment": "Payment for order 14759",
            "status": "completed",
            "document_id": "2007136",
            "expiration_date": null,
            "payment_method_id": 3,
            "requester_ip": "10.20.30.40",
            "manager_id": null,
            "purpose": "",
            "external_total": null,
            "external_currency": null,
            "due_date": null,
            "payment_method_name": "Bank Transfer",
            "closed_at": "2022-03-22T16:37:30.163316+0300"
        },
        "relationships": {
            "orders": {
                "data": [
                    {
                        "id": "14759",
                        "type": "prolong_orders"
                    }
                ]
            },
            "invoices": {
                "data": []
            },
            "charges": {
                "data": [
                    {
                        "id": "94591",
                        "type": "charges"
                    }
                ]
            },
            "corrections": {
                "data": [
                    {
                        "id": "32",
                        "type": "corrections"
                    },
                    {
                        "id": "34",
                        "type": "corrections"
                    },
                    {
                        "id": "35",
                        "type": "corrections"
                    }
                ]
            },
            "reseller": {
                "data": {
                    "id": "1",
                    "type": "resellers"
                }
            },
            "account": {
                "data": {
                    "id": "1349",
                    "type": "accounts"
                }
            },
            "payment_method": {
                "data": {
                    "id": "3",
                    "type": "payment_methods"
                }
            }
        }
    },
    "included": [
        {
            "id": "14759",
            "type": "prolong_orders",
            "attributes": {
                ...
            }
        },
        {
            "id": "94591",
            "type": "charges",
            "attributes": {
                ...
            },
            "relationships": {
                ...
                }
            }
        },
        {
            "id": "1",
            "type": "resellers",
            "attributes": {
                ...
            }
        },
        {
            "id": "1349",
            "type": "accounts",
            "attributes": {
                ...
            },
            "relationships": {
                ...
            }
        },
        {
            "id": "3",
            "type": "payment_methods",
            "attributes": {
                ...
            }
        }
    ]
}