Payments

Cryptocurrency Payment assigned to an invoice consist of transaction and conversion when base and quote currency are different.

The Payment Object

Name
Type
Description

id

Number

Unique identifier for the object

transaction

The Transaction object related to the payment

conversion

The Conversion object related to the payment

paymentStatus

String

Payment status

paymentType

String

Payment type

blockExplorerLinkAddress

String

Block explorer address url

blockExplorerLinkHash

String

Block explorer hash url

processingFee

Number

Processing fee

conversionFee

Number

Conversion fee

createdAt

Date

Time at which the object was created

Lists all Payments

GET /api/v2/payments

Returns a list of previously created Payments. The Payments are returned in sorted order, with the most recent payment appearing first. You can optionally provide parameters to filter out the results by time created.

Query Parameters

Name
Type
Description

from

Date

Filter by created time. We use basic ISO 8601 format for mixed date-time: YYYY-MM-DDThh:mm:ss

to

Date

Filter by created time. We use basic ISO 8601 format for mixed date-time: YYYY-MM-DDThh:mm:ss

page

Number

Current page

{
    "data": [
        {
            "id": 3458,
            "transaction": {
                "id": 33494,
                "amount": "31.800000000000000000",
                "blockchainFee": "0.003000000000000000",
                "address": "rKjqbdFArEGBLgVeeGsyaK8tJ56fogmPLm",
                "txnHash": "89FBA0C79A6FF8948541702C5B74BD30341BBD174B2F5EB84A4D129FDF37C8B9",
                "tag": "3900980758",
                "status": "Confirmed",
                "createdAt": "2023-01-22T18:24:54.000000Z"
            },
            "conversion": {
                "id": 33455,
                "baseAmount": "31.800000000000000000",
                "baseCurrency": "XRP",
                "quoteAmount": "13.773722812500000000",
                "quoteCurrency": "USDT_TRX",
                "rate": "0.437500000000000000",
                "clientOrderId": "7789",
                "conversionStatus": "Success",
                "createdAt": "2023-01-22 06:24:53"
            },
            "paymentStatus": "Settled",
            "paymentType": "Deposit",
            "blockExplorerLinkAddress": "https://xrpscan.com/account/",
            "blockExplorerLinkHash": "https://xrpscan.com/tx/",
            "processingFee": "0.069214687500000000",
            "conversionFee": "0.000000000000000000",
            "createdAt": "2023-01-22T18:24:54.000000Z"
        }
        ...
        {
            "id": 33485,
            "transaction": {
                "id": 33522,
                "amount": "40.000000000000000000",
                "blockchainFee": "0.003000000000000000",
                "address": "rKjqbdFArEGBLgVeeGsyaK8tJ56fogmPLm",
                "txnHash": "15A9EBCF2F3717D76BD86A4B02BB3D8A998AA9C2FAB2524AB5F43DDE42AD02EC",
                "tag": "3295144284",
                "status": "Confirmed",
                "createdAt": "2023-01-28T15:23:26.000000Z"
            },
            "conversion": {
                "id": 33481,
                "baseAmount": "40.000000000000000000",
                "baseCurrency": "XRP",
                "quoteAmount": "19.729218200000000000",
                "quoteCurrency": "USDT_TRX",
                "rate": "0.498200000000000000",
                "clientOrderId": "8821",
                "conversionStatus": "Success",
                "createdAt": "2023-01-28 03:23:26"
            },
            "paymentStatus": "Settled",
            "paymentType": "Deposit",
            "blockExplorerLinkAddress": "https://xrpscan.com/account/",
            "blockExplorerLinkHash": "https://xrpscan.com/tx/",
            "processingFee": "0.099141800000000000",
            "conversionFee": "0.000000000000000000",
            "createdAt": "2023-01-28T15:23:26.000000Z"
        }
    ],
    "links": {
        "first": "https://api.business.unixpay.com/api/v2/payments?page=1",
        "last": "https://api.business.unixpay.com/api/v2/payments?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://api.business.unixpay.com/api/v2/payments?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "https://api.business.unixpay.com/api/v2/payments",
        "per_page": 20,
        "to": 5,
        "total": 5
    }
}

Get Payment by id

GET /api/v2/payments/{id}

Retrieves the details of a Payment that has previously been created. Supply the id and the API will return the corresponding Payment information.

Path Parameters

Name
Type
Description

id*

Number

Unique identifier for the object

{
    "data": {
        "id": 3458,
        "transaction": {
            "id": 33494,
            "amount": "31.800000000000000000",
            "blockchainFee": "0.003000000000000000",
            "address": "rKjqbdFArEGBLgVeeGsyaK8tJ56fogmPLm",
            "txnHash": "89FBA0C79A6FF8948541702C5B74BD30341BBD174B2F5EB84A4D129FDF37C8B9",
            "tag": "3900980758",
            "status": "Confirmed",
            "createdAt": "2023-01-22T18:24:54.000000Z"
        },
        "conversion": {
            "id": 33455,
            "baseAmount": "31.800000000000000000",
            "baseCurrency": "XRP",
            "quoteAmount": "13.773722812500000000",
            "quoteCurrency": "USDT_TRX",
            "rate": "0.437500000000000000",
            "clientOrderId": "7789",
            "conversionStatus": "Success",
            "createdAt": "2023-01-22 06:24:53"
        },
        "paymentStatus": "Settled",
        "paymentType": "Deposit",
        "blockExplorerLinkAddress": "https://xrpscan.com/account/",
        "blockExplorerLinkHash": "https://xrpscan.com/tx/",
        "processingFee": "0.069214687500000000",
        "conversionFee": "0.000000000000000000",
        "createdAt": "2023-01-22T18:24:54.000000Z"
    }
}

Last updated