Initiate Payment
curl --request POST \
--url https://secureapi.tender.cash/v1/api/payment/initiate \
--header 'Content-Type: <content-type>' \
--header 'x-access-id: <api-key>' \
--data '
{
"amount": "10.00",
"chain": "ethereum",
"coin": "usdc",
"reference": "ORDER-12345",
"meta": {
"customerEmail": "customer@example.com"
}
}
'const options = {
method: 'POST',
headers: {'x-access-id': '<api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
amount: '10.00',
chain: 'ethereum',
coin: 'usdc',
reference: 'ORDER-12345',
meta: {customerEmail: 'customer@example.com'}
})
};
fetch('https://secureapi.tender.cash/v1/api/payment/initiate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://secureapi.tender.cash/v1/api/payment/initiate"
payload = {
"amount": "10.00",
"chain": "ethereum",
"coin": "usdc",
"reference": "ORDER-12345",
"meta": { "customerEmail": "customer@example.com" }
}
headers = {
"x-access-id": "<api-key>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://secureapi.tender.cash/v1/api/payment/initiate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '10.00',
'chain' => 'ethereum',
'coin' => 'usdc',
'reference' => 'ORDER-12345',
'meta' => [
'customerEmail' => 'customer@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-access-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": "<string>",
"message": "<string>",
"data": {
"type": "<string>",
"chain": "<string>",
"chainId": "<string>",
"amount": "<string>",
"agentId": "<string>",
"merchantId": "<string>",
"usdAmount": "<string>",
"coinAmount": "<string>",
"fee": 123,
"feeUSD": 123,
"feeSent": true,
"rate": 123,
"walletAddress": "<string>",
"walletAddressIndex": 123,
"currency": "<string>",
"activationFee": 123,
"activationFeeUSD": 123,
"contractAddress": "<string>",
"agentAmount": "<string>",
"agentRate": "<string>",
"agentCurrency": "<string>",
"txId": "<string>"
}
}Payment
Initiate Payment
Create a new cryptocurrency payment transaction
POST
/
v1
/
api
/
payment
/
initiate
Initiate Payment
curl --request POST \
--url https://secureapi.tender.cash/v1/api/payment/initiate \
--header 'Content-Type: <content-type>' \
--header 'x-access-id: <api-key>' \
--data '
{
"amount": "10.00",
"chain": "ethereum",
"coin": "usdc",
"reference": "ORDER-12345",
"meta": {
"customerEmail": "customer@example.com"
}
}
'const options = {
method: 'POST',
headers: {'x-access-id': '<api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
amount: '10.00',
chain: 'ethereum',
coin: 'usdc',
reference: 'ORDER-12345',
meta: {customerEmail: 'customer@example.com'}
})
};
fetch('https://secureapi.tender.cash/v1/api/payment/initiate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://secureapi.tender.cash/v1/api/payment/initiate"
payload = {
"amount": "10.00",
"chain": "ethereum",
"coin": "usdc",
"reference": "ORDER-12345",
"meta": { "customerEmail": "customer@example.com" }
}
headers = {
"x-access-id": "<api-key>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://secureapi.tender.cash/v1/api/payment/initiate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '10.00',
'chain' => 'ethereum',
'coin' => 'usdc',
'reference' => 'ORDER-12345',
'meta' => [
'customerEmail' => 'customer@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-access-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": "<string>",
"message": "<string>",
"data": {
"type": "<string>",
"chain": "<string>",
"chainId": "<string>",
"amount": "<string>",
"agentId": "<string>",
"merchantId": "<string>",
"usdAmount": "<string>",
"coinAmount": "<string>",
"fee": 123,
"feeUSD": 123,
"feeSent": true,
"rate": 123,
"walletAddress": "<string>",
"walletAddressIndex": 123,
"currency": "<string>",
"activationFee": 123,
"activationFeeUSD": 123,
"contractAddress": "<string>",
"agentAmount": "<string>",
"agentRate": "<string>",
"agentCurrency": "<string>",
"txId": "<string>"
}
}Auth method: Basic (Access ID) — this endpoint only requires your
x-access-id header. No request signing is needed. See
Authentication.Headers
string
required
Your API access ID provided by TenderExample:
"your-access-id-here"string
required
Media type of the request bodyExample:
"application/json"Body
string
required
Payment amount in the specified currencyExample:
"1.023"string
required
Blockchain network to use for the transactionExample:
"avalanche"string
required
Cryptocurrency coin for the paymentExample:
"avalanche"string
Optional reference or transaction ID for your own tracking purposesExample:
"ORDER-12345"object
Optional metadata attached to the payment
Show meta properties
Show meta properties
string
The customer’s email addressExample:
"customer@example.com"Response
string
required
Status of the API requestExample:
"success"string
required
Human-readable message describing the resultExample:
"success"object
required
The initiated payment transaction details (uses formatTransactionResponse structure)
Show data properties
Show data properties
string
Unique MongoDB identifier for the transactionExample:
"66aec7de809b7f45c42a49f9"string
Transaction typeExample:
"receive"string
Blockchain network usedExample:
"avalanche"object
Detailed blockchain network information
Show chainId properties
Show chainId properties
string
Chain MongoDB IDExample:
"64f782bb4278fc475eb30e29"string
Chain display nameExample:
"Avalanche"string
Chain icon URLExample:
"https://example.com/avalanche.png"string
Chain identifierExample:
"avalanche"string
Native coin symbolExample:
"AVAX"string
Chain statusExample:
"active"string
Blockchain explorer URLExample:
"https://snowtrace.io"string
Type of blockchainExample:
"evm"boolean
Whether pre-funded wallets are allowedExample:
falseboolean
Whether this supports multiple chainsExample:
falsestring
RPC endpoint URLExample:
"https://api.avax.network/ext/bc/C/rpc"string
Chain category typeExample:
"blockchain"string
ISO 8601 timestampExample:
"2023-05-29T21:07:27.509Z"string
ISO 8601 timestampExample:
"2023-05-29T21:07:27.509Z"object
Detailed currency information
Show currency properties
Show currency properties
string
Currency MongoDB IDExample:
"64fc4cda43812c15552311d7"string
Currency identifierExample:
"avalanche"string
Currency full nameExample:
"Avalanche"string
Currency icon URLExample:
"https://example.com/avax.png"boolean
Whether this is a smart contract tokenExample:
falsearray
Supported blockchain networksExample:
["avalanche"]string
Currency symbolExample:
"AVAX"string
Price tracking identifierExample:
"avalanche-2"string
Transaction feeExample:
"0.001"string
Currency statusExample:
"active"string
Currency typeExample:
"native"string
ISO 8601 timestampExample:
"2023-05-29T21:07:27.509Z"string
ISO 8601 timestampExample:
"2023-05-29T21:07:27.509Z"string
Destination wallet address for paymentExample:
"0x40b95eddeeac0776ebefc3963bb9ba7d22cbd065"string
Index of the wallet addressExample:
"7"string
Amount in cryptocurrencyExample:
"0.023741"string
Equivalent amount in USDExample:
"1.02"string
Amount in the specified cryptocurrencyExample:
"0.023741"string
Transaction fee in cryptocurrencyExample:
"0.00023741"string
Transaction fee in USDExample:
"0.0102"boolean
Whether the fee has been sentExample:
falsestring
Wallet activation fee if applicableExample:
"0"string
Wallet activation fee in USDExample:
"0"string
Exchange rate used for conversionExample:
"43.09"object
Agent details receiving the payment
Show agentId properties
Show agentId properties
string
Agent MongoDB IDExample:
"6538eaaebdec6d1a21978e6a"string
Agent first nameExample:
"John"string
Agent last nameExample:
"Doe"string
Agent email addressExample:
"john@example.com"string
Agent avatar URLExample:
"https://example.com/avatar.jpg"string
Agent phone numberExample:
"+1234567890"string
Agent locationExample:
"New York, USA"string
Total sales amountExample:
"1500.50"string
Agent countryExample:
"USA"string
Agent addressExample:
"123 Main St"boolean
Whether agent is activeExample:
truestring
Agent unique identifierExample:
"AGT-001"string
Agent wallet balanceExample:
"500.00"string
Associated merchant IDExample:
"6538e8f9bdec6d1a21978a64"object
Merchant details associated with the transaction
Show merchantId properties
Show merchantId properties
string
Merchant MongoDB IDExample:
"6538e8f9bdec6d1a21978a64"string
Merchant first nameExample:
"Jane"string
Merchant last nameExample:
"Smith"string
Merchant email addressExample:
"jane@example.com"string
Merchant avatar URLExample:
"https://example.com/merchant-avatar.jpg"string
Merchant phone numberExample:
"+1234567890"boolean
Whether merchant is activeExample:
truestring
Merchant logo URLExample:
"https://example.com/logo.png"string
Merchant business nameExample:
"Example Store"string
Merchant descriptionExample:
"Online retail store"boolean
Two-factor authentication statusExample:
falseboolean
KYC verification statusExample:
falseboolean
KYC submission statusExample:
falseboolean
Instant conversion enabledExample:
falsestring
Default currencyExample:
"USD"string
Merchant wallet balanceExample:
"1000.00"boolean
Whether merchant is deletedExample:
falseboolean
Whether wallet was regeneratedExample:
falseboolean
Whether funds have been transferredExample:
falsestring
Smart contract address (empty for native tokens)Example:
""string
Current status of the transactionExample:
"pending"boolean
Whether payment is blacklistedExample:
falsestring
Actual amount receivedExample:
"0"string
Amount received in USDExample:
"0"string
Balance still requiredExample:
"0.023741"string
Balance required in USDExample:
"1.02"boolean
Whether this is a partial paymentExample:
falsestring
Amount in agent’s local currencyExample:
"1.023"string
Amount received in agent’s currencyExample:
"0"string
Balance required in agent’s currencyExample:
"1.023"string
Unique transaction identifierExample:
"66aec7de809b7f45c42a49f9"string
ISO 8601 timestamp when the transaction was createdExample:
"2023-05-29T21:07:27.509Z"string
ISO 8601 timestamp when the transaction was last updatedExample:
"2023-05-29T21:07:27.509Z"Authorizations
Basic (Access ID) authentication. Only the x-access-id header is required; no request signing.
Headers
Your API access ID provided by Tender
Media type of the request body
Body
application/json
Payment amount
Example:
"1.023"
Blockchain network
Example:
"avalanche"
Cryptocurrency coin
Example:
"avalanche"
Optional reference or transaction ID for your own tracking purposes
Example:
"ORDER-12345"
Optional metadata attached to the payment
Show child attributes
Show child attributes
⌘I