POST https://sandbox.payme.io/api/vas-links/{vasGuid}/chargePOST https://live.payme.io/api/vas-links/{vasGuid}/chargeNo credentials are documented for this endpoint.
This enpoint allows our users to create a new VAS based on the usage fixed value only.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
PayMe-Partner-Key |
header | string | yes | The partner's secret key. |
PayMe-Merchant-Key |
header | string | no | The MPL of the seller. |
vasGuid |
path | string | yes |
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
charge_now |
boolean | no | Charge now = true means immediate charge to the card, if successful charges and credits are created, if failed charge is rollbacked immediately. Charge now = false means the charge will be created immediately but we won't try to charge the card. |
{
"charge_now": true
}
curl -X POST 'https://sandbox.payme.io/api/vas-links/<vasGuid>/charge' \
-H 'Content-Type: application/json' \
-H 'PayMe-Partner-Key: <PayMe-Partner-Key>' \
--data-raw '{
"charge_now": true
}'
const response = await fetch("https://sandbox.payme.io/api/vas-links/<vasGuid>/charge", {
method: "POST",
headers: {
"Content-Type": "application/json",
"PayMe-Partner-Key": "<PayMe-Partner-Key>",
},
body: JSON.stringify({
"charge_now": true
}),
});
console.log(await response.text());
import requests
response = requests.post(
"https://sandbox.payme.io/api/vas-links/<vasGuid>/charge",
headers={
"PayMe-Partner-Key": "<PayMe-Partner-Key>",
},
json={
"charge_now": True,
},
)
print(response.text)
<?php
$body = <<<'BODY'
{
"charge_now": true
}
BODY;
$ch = curl_init('https://sandbox.payme.io/api/vas-links/<vasGuid>/charge');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'PayMe-Partner-Key: <PayMe-Partner-Key>',
],
CURLOPT_POSTFIELDS => $body,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
| Field | Type | Description |
|---|---|---|
status_code |
integer | |
items |
object | |
items.charges |
object | |
items.charges.Payer |
array | |
items.charges.Payer[].charge_description |
string | |
items.charges.Payer[].charge_amount |
number | |
items.charges.Payer[].charge_currency |
string | |
items.charges.Payer[].charge_release_date |
string | |
items.charges.System |
array | |
items.charges.System[].charge_description |
string | |
items.charges.System[].charge_amount |
number | |
items.charges.System[].charge_currency |
string | |
items.charges.System[].charge_release_date |
string |
{
"status_code": 0,
"items": {
"charges": {
"Payer": [
{
"charge_description": "Keep שירותי הנהלת חשבונות",
"charge_amount": 58.5,
"charge_currency": "ILS",
"charge_release_date": "2023-06-29 11:37:35"
}
],
"System": [
{
"charge_description": "Keep שירותי הנהלת חשבונות",
"charge_amount": -58.5,
"charge_currency": "ILS",
"charge_release_date": "2023-06-29 11:37:35"
}
]
}
}
}