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
Header | Description |
---|---|
api-key | Your API key for authentication. |
Content-Type | Must be set to application/json . |
Request Body
The API supports the following parameters:
Parameter | Type | Description | Required |
---|---|---|---|
order_id | string | The unique order ID to retrieve transaction details. | Optional |
custom_id | string | Your custom ID used to track the transaction. | Optional |
hash | string | Your hash used to track the transaction. | Optional |
Note: At least one of
order_id
,custom_id
orhash
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
Field | Type | Description |
---|---|---|
id | string | Order ID. |
custom_id | string | Your custom identifier to track your customers. |
user_id | string | User ID associated with the transaction. |
product_id | string | Product ID of the associated product. |
type | string | Order status (e.g., payment_started , order_complete , order_failed , etc.). |
base | string | Cryptocurrency used for the transaction. |
base_amount | string | Amount of cryptocurrency used. |
quote | string | Fiat currency used for the transaction. |
quote_amount | string | Amount of fiat currency used. |
address | string | Wallet address used for the transaction. |
transaction_id | string | Blockchain transaction ID. |
partner_data | object | Data related to the blueprint address and input. |
full_name | string | Full name of the user. |
date_of_birth | string | Date of birth of the user. |
phone | string | Phone number of the user. |
email | string | Email address of the user. |
state | string | State of the user. |
country | string | Country of the user. |
city | string | City of the user. |
street | string | Street of the user. |
postal_code | string | Postal Code of the user. |
utm_source | string | UTM source for tracking. |
clickID | string | Click ID for tracking. |
campaignID | string | Campaign ID for tracking. |
fail_reason | string | Reason for transaction failure, if applicable. |
redirect_url | string | URL to redirect after successful transaction. |
fail_redirect_url | string | URL to redirect after a failed transaction. |
redirect_page | string | Specifies how the redirect happens (new or self ). |
hash | string | Hash of the transaction. |
Below are the possible error codes and their meanings, sent when a transaction fails:
Error Code | Error Meaning |
---|---|
4000 | We weren't able to charge the user's card, and the order was not completed. The user can try again. |
4001 | The transaction failed due to an incorrect CVV/CVC. The user should re-enter the correct CVV/CVC. |
4002, 4010, 4012 | Payment was declined by the card issuer. The user should contact their card issuer for further details. |
4003 | Incorrect card details were provided. The user should re-enter valid card details. |
4004 | Insufficient balance on the card. The user should add funds and try again. |
4005 | The card limit was exceeded. The user should use a different card to complete the purchase. |
4011 | Card validation failed. The user should provide a valid card. |
4013 | We 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
orcustom_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, usehttps://api.1buy.io
.