Enable Google Pay for a seller
- Sandbox:
POST https://sandbox.payme.io/api/vas-enable - Production:
POST https://live.payme.io/api/vas-enable
Credentials
- Request body field
payme_client_key(required): Your partner key. Keep it on your server. - Request body field
seller_payme_id(required): The seller's PayMe ID (MPL). The seller must belong to your partner.
Enables Google Pay for one of your sellers. Partner-only: authenticate with payme_client_key. A seller can install Google Pay itself from the dashboard app store (חנות אפליקציות). Base URL: https://sandbox.payme.io/api in the sandbox, https://live.payme.io/api in production.
To show Google Pay on your own page, register your domain in the Google Pay & Wallet Console first: see Accept Google Pay.
Errors
| HTTP | status_error_code |
When |
|---|---|---|
| 500 | 720 |
The service was not activated. |
Parameters
This endpoint takes no path, query or header parameters.
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
payme_client_key |
string | yes | Your partner key. Keep it on your server. |
seller_payme_id |
string | yes | The seller's PayMe ID (MPL). The seller must belong to your partner. |
vas_payme_id |
string | yes | Your partner's Google Pay service ID (VASL…). |
language |
string | no | Language of the error messages: he (default) or en. |
Request example
{
"payme_client_key": "payme_partner_key",
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"vas_payme_id": "VASLDEMO-GOOGLEPAY-VASLDEMO-1234567",
"language": "en"
}
Code samples
curl
curl -X POST 'https://sandbox.payme.io/api/vas-enable' \
-H 'Content-Type: application/json' \
--data-raw '{
"payme_client_key": "payme_partner_key",
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"vas_payme_id": "VASLDEMO-GOOGLEPAY-VASLDEMO-1234567",
"language": "en"
}'
Node.js
const response = await fetch("https://sandbox.payme.io/api/vas-enable", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"payme_client_key": "payme_partner_key",
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"vas_payme_id": "VASLDEMO-GOOGLEPAY-VASLDEMO-1234567",
"language": "en"
}),
});
console.log(await response.text());
Python
import requests
response = requests.post(
"https://sandbox.payme.io/api/vas-enable",
json={
"payme_client_key": "payme_partner_key",
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"vas_payme_id": "VASLDEMO-GOOGLEPAY-VASLDEMO-1234567",
"language": "en",
},
)
print(response.text)
PHP
<?php
$body = <<<'BODY'
{
"payme_client_key": "payme_partner_key",
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"vas_payme_id": "VASLDEMO-GOOGLEPAY-VASLDEMO-1234567",
"language": "en"
}
BODY;
$ch = curl_init('https://sandbox.payme.io/api/vas-enable');
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;
Responses
200 — Google Pay is enabled for the seller. (success)
| Field | Type | Description |
|---|---|---|
status_code |
number | 0 on success. |
seller_payme_id |
string | The seller's PayMe ID (MPL). |
vas_payme_id |
string | The vas_payme_id you sent. |
vas_guid |
string | The ID of the seller's own service, created or re-enabled by this call. |
vas_description |
string | The service's description. |
vas_type |
string | The service type, AlternativePaymentMethod. See VAS Types. |
vas_name |
string | The plan name, for creation-plan services only; null here. |
vas_api_key |
string | The service's public API ID, if it has one; otherwise empty. |
vas_is_active |
boolean | true when the service is active for the seller. |
vas_payer_type |
number | Who pays for the service: 1 partner, 2 seller, 3 reseller. |
vas_price_currency |
string | The currency the service is charged in. |
vas_price_setup_fixed |
number | The service's setup price, fixed part. |
vas_price_periodic_fixed |
number | The service's periodic price, fixed part. |
vas_price_periodic_variable |
string | The service's periodic price, variable part. |
vas_price_usage_fixed |
number | The service's price per use, fixed part. |
vas_price_usage_variable |
string | The service's price per use, variable part. |
vas_market_fee |
number | The market fee on the service, if one is set; otherwise null. |
vas_period |
number | How often the service is charged: 1 instant, 2 daily, 3 monthly, 4 yearly. |
vas_data |
object | The service's settings. |
{
"status_code": 0,
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"vas_payme_id": "VASLDEMO-GOOGLEPAY-VASLDEMO-1234567",
"vas_guid": "VASLDEMO-VASLDEMO-VASLDEMO-7654321",
"vas_type": "AlternativePaymentMethod",
"vas_name": null,
"vas_is_active": true,
"vas_payer_type": 2,
"vas_price_currency": "ILS",
"vas_price_setup_fixed": 0,
"vas_price_periodic_fixed": 0,
"vas_price_periodic_variable": "0.00",
"vas_price_usage_fixed": 0,
"vas_price_usage_variable": "0.00",
"vas_market_fee": null,
"vas_period": 1
}
500 — The service was not activated (720). (error)
| Field | Type | Description |
|---|---|---|
status_code |
number | 1 for a failed request. |
status_error_code |
number | PayMe's error code. See Errors. |
status_error_details |
string | The error message, in the request's language. |
status_additional_info |
string | More detail when there is any, for example the field or the site that failed; otherwise null. |
{
"status_code": 1,
"status_error_details": "The service was not activated",
"status_additional_info": null,
"status_error_code": 720
}