Checkouts

The BTPay Checkout page provides your customers with different cryptocurrency payment options. Start accepting crypto payments with a hosted or embedded checkout page.

Once you’ve created a checkout, then you can either share the hosted link or embed the checkout directly on your website. It will also determine the amount required in customer selected cryptocurrency.

Once paid, the payment is captured, the cryptocurrency will then be converted and credited into the balance of the merchant account and can be withdrawn anytime.

The Checkout Object

Name
Type
Description

id

Number

Unique identifier for the object

uuid

UUID

A UUID (Universal Unique Identifier) is a 128-bit value used to uniquely identify an object or entity

currency

String

The Checkout default currency: alphabetic currency code

trackingId

String

Client-provided identifier of the payment in the external system

walletId

Number

Wallet id to accept payment in

logoUrl

String

Client-provided logo url for the checkout page

expectedQuoteAmount

String

Expected quote currency amount to be paid

includedCurrencyIds

Array

Array of currencies available for the current checkout page

ExcludedCurrencyIds

Array

Array of currencies to exclude from the checkout page

createdAt

Date

Time at which the object was created

checkoutUrl

String

A checkout URL to use it as iframe or separated page to deposit crypto

Create a Checkout

POST /api/v2/checkouts/create

Creates new checkout page

Headers

Name
Type
Description

Accept*

application/json

Request Body

Name
Type
Description

currency*

String

Default Checkout currency

trackingId*

String

Client-provided identifier of the payment in the external system

expectedQuoteAmount

String

Expected amount denominated in USD

webhookUrl*

String

Notification URL

includedCurrencies

Array

Array of currencies to include

excludedCurrencies

Array

Array of currencies to exclude

{
    "data": {
        "id": 3444,
        "uuid": "6939c3d6-514a-4b12-88b1-f4dda0947538",
        "currency": "BTC",
        "trackingId": "ACM-253-798",
        "walletId": 2127,
        "logoUrl": "https://yourdomain.com/logo.png",
        "expectedBaseAmount": null,
        "expectedQuoteAmount": "200",
        "includedCurrencyIds": "null",
        "excludedCurrencyIds": "null",
        "createdAt": "2023-04-05T15:34:24.000000Z",
        "checkoutUrl": "https://pay.unixpay.com/checkout/6939c3d6-514a-4b12-88b1-f4dda0947538"
    }
}

Update Checkout

PUT /api/v2/checkouts/update/{uuid}

Updates existing checkout

Headers

Name
Type
Description

Accept*

applicaiton/json

Request Body

Name
Type
Description

currency*

String

Default Checkout currency

walletId*

Number

Wallet id to receive funds in

expectedQuoteAmount

String

Expected amount denominated in USD

webhookUrl

String

Notification URL

{
    "data": {
        "id": 3444,
        "uuid": "6939c3d6-514a-4b12-88b1-f4dda0947538",
        "currency": "ETH",
        "trackingId": "ACM-253-798",
        "walletId": 2127,
        "logoUrl": "https://yourdomain.com/logo.png",
        "expectedBaseAmount": null,
        "expectedQuoteAmount": "200",
        "includedCurrencyIds": "null",
        "excludedCurrencyIds": "null",
        "createdAt": "2023-04-05T15:34:24.000000Z",
        "checkoutUrl": "https://pay.unixpay.com/checkout/6939c3d6-514a-4b12-88b1-f4dda0947538"
    }
}

Lists all Checkouts

GET /api/v2/checkouts

Returns a list of previously created Checkouts. The Checkouts are returned in sorted order, with the most recent checkout 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": 3444,
	        "uuid": "6939c3d6-514a-4b12-88b1-f4dda0947538",
	        "currency": "ETH",
	        "trackingId": "ACM-253-798",
	        "walletId": 2127,
	        "logoUrl": "https://yourdomain.com/logo.png",
	        "expectedBaseAmount": null,
	        "expectedQuoteAmount": "200",
	        "includedCurrencyIds": "null",
	        "excludedCurrencyIds": "null",
	        "createdAt": "2023-04-05T15:34:24.000000Z",
	        "checkoutUrl": "https://pay.unixpay.com/checkout/6939c3d6-514a-4b12-88b1-f4dda0947538"
        },
        ...
        {
	        "id": 3448,
	        "uuid": "886ff545-52b8-4beb-96e4-34955415512b",
	        "currency": "XRP",
	        "trackingId": "ACM-253-749",
	        "walletId": 2127,
	        "logoUrl": "https://yourdomain.com/logo.png",
	        "expectedBaseAmount": null,
	        "expectedQuoteAmount": "200",
	        "includedCurrencyIds": "null",
	        "excludedCurrencyIds": "null",
	        "createdAt": "2023-04-05T19:34:24.000000Z",
	        "checkoutUrl": "https://pay.unixpay.com/checkout/886ff545-52b8-4beb-96e4-34955415512b"
        }
    ],
    "links": {
        "first": "/api/v2/checkouts?page=1",
        "last": "/api/v2/checkouts?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "/api/v2/checkouts?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "/api/v2/checkouts",
        "per_page": 20,
        "to": 11,
        "total": 11
    }
}

Get Checkout by Uuid

GET /api/v2/checkouts/{uuid}

Retrieves the details of a Checkout that has previously been created. Supply the universally unique identifier that was returned from your previous request, and the API will return the corresponding checkout information.

Path Parameters

Name
Type
Description

uuid*

String

Universally unique identifier, which is a 128 bit value and used to identify the records

{
    "data": {
        "id": 3444,
        "uuid": "6939c3d6-514a-4b12-88b1-f4dda0947538",
        "currency": "ETH",
        "trackingId": "ACM-253-798",
        "walletId": 2127,
        "logoUrl": "https://yourdomain.com/logo.png",
        "expectedBaseAmount": null,
        "expectedQuoteAmount": "200",
        "includedCurrencyIds": "null",
        "excludedCurrencyIds": "null",
        "createdAt": "2023-04-05T15:34:24.000000Z",
        "checkoutUrl": "https://pay.unixpay.com/checkout/6939c3d6-514a-4b12-88b1-f4dda0947538"
    }
}

Last updated