linkToken
request to the Mesh API. This will generate a URL that you can then provide to your customer.
POST
https://integration-api.meshconnect.com/api/v1/linkToken
X-Client-Id
: Your Mesh Client ID. This identifies your application to the Mesh API.X-Client-Secret
: Your Mesh Client Secret. This is a secret key used to authenticate your requests to the Mesh API.
Include these headers in your request to authorize it.userId
: A unique identifier for the user making the payment or transfer. This should be a value that identifies the user in your system.transferOptions
: This object contains the details of the transaction:
toAddresses
: An array of one or more recipient addresses. For each recipient, provide:
symbol
: The symbol of the asset being transferred (e.g., “ETH”, “BTC”).networkId
: The ID of the blockchain network being used for the transfer.address
: The blockchain address of the recipient.isInclusiveFeeEnabled
: A boolean value that specifies whether the transaction fee is included in the transfer amount. Set to true
if the amount your user enters includes the fee, false
otherwise.transferType
: The type of transfer. Use “deposit” if the user is sending funds to your platform, “payment” if the user is paying for something.transactionId
: A unique identifier for this transaction in your system. This allows you to track the transaction and reconcile it later.fundingOptions
: An object indicating if SmartFunding is enabledgeneratePayLink
: Set this value to true
. This tells the Mesh API to generate a Paylink URL in the response. This is required to ensure Paylinks works.transactionId
in your request body when generatePayLink
is set to true
. If it is not provided, the API will return an error. The transactionId
should be a unique string generated by your system for each transaction. This ID is used to correlate the Paylink transaction with your internal records. For example, you could use an order ID, a payment ID, or a unique hash. This value should be unique and persistent so you can reliably look up the transaction in your database.
Example Request (JSON):
USER_IDENTIFIER_123
, NETWORK_ID_GOES_HERE
) with actual data
linkToken
request, the API will respond with a JSON object. If the request was successful, the response will contain a paymentLink
field.
Example Response (JSON):
paymentLink
value is the URL that you will provide to your customer.
paymentLink
field. This can be done in several ways, depending on your application (e.g., using a redirect in your web server code, or providing the link in an email or message).
Once the user clicks the link, they will be taken to a Mesh-hosted page where they can complete the payment or transfer.