NFT Management Console
Overview
http://console.paytweed.com - Offers an UI to manage you're collections in the Tweed marketplace eco-system:
- The NFT screen is where you plumb your smart contract to Tweed's backend.
- The Payout screen is where you create a payout account to collect the payments for your platform's collections.
- In addition to the UI, the console gives marketplace developers the abitiliy to add collections programmatically.
Configuring the payout
The 1st step would be to create a payout account, fill in all your business account details, once the account is approved you will be able to collect payments.
Webhook Integration (optional)
Webhook integration is available to streamline the process of sending personalized emails or receipts to your users every time an NFT purchase is made. This feature can be utilized when you choose to handle invoicing on the "Payout" tab in the last step.
Provide a webhook URL
- Click on the "Payout" tab in the left pane of the dev console.
- In the "NFT" tab, locate the webhook integration section.
- Enter the URL where you want to receive the transaction details. This URL should be capable of handling incoming HTTP POST requests.
Generate authentication token
- Click "Save" to save your webhook URL.
- A unique authentication token will be generated for your webhook integration. This token is essential for authenticating your webhook requests and should be kept private.
Handle Incoming Webhook Requests
- Your webhook URL will receive HTTP POST requests with transaction details every time an NFT purchase is made.
- Implement the necessary logic on your server to handle incoming requests. Validate the authenticity of the request using the authentication token provided.
Sample Webhook Payload
nftId: '1'
currency: 'USD'
price: 1000
customerName: 'John Doe'
customerAddress: '123 Main St, New York, NY 10001'
stripePaymentId: 'pi_1J4GZt2eZvKYlo2C2X2X2X2X'
Adding an NFT collection
- Click on the NFT button of the left pane of the dev console
- Click "Add Collection" button, a popup will let you adding the information of your contract
- Type in the collection name, Contract address and choose the blockchain
- Click "Add collection", if the contract has passed the sanity tests your collections will be added
- List you collection using Tweed's SDK function:
sdk.nft.buyWithFiat(...)

The NFT screen

The Add Collection popup
Adding an NFT collection using API
This feature allows you to seamlessly add and manage NFT collections outside of the management console by utilizing our powerful REST API. With this functionality, you can easily integrate NFT collection management into your own applications or systems.
1. Generate API Key and Secret
In the NFT page of the console, click on the "Add Collection via API" button. than click 'Generate API Keys' button.

2. Obtain JWT Access Token
To obtain a JWT access token, send a POST request to the console.paytweed.com/auth/getAccessToken endpoint. Include your API key and API secret in the request body. This will return a JWT access token.
Create a mechanism in your code to generate a new JWT token only when the current token has expired, rather than generating a new token for each API call.
const apiKey = 'your_api_key';
const apiSecret = 'your_api_secret';
const authEndpoint = 'https://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();
3. Include JWT Token in API Requests
For each API call you make to the 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.
const headers = {
Authorization: `Bearer ${access_token}`,
'Content-Type': 'application/json',
};
// Make API requests using the 'headers' object in your requests
Now you are able to make API calls to the console.paytweed.com/collections endpoint to manage your NFT collections.
Add A new NFT Collections
Send a POST request to the console.paytweed.com/collections endpoint, including an array of objects that represent the details of the NFT collection.
The required properties for each object are:
Name | Type | Required | Description |
---|---|---|---|
name | String | ✔️ | The name of the collection |
blockchain | String | ✔️ | The name of the blockchain associated with the collection |
contractAddress | String | ✔️ | The address of the smart contract associated with the collection |
whitelisted | Boolean | ✔️ | A boolean value indicating if the collection is whitelisted |
whitelistingInfo | String | ✔️ | Additional information about the whitelisted status |
Ensure that all these properties are included in your request.
const collections = [
{
name: 'Collection 1',
contractAddress: '0x123456789',
blockchain: 'Ethereum',
whitelisted: false,
whitelistingInfo: '{}'
},
{...another collection}]
Retrieve NFT Collections
To retrieve all the NFT collections in your console, send a GET request to the console.paytweed.com/collections endpoint. The response will contain the information about all the collections available.
Delete an NFT Collection
To delete a specific NFT collection, make a DELETE request to the console.paytweed.com/collections/{collection_Id} endpoint, where {collection_Id} represents the ID of the collection you want to delete.