API (V1)

Utilize this robust API to effectively manage tokens for sale within your application.

Payments

circle-check

Leverage this API to seamlessly enable token sales with our token checkout. To access the API, simply attach a bearer token to each request. Generate this token using the management API keys provided during onboarding.

  1. Obtain JWT Access Token To obtain a JWT access token, send a POST request to the https://api-console.paytweed.com/auth/getAccessToken endpoint. Include your API key and API secret in the request body. This will return a JWT access token.

triangle-exclamation
const apiKey = 'your_api_key';
const apiSecret = 'your_api_secret';

const authEndpoint = 'https://api-console.paytweed.com/auth/getAccessToken';

const payload = {
  apiKey,
  apiSecret,
};

const response = await fetch(authEndpoint, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(payload),
});

const jwt = await response.json();
  1. For each API call you make to the https://api-console.paytweed.com/collections endpoint, include the JWT token in the header of your request. This ensures that the server can authenticate and authorize your requests properly.

Tokens and Collections

Add

Send a POST request to the https://api-console.paytweed.com/collections endpoint, including an array of objects that represent the details of the NFT collection or In-Platform Token.

The required properties for each object are:

chevron-rightname Required hashtag

Type: String

Description: The name of the NFT Collection or In-Platform Token

Best practice: Try to keep names short so the full name will appear in every modal

chevron-rightblockchain Required hashtag

Type: String

Description: The name of the blockchain associated with the NFT Collection or In-Platform Token

See all the supported blockchains in Supported Blockchains.

chevron-rightcontractAddress Required hashtag

Type: String

Description: The address of the smart contract associated with the NFT Collection or In-Platform Token

chevron-rightwhitelisted Required hashtag

Type: String

Description: A boolean value indicating if the NFT Collection or In-Platform Token is whitelisted

chevron-rightwhitelistingInfo Required hashtag

Type: JSON object

Description: to pass your whitelist information to my endpoint, format it as follows

Example: { "list": { "wallets": [ "0x48...0412" ] }, "emails": [ "[email protected]" ] }

Retrieve

To retrieve all the NFT Collections or In-Platform Tokens in your console, send a GET request to the https://api-console.paytweed.com/collections endpoint.

The response will contain the information about all of the NFT Collections or In-Platform Tokens available.

Delete

To delete a specific NFT Collection or In-Platform Token, make a DELETE request to the https://api-console.paytweed.com/collection/{token_Id} endpoint, where {token_Id} represents the ID of the NFT Collection you want to delete.

Last updated