How to get a transaction data
Getting information about a new deposit
When Calypso receives information from the blockchain about a new deposit from your customer, you will receive webhooks about the processes and statuses associated with this deposit:
CUSTOMER_PURSE_MEMPOOL_FOUND
- The transaction pending in the mempool.
CUSTOMER_PURSE_PENDING_COMLIANCE
- Transaction under compliance check.
CUSTOMER_PURSE_COMLIANCE_DECLINED
- The transaction failed compliance check.
CUSTOMER_PURSE_FUNDS_RECEIVED_FOR_PURSE
- Transaction received successfully.
After receiving the final successful deposit status, you need to send a request with the transaction ID and get the transaction data.
Get Customer Purse Transaction
To get a transaction data from transactionID, use the following endpoint: customer (POST https://api.calypso.finance/api/v1/customer-purse/transaction/get
)
You can find the detailed description of all the parameters in the documentation:
Get Customer Purse Transaction
Here we consider the most important ones.
To get transaction data, you need to pass this parameter in the request:
- account (required) - your product/service account id.
- timestamp (required) - Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future
- payload (required) - Request data for get a deposit address
- transactionId (required)
So to get a transaction data, you just have to send request:
curl --request POST \
--url https://api.calypso.finance/api/v1/customer-purse/transaction/get \
--header 'accept: */*' \
--header 'content-type: application/json' \
--data '
{
"account": "string",
"timestamp": 0,
"payload": {
"transactionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
'
If the transaction successfully received, you receive the response:
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"customerBlocked": "false",
"amount": 100,
"currency": "string",
"transactionHash": "string",
"transactionState": "COMPLETED",
"complianceState": "CHECKED",
"translationToAccountCompleted": true,
"createdDate": "2024-10-16T14:12:20.898Z"
}
Updated 11 days ago