Create a Pay-in Instance
This endpoint allows you to create a new payment instance and receive a URL that can be used to launch the Tylt Prime Open Banking Pay-In widget. Through the widget, the merchant's end customer can make a deposit or payment to the merchant using Open Banking. The payment is settled in USDC into the merchants wallet.
Endpoint
POSThttps://api.tylt.money/v2/prime-fiat/instance/payin
Request Headers
X-TLP-APIKEY
string
93ee3c5e133697251b5362bcf9cc8532476785t8768075616f58d88
Your Tylt API Key, used to identify your account in API requests.
X-TLP-SIGNATURE
string
d0afef3853dfc8489c8b9affa5825171fdd7y7685675e4966a05f66ed2b3eaf9462b3c9c0
HMAC SHA-256 signature generated using the API Secret Key to secure the request.
When using the API, ensure to include your API Key and generate the signature for the request payload using your API Secret. The tables provided above contain example values for illustration purposes only. Please refer to the code snippets for detailed instructions on how to sign the request and generate the signature properly.
Request Body
Field Name
Type
Description
userDetails
JSON Object
Custom fields associated with the user, supplied by the merchant. These fields are included in web-hook notifications and other API responses for easy reference and tracking. An empty object can be sent.
merchantOrderId
string
Mandatory. A UUID used by the merchant to reference this instance or any transaction related to it.
callBackUrl
string
Mandatory. The URL to which payment status updates are sent.
redirectUrl
string
Mandatory. The URL to redirect the user after completing the payment.
amount
number
Mandatory. This is the amount the user wants to deposit in EUR.
currencySymbol
string
Mandatory. Supported Currency is "EUR" only
Code Snippet
const axios = require('axios');
const crypto = require('crypto');
// Replace with your API Key and Secret
const apiKey = 'your-api-key';
const apiSecret = 'your-api-secret';
// Request body
const requestBody = {
userDetails: {},
merchantOrderId: 'b73b73b-87wtbc-q36gbc-331n3',
callBackUrl: 'https://www.test.com/callback',
redirectUrl: 'https://www.test.com/callback',
amount: 10.00,
currencySybmol: 'EUR'
};
// Convert request body to JSON
const raw = JSON.stringify(requestBody);
// Function to create HMAC SHA-256 signature
const createSignature = (secret, data) => {
return crypto.createHmac('sha256', secret)
.update(data)
.digest('hex');
};
// Generate signature
const signature = createSignature(apiSecret, raw);
// Define headers
const headers = {
"X-TLP-APIKEY": apiKey,
"X-TLP-SIGNATURE": signature
};
// Send the request
axios.post('https://api.tylt.money/v2/prime-fiat/instance/payin', raw, { headers })
.then(response => console.log("Success:", response.data))
.catch(error => console.error("Error:", error));
Response
url
String
Checkout URL where the customer is redirected to complete the EUR payment.
instanceId
String
Unique identifier for the payment instance created by Tylt.
userDetails
Object
Merchant-supplied customer/user metadata returned exactly as provided in the request.
fiatAmount
Number
Amount to be paid by the customer in EUR.
fiatSymbol
String
Fiat currency used โ always "EUR" for this integration.
cryptoAmount
Number
Amount of USDC that will be credited upon successful completion of the transaction.
cryptoSymbol
String
Crypto asset used for settlement โ always "USDC".
rate
Number
EUR โ USDC conversion rate applied at the time the quote was generated.
Last updated