Implementation

An overview of the API

This page describes key API methods used to initiate transactions within the new API (Since the auto-generated documentation has several errors). You're welcomed to test everything out yourself.

Get Transactions

GET https://discoin.zws.im/transactions/:id

Retrieves transactions. All retrieved transactions will NOT be automatically marked as "Processed". A PATCH request (described later) will do so. API docs are mostly correct for this and are more detailed.

Path Parameters

Query Parameters

[
  {
    "id": "188986c9-7f50-479b-a447-74ccbb9ab383",
    "amount": 10,
    "user": "210024244766179329",
    "handled": true,
    "timestamp": "2019-12-25T07:21:54.941Z",
    "payout": 1,
    "from": {
      "id": "OAT",
      "name": "Dice Oats"
    },
    "to": {
      "id": "DTS",
      "name": "Discordtel Credits"
    }
  }
]

Create New Transaction

POST https://discoin.zws.im/transactions

Request a transaction.

Headers

Request Body

{
    "id": "b9cd2775-f354-4b6c-9a8b-5ad24b8cc11d",
    "amount": 1000,
    "user": "210024244766179329",
    "handled": false,
    "timestamp": "2019-12-25T18:27:27.773Z",
    "payout": 100.1,
    "from": {
        "id": "DTS",
        "name": "Discordtel Credits"
    },
    "to": {
        "id": "OAT",
        "name": "Dice Oats"
    }
}

Process transactions

PATCH https://discoin.zws.im/transactions/:id

Update a transaction, usually this means marking a transaction as processed.

Path Parameters

Headers

Request Body

{
    "id": "b9cd2775-f354-4b6c-9a8b-5ad24b8cc11d",
    "amount": 1000,
    "user": "210024244766179329",
    "handled": true,
    "timestamp": "2019-12-25T18:27:27.773Z",
    "payout": 100.1,
    "from": {
        "id": "DTS",
        "name": "DTel Credits"
    },
    "to": {
        "id": "OAT",
        "name": "Dice Oats"
    }
}

Last updated