LogoLogo
  • Home
  • Overview
  • Getting Started
  • Prompt Guide
  • API Reference
    • Authentication
      • Web3
      • Google OAuth
    • Account
    • Escrow
    • File upload
    • Wallet
Powered by GitBook
On this page
Export as PDF

Getting Started

PreviousOverviewNextPrompt Guide

Last updated 2 hours ago

Get your API keys

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 deploy and activate a Chainsite, follow this guide on

Make your first request

To make your first request, send an authenticated request to the escrow endpoint. This will create a escrow, which is nice.

Pakt Command Center (PCC).
Deploy a Chainsite
  • Get your API keys
  • Make your first request
  • POSTCreate Escrow

Create Escrow

post

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.

Authorizations
Body
objectOptionalExample: {"title":"Third Escrow Test","description":"Testing the escrow flow","amount":10,"coin":"usdc","dueDate":"2030-01-01","isPrivate":false,"isFundingRequest":false,"receiverId":"66fbc91b9e1d33779aec8e80"}
Responses
200
OK
text/plain
Responsestring
post
POST /v1/escrow/initiate HTTP/1.1
Host: {{baseurl}}
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 201

{
  "title": "Third Escrow Test",
  "description": "Testing the escrow flow",
  "amount": 10,
  "coin": "usdc",
  "dueDate": "2030-01-01",
  "isPrivate": false,
  "isFundingRequest": false,
  "receiverId": "66fbc91b9e1d33779aec8e80"
}
200

OK

{
    "status": "success",
    "message": "OK",
    "data": {
        "coin": "usdc",
        "address": "0x2722c4e54b2082f83fd0ff479c15ccafcb8a0ce7",
        "escrowAmount": 100,
        "coinEscrowAmount": 100,
        "expectedFee": 1.01,
        "amountToPay": 101.01,
        "usdFee": 1.01,
        "usdAmount": 99.99,
        "feePercentage": 1,
        "rate": 0.999946,
        "chainId": "43113",
        "contractAddress": "0x5425890298aed601595a70AB815c96711a31Bc65",
        "paymentMethods": [
            "crypto",
            "stripe"
        ],
        "collectionId":"67fc1d39e35e13aedadd0717"
    }
}