POST https://sandbox.payme.io/api/partner/api/sellers/set-planPOST https://live.payme.io/api/partner/api/sellers/set-planNo credentials are documented for this endpoint.
Assign a billing plan to a seller with payer-based activation flow.
Payer modes:
partner — Plan is activated immediately (no credit card required).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.Note:
callBackUrlis not yet implemented and will be ignored.
This endpoint takes no path, query or header parameters.
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
sellerId |
string | yes | Seller identifier (UUID, MPL ID, email, or socialId) |
planId |
string | yes | Plan identifier to assign |
payer |
string | yes | Who pays for the plan. 'partner' = immediate activation, 'seller' = may require credit card. |
{
"sellerId": "a6a9700f-8571-4f9b-bfae-ba943fb96982",
"planId": "3d653770-6376-40a5-b98e-17c598f1d7d8",
"payer": "partner"
}
curl -X POST 'https://sandbox.payme.io/api/partner/api/sellers/set-plan' \
-H 'Content-Type: application/json' \
--data-raw '{
"sellerId": "a6a9700f-8571-4f9b-bfae-ba943fb96982",
"planId": "3d653770-6376-40a5-b98e-17c598f1d7d8",
"payer": "partner"
}'
const response = await fetch("https://sandbox.payme.io/api/partner/api/sellers/set-plan", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"sellerId": "a6a9700f-8571-4f9b-bfae-ba943fb96982",
"planId": "3d653770-6376-40a5-b98e-17c598f1d7d8",
"payer": "partner"
}),
});
console.log(await response.text());
import requests
response = requests.post(
"https://sandbox.payme.io/api/partner/api/sellers/set-plan",
json={
"sellerId": "a6a9700f-8571-4f9b-bfae-ba943fb96982",
"planId": "3d653770-6376-40a5-b98e-17c598f1d7d8",
"payer": "partner",
},
)
print(response.text)
<?php
$body = <<<'BODY'
{
"sellerId": "a6a9700f-8571-4f9b-bfae-ba943fb96982",
"planId": "3d653770-6376-40a5-b98e-17c598f1d7d8",
"payer": "partner"
}
BODY;
$ch = curl_init('https://sandbox.payme.io/api/partner/api/sellers/set-plan');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
| 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"
}
}
| 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"
}
| Field | Type | Description |
|---|---|---|
error |
string | |
error_description |
string |
{
"error": "unauthorized_client",
"error_description": "Client authentication failed"
}
| Field | Type | Description |
|---|---|---|
statusCode |
integer | HTTP status code |
message |
string | Error message(s) |
error |
string | Error type |
{
"statusCode": 404,
"message": "Seller not found",
"error": "Not Found"
}
| 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"
}