Re-open an existing hosted checkout when a customer closes their browser, loses the original payment link, or retries after the initial response is gone. BotSubscription checks the payment provider's current status first, so a payment that already completed always takes precedence over a stale checkout link—no second payment request is created.
Read status to determine whether a payment request is complete. An amount of "0" alone does not prove completion.
POST /v2/projects/ {project_id} /payment-requests/ {payment_request_id} /resume CopyTry it Authorization Bearer API Key Required
The response includes the payment-operation fields , not just a checkout URL and status. Customer identity and stored timestamps are available through Get Payment Request .
API key scope: payment-requests:add (required for restricted keys).
The request body and query string must both be empty.
Path Parameters The unique identifier of the project.
The unique identifier of the payment request to resume (UUID).
curl -X POST "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/payment-requests/11111111-1111-1111-1111-111111111111/resume" \
-H "Authorization: Bearer YOUR_API_KEY" const project_id = 'YOUR_PROJECT_ID' ;
const payment_request_id = '11111111-1111-1111-1111-111111111111' ;
const response = await fetch ( `https://api.botsubscription.com/v2/projects/${ project_id }/payment-requests/${ payment_request_id }/resume` , {
method: 'POST' ,
headers: {
'Authorization' : 'Bearer YOUR_API_KEY'
}
});
const data = await response. json (); import requests
project_id = 'YOUR_PROJECT_ID'
payment_request_id = '11111111-1111-1111-1111-111111111111'
response = requests.post(
f 'https://api.botsubscription.com/v2/projects/ { project_id } /payment-requests/ { payment_request_id } /resume' ,
headers = { 'Authorization' : 'Bearer YOUR_API_KEY' }
)
data = response.json() $project_id = 'YOUR_PROJECT_ID' ;
$payment_request_id = '11111111-1111-1111-1111-111111111111' ;
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://api.botsubscription.com/v2/projects/{ $project_id }/payment-requests/{ $payment_request_id }/resume" );
curl_setopt ($ch, CURLOPT_POST , true );
curl_setopt ($ch, CURLOPT_HTTPHEADER , [ 'Authorization: Bearer YOUR_API_KEY' ]);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
$response = curl_exec ($ch); Checkout resumed application/json
{
"ok" : true ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "POST" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/payment-requests/11111111-1111-1111-1111-111111111111/resume" ,
"code" : 200 ,
"data" : {
"payment_request_id" : "11111111-1111-1111-1111-111111111111" ,
"request_type" : "invoice" ,
"amount" : "1" ,
"currency" : "USD" ,
"status" : "pending" ,
"provider_payment_id" : "cs_test_example" ,
"merchant_account_id" : "22222222-2222-4222-8222-222222222222" ,
"failure_reason" : null ,
"payment_error_code" : null ,
"payment_url" : "https://checkout.stripe.com/c/pay/cs_test_example" ,
"provider" : "stripe" ,
"payment_request_data" : {},
"reused" : true
}
} Already settled — terminal state returned instead application/json
{
"ok" : true ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "POST" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/payment-requests/11111111-1111-1111-1111-111111111111/resume" ,
"code" : 200 ,
"data" : {
"payment_request_id" : "11111111-1111-1111-1111-111111111111" ,
"request_type" : "invoice" ,
"amount" : "1" ,
"currency" : "USD" ,
"status" : "completed" ,
"provider_payment_id" : "cs_test_example" ,
"merchant_account_id" : "22222222-2222-4222-8222-222222222222" ,
"failure_reason" : null ,
"payment_error_code" : null ,
"provider" : "stripe" ,
"payment_request_data" : {},
"reused" : false
}
} Payment request not found application/json
{
"ok" : false ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "POST" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/payment-requests/11111111-1111-1111-1111-111111111111/resume" ,
"code" : 404 ,
"error" : {
"error_code" : "NOT_FOUND" ,
"message" : "Payment request not found"
}
} Invalid or expired API key application/json
{
"ok" : false ,
"request_id" : "44444444-4444-4444-8444-444444444444" ,
"method" : "POST" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/payment-requests/22222222-2222-4222-8222-222222222222/resume" ,
"code" : 401 ,
"error" : {
"message" : "Invalid or expired authentication token." ,
"error_code" : "UNAUTHORIZED"
}
} reused: true means the returned payment_url points to the same checkout session—render it, don't start a new flow. When the provider reports the request as already paid or expired, the response instead reflects that terminal status rather than a stale URL.