api.botsubscription.com
GET /v1/endpoint
Authentication Bearer
Token
Stays in this tab. Required for this endpoint — the value below is what gets sent.
Request GET Response —
cURL Node Python PHP Go Ruby
Copy curl --request GET \
--url https://api.botsubscription.com/v1/endpoint \
--header 'Authorization: Bearer sk_live_•••'— — · — · —
Response will appear here.
Connect a payment provider to your subscription bot. BotSubscription supports Stripe, PayPal, and NOWPayments (crypto). Provide your API credentials and specify the environment (sandbox for testing or production for live payments) to enable payment processing.
POST /v2/projects/ {project_id} /merchant-accounts CopyTry it Authorization Bearer Token Required
Path Parameters The unique identifier of the project.
Request Body Payment provider identifier: stripe, paypal, or nowpayments.
Environment: sandbox or production.
Optional label to identify this merchant account.
Provider-Specific Parameters For Stripe :
For PayPal :
Your PayPal client secret.
For NOWPayments :
Your NOWPayments API key.
Your NOWPayments IPN secret.
curl -X POST "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/merchant-accounts" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"provider": "stripe",
"stripe_secret_key": "sk_live_...",
"environment": "production"
}' const project_id = 'YOUR_PROJECT_ID' ;
const response = await fetch ( `https://api.botsubscription.com/v2/projects/${ project_id }/merchant-accounts` , {
method: 'POST' ,
headers: {
'Authorization' : 'Bearer YOUR_TOKEN' ,
'Content-Type' : 'application/json'
},
body: JSON . stringify ({
provider: 'stripe' ,
stripe_secret_key: 'sk_live_...' ,
environment: 'production'
})
});
const data = await response. json (); import requests
project_id = 'YOUR_PROJECT_ID'
response = requests.post(
f 'https://api.botsubscription.com/v2/projects/ { project_id } /merchant-accounts' ,
headers = {
'Authorization' : 'Bearer YOUR_TOKEN' ,
'Content-Type' : 'application/json'
},
json = {
'provider' : 'stripe' ,
'stripe_secret_key' : 'sk_live_...' ,
'environment' : 'production'
}
)
data = response.json() $project_id = 'YOUR_PROJECT_ID' ;
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://api.botsubscription.com/v2/projects/{ $project_id }/merchant-accounts" );
curl_setopt ($ch, CURLOPT_POST , true );
curl_setopt ($ch, CURLOPT_HTTPHEADER , [
'Authorization: Bearer YOUR_TOKEN' ,
'Content-Type: application/json'
]);
curl_setopt ($ch, CURLOPT_POSTFIELDS , json_encode ([
'provider' => 'stripe' ,
'stripe_secret_key' => 'sk_live_...' ,
'environment' => 'production'
]));
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
$response = curl_exec ($ch); Merchant account installed application/json
{
"ok" : true ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "POST" ,
"path" : "/v2/projects/YOUR_PROJECT_ID/merchant-accounts" ,
"code" : 201 ,
"message" : "Merchant account installed successfully" ,
"data" : {
"merchant_account_id" : "11111111-1111-1111-1111-111111111111" ,
"provider" : "stripe" ,
"environment" : "production" ,
"active" : true ,
"has_requirements" : false ,
"configuration_editable" : false ,
"label" : null
}
} Invalid credentials application/json
{
"ok" : false ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "POST" ,
"path" : "/v2/projects/YOUR_PROJECT_ID/merchant-accounts" ,
"code" : 400 ,
"error" : {
"error_code" : "BAD_REQUEST" ,
"message" : "Invalid Stripe credentials"
}
} Validation error application/json
{
"ok" : false ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "POST" ,
"path" : "/v2/projects/YOUR_PROJECT_ID/merchant-accounts" ,
"code" : 422 ,
"errors" : [
{
"message" : "Invalid environment: must be one of: sandbox, production" ,
"error_code" : "VALIDATION_ERROR"
}
]
} Duplicate credentials application/json
{
"ok" : false ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "POST" ,
"path" : "/v2/projects/YOUR_PROJECT_ID/merchant-accounts" ,
"code" : 422 ,
"error" : {
"error_code" : "VALIDATION_ERROR" ,
"message" : "A merchant account with identical credentials already exists in this project"
}
} Last updated: May 28, 2026
PreviousGet Provider Details Next Enable/Disable Provider