× #message#
×

Warning

API Manual

Introduction

API

Sub Accounts API allows for the adding of sub accounts programmatically via a HTTP API. Service URL:

  • https://api.forumpay.com/pay/v2/

Authentication

API calls are authenticated using HTTP Basic Access Authentication. You can generate your API key in your API Settings.


Content type

The API returns all results in JSON format. Request parameters are either query parameters (when method is GET) or application/x-www-form-urlencoded body parameters (when method is POST).


Error handling

On error there will be an err element returned in result. Err value will contain the error description.


API reference

API calls are performed by sending a HTTP request to a URL starting with a link, followed by the endpoint URL and request data.

Method Request Response
POST /AddSubAccount/
Parameters: company={company}&fee={fee}&url={url}&kyc_confirmed_by_merchant={kyc_confirmed_by_merchant}&external_id={external_id}
returns {sid}
POST /UpdateSubAccount/
*Only {sid} is required. All other parameters are optional when updating resource.
Parameters: sid={sid}&company={company}&fee={fee}&url={url}&external_id={external_id}
returns {success}
GET /GetSubAccount/
Parameters: sid={sid}
returns {company, master_merchant_user, external_id, fee, url, kyc_confirmed_by_merchant, active, locked, inserted, sid}
GET /GetSubAccounts/ returns [{company, master_merchant_user, external_id, fee, url, kyc_confirmed_by_merchant, active, locked, inserted, sid}, {...}, ...]
Parameter Meaning
company Company name
fee Processing fee charged to Sub Account (informational only)
url URL address
kyc_confirmed_by_merchant Was KYC confirmed by you (Master Merchant). Required and must be confirmed
external_id External ID
Output Meaning
sid ID of created or updated sub account
locked Locked status. If locked, editing is disabled

AddSubAccount

Creates a new Sub Account.

Example:

POST https://api.forumpay.com/pay/v2/AddSubAccount/

Request body:

company=ACME&fee=20&url=https%3A%2F%2Fexample.com&kyc_confirmed_by_merchant=1&external_id=6546

Response:

{
    "sid": "11111111-2222-3333-4444-555555555555"
}

UpdateSubAccount

Updates Sub Account.

Example:

POST https://api.forumpay.com/pay/v2/UpdateSubAccount/

Request body:

sid=11111111-2222-3333-4444-555555555555&company=ACME&external_id=7000

Response:

{
    "updated": true
}

GetSubAccount

Returns details about requested resource.

Example:

https://api.forumpay.com/pay/v2/GetSubAccount/?sid=11111111-2222-3333-4444-555555555555

Response:

{
    "company": "ACME",
    "master_merchant_user" : "11111111-7777-3333-1111-555555555555",
    "external_id": "6546",
    "fee": "20",
    "url": "https://example.com",
    "kyc_confirmed_by_merchant": "1",
    "active": "1",
    "locked": "0",
    "inserted": "2021-12-16 11:25:57",
    "sid": "11111111-2222-3333-4444-555555555555"
}

GetSubAccounts

Returns details about all Master Merchant Sub Accounts.

Example:

https://api.forumpay.com/pay/v2/GetSubAccounts/

Response:

[
    {
        "company": "ACME",
        "master_merchant_user" : "11111111-7777-3333-1111-555555555555",
        "external_id": "6546",
        "fee": "20",
        "url": "https://example.com",
        "kyc_confirmed_by_merchant": "1",
        "active": "1",
        "locked": "0",
        "inserted": "2021-12-16 11:25:57",
        "sid": "11111111-2222-3333-4444-555555555555"
    },...
]

×