Set seller billing plan
- Sandbox: your partner domain on the Keep sandbox:
POST https://<partner_domain>.keep.co.il/api/public/plans/activate - Production: your partner domain:
POST https://<partner_domain>.keep.co.il/api/public/plans/activate
Credentials
- Header
Authorization: Bearer <token>
Assign a billing plan to a seller with payer-based activation flow.
Payer modes:
partner— No credit card is required. The plan is normally activated at once. It is scheduled instead of activated when the seller is on a free plan within the trial or the sign-up month, and when a no-cost plan is chosen on days 20–31 of a month; the response is stillactivated, and the plan takes effect at the scheduled date.seller— If the seller already has a credit card on file, the plan is activated immediately. If not, a credit card URL is returned and the plan activates once the seller completes payment.
Pending response (payer is seller and no card is on file):
{
"payload": {
"status": "pending",
"message": "Please complete payment to activate plan",
"creditCardUrl": "<payment_url>"
}
}
Parameters
This endpoint takes no path, query or header parameters.
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
sellerId |
string | yes | Seller UUID |
planId |
string | yes | Plan UUID, from Get available plans |
payer |
string | yes | Who pays for the plan. 'partner' = immediate activation, 'seller' = may require credit card. Allowed values: partner, seller. |
Request example
{
"sellerId": "a6a9700f-8571-4f9b-bfae-ba943fb96982",
"planId": "3d653770-6376-40a5-b98e-17c598f1d7d8",
"payer": "partner"
}
Code samples
curl
curl -X POST 'https://<partner_domain>.keep.co.il/api/public/plans/activate' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN>' \
--data-raw '{
"sellerId": "a6a9700f-8571-4f9b-bfae-ba943fb96982",
"planId": "3d653770-6376-40a5-b98e-17c598f1d7d8",
"payer": "partner"
}'
Node.js
const response = await fetch("https://<partner_domain>.keep.co.il/api/public/plans/activate", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <YOUR_TOKEN>",
},
body: JSON.stringify({
"sellerId": "a6a9700f-8571-4f9b-bfae-ba943fb96982",
"planId": "3d653770-6376-40a5-b98e-17c598f1d7d8",
"payer": "partner"
}),
});
console.log(await response.text());
Python
import requests
response = requests.post(
"https://<partner_domain>.keep.co.il/api/public/plans/activate",
headers={
"Authorization": "Bearer <YOUR_TOKEN>",
},
json={
"sellerId": "a6a9700f-8571-4f9b-bfae-ba943fb96982",
"planId": "3d653770-6376-40a5-b98e-17c598f1d7d8",
"payer": "partner",
},
)
print(response.text)
PHP
<?php
$body = <<<'BODY'
{
"sellerId": "a6a9700f-8571-4f9b-bfae-ba943fb96982",
"planId": "3d653770-6376-40a5-b98e-17c598f1d7d8",
"payer": "partner"
}
BODY;
$ch = curl_init('https://<partner_domain>.keep.co.il/api/public/plans/activate');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer <YOUR_TOKEN>',
],
CURLOPT_POSTFIELDS => $body,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Responses
201 — Plan set successfully (success)
| Field | Type | Description |
|---|---|---|
payload |
object | |
payload.status |
string | 'activated' when plan is active immediately, 'pending' when seller must complete payment first. |
payload.message |
string | Human-readable message (present when status is 'pending') |
payload.creditCardUrl |
string | URL for seller to submit credit card details (present when status is 'pending') |
{
"payload": {
"status": "activated"
}
}
400 — Bad Request. Returned for validation errors, and with the message Bad seller identifier when the seller is unknown. (error)
| Field | Type | Description |
|---|---|---|
statusCode |
integer | HTTP status code |
message |
string | Error message(s) |
error |
string | Error type |
{
"statusCode": 400,
"message": [
"Validation failed"
],
"error": "Bad Request"
}
401 — Unauthorized (error)
| Field | Type | Description |
|---|---|---|
statusCode |
integer | |
message |
string |
{
"statusCode": 401,
"message": "Unauthorized"
}
403 — The seller does not belong to your partner account (error)
422 — Unprocessable Entity (error)
| Field | Type | Description |
|---|---|---|
statusCode |
integer | HTTP status code |
message |
string | Error message(s) |
error |
string | Error type |
{
"statusCode": 422,
"message": "Bad seller configuration. Please contact support!",
"error": "Unprocessable Entity"
}