Skip to main content

Transaction Detail API

The Transaction Detail API allows you to retrieve detailed information about a specific transaction by providing an order_id, custom_id or a hash.


Endpoint

URL:
For development:
https://api-dev.1buy.io/api/business/transactions/data

For production:
https://api.1buy.io/api/business/transactions/data


HTTP Method

POST


Headers

HeaderDescription
api-keyYour API key for authentication.
Content-TypeMust be set to application/json.

Request Body

The API supports the following parameters:

ParameterTypeDescriptionRequired
order_idstringThe unique order ID to retrieve transaction details.Optional
custom_idstringYour custom ID used to track the transaction.Optional
hashstringYour hash used to track the transaction.Optional

Note: At least one of order_id, custom_id or hash is required.

Example Request Body

{
"order_id": "SPECIFY_ORDER_ID",
"custom_id": "SPECIFY_CUSTOM_ID",
"hash": "SPECIFY_HASH"
}

Example CURL Command

To execute the API request, use the following CURL command:

curl --location "https://api-dev.1buy.io/api/business/transactions/data" \
--header "api-key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"order_id": "SPECIFY_ORDER_ID",
"custom_id": "SPECIFY_CUSTOM_ID"
}'

Replace the placeholders

  • YOUR_API_KEY: Replace with your actual API key.
  • SPECIFY_ORDER_ID: Replace with the order ID of the transaction you wish to query.
  • SPECIFY_CUSTOM_ID: Replace with the custom ID of the transaction you wish to query.

Response

The API returns detailed transaction information.

Example Successful Response

{
"id": "string",
"custom_id": "string",
"user_id": "string",
"product_id": "string",
"type": "string",
"base": "string",
"base_amount": "string",
"quote": "string",
"quote_amount": "string",
"address": "string",
"transaction_id": "string",
"partner_data": "object",
"full_name": "string",
"date_of_birth": "string",
"phone": "string",
"email": "string",
"state": "string",
"country": "string",
"city": "string",
"street": "string",
"postal_code": "string",
"utm_source": "string",
"clickID": "string",
"campaignID": "string",
"fail_reason": "string",
"redirect_url": "string",
"fail_redirect_url": "string",
"redirect_page": "string",
"hash": "string"
}

Response Fields

FieldTypeDescription
idstringOrder ID.
custom_idstringYour custom identifier to track your customers.
user_idstringUser ID associated with the transaction.
product_idstringProduct ID of the associated product.
typestringOrder status (e.g., payment_started, order_complete, order_failed, etc.).
basestringCryptocurrency used for the transaction.
base_amountstringAmount of cryptocurrency used.
quotestringFiat currency used for the transaction.
quote_amountstringAmount of fiat currency used.
addressstringWallet address used for the transaction.
transaction_idstringBlockchain transaction ID.
partner_dataobjectData related to the blueprint address and input.
full_namestringFull name of the user.
date_of_birthstringDate of birth of the user.
phonestringPhone number of the user.
emailstringEmail address of the user.
statestringState of the user.
countrystringCountry of the user.
citystringCity of the user.
streetstringStreet of the user.
postal_codestringPostal Code of the user.
utm_sourcestringUTM source for tracking.
clickIDstringClick ID for tracking.
campaignIDstringCampaign ID for tracking.
fail_reasonstringReason for transaction failure, if applicable.
redirect_urlstringURL to redirect after successful transaction.
fail_redirect_urlstringURL to redirect after a failed transaction.
redirect_pagestringSpecifies how the redirect happens (new or self).
hashstringHash of the transaction.

Below are the possible error codes and their meanings, sent when a transaction fails:

Error CodeError Meaning
4000We weren't able to charge the user's card, and the order was not completed. The user can try again.
4001The transaction failed due to an incorrect CVV/CVC. The user should re-enter the correct CVV/CVC.
4002, 4010, 4012Payment was declined by the card issuer. The user should contact their card issuer for further details.
4003Incorrect card details were provided. The user should re-enter valid card details.
4004Insufficient balance on the card. The user should add funds and try again.
4005The card limit was exceeded. The user should use a different card to complete the purchase.
4011Card validation failed. The user should provide a valid card.
4013We weren't able to charge the user's card, and the order was not completed. The user should contact support for assistance.

Notes

  • At least one parameter (order_id or custom_id) must be provided in the request body.
  • Ensure your API key is correct and has the necessary permissions.
  • For development, use the https://api-dev.1buy.io URL. For production, use https://api.1buy.io.