Getting Started
Last updated
Last updated
Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
Sign up for beta so you can access or generate an API key from the control panel tab within Before attempting to access, ensure you have a paid and activated Chainsite.
To make your first request, send an authenticated request to the escrow endpoint. This will create a escrow
, which is nice.
The endpoint initiates a new escrow with the provided details.
Request
Send an HTTP POST request to {{baseUrl}}/v1/escrow/initiate with the following payload in the raw request body:
title: (string) Title of the escrow
description: (string) Description of the escrow
amount: (number) Amount of the escrow
coin: (string) Type of coin for the escrow
dueDate: (string) Due date for the escrow in the format 'YYYY-MM-DD'
isPrivate: (boolean) Indicates if the escrow is private
isFundingRequest: (boolean) Indicates if the escrow is a funding request
receiverId: (string) ID of the receiver for the escrow
Response
The response contains a status
field to indicate the status of the request, a message
field for any additional information, and a data
object with the following attributes:
coin
: The type of coin involved in the escrow.
address
: The address related to the escrow.
escrowAmount
: The total escrow amount.
coinEscrowAmount
: The escrow amount in the specified coin.
expectedFee
: The expected fee for the escrow.
amountToPay
: The amount to be paid.
usdFee
: The fee amount in USD.
usdAmount
: The amount in USD.
feePercentage
: The percentage of the fee.
rate
: The exchange rate.
chainId
: The chain ID related to the escrow.
contractAddress
: The contract address related to the escrow.
paymentMethods
: An array of available payment methods.
collectionId
: The ID associated with the collection.
{"title":"Third Escrow Test","description":"Testing the escrow flow","amount":10,"coin":"usdc","dueDate":"2030-01-01","isPrivate":false,"isFundingRequest":false,"receiverId":"66fbc91b9e1d33779aec8e80"}
OK