Process tax return charge

Credentials

No credentials are documented for this endpoint.

Process a tax return/refund charge for a seller.

Parameters

This endpoint takes no path, query or header parameters.

Request body

Content type: application/json

Field Type Required Description
vasLink string yes VAS (Value Added Service) link
entityId integer yes Entity ID
entityType string yes Entity type (must be TaxRefund)
amounts object yes
amounts.payer object yes
amounts.payer.amount number yes
amounts.payer.type string yes
releaseDate string yes
invoiceReleaseDate string yes
description string no

Request example

{
  "vasLink": "https://vas.taxes.gov.il/link/abc123",
  "entityId": 12345,
  "entityType": "TaxRefund",
  "amounts": {
    "payer": {
      "amount": 5000,
      "type": "debit"
    }
  },
  "releaseDate": "2024-02-15",
  "invoiceReleaseDate": "2024-02-15",
  "description": "Tax refund for 2023"
}

Code samples

curl

curl -X POST 'https://sandbox.payme.io/api/partner/api/sellers/tax-return' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "vasLink": "https://vas.taxes.gov.il/link/abc123",
  "entityId": 12345,
  "entityType": "TaxRefund",
  "amounts": {
    "payer": {
      "amount": 5000,
      "type": "debit"
    }
  },
  "releaseDate": "2024-02-15",
  "invoiceReleaseDate": "2024-02-15",
  "description": "Tax refund for 2023"
}'

Node.js

const response = await fetch("https://sandbox.payme.io/api/partner/api/sellers/tax-return", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "vasLink": "https://vas.taxes.gov.il/link/abc123",
    "entityId": 12345,
    "entityType": "TaxRefund",
    "amounts": {
      "payer": {
        "amount": 5000,
        "type": "debit"
      }
    },
    "releaseDate": "2024-02-15",
    "invoiceReleaseDate": "2024-02-15",
    "description": "Tax refund for 2023"
  }),
});

console.log(await response.text());

Python

import requests

response = requests.post(
    "https://sandbox.payme.io/api/partner/api/sellers/tax-return",
    json={
        "vasLink": "https://vas.taxes.gov.il/link/abc123",
        "entityId": 12345,
        "entityType": "TaxRefund",
        "amounts": {
            "payer": {
                "amount": 5000,
                "type": "debit",
            },
        },
        "releaseDate": "2024-02-15",
        "invoiceReleaseDate": "2024-02-15",
        "description": "Tax refund for 2023",
    },
)

print(response.text)

PHP

<?php

$body = <<<'BODY'
{
  "vasLink": "https://vas.taxes.gov.il/link/abc123",
  "entityId": 12345,
  "entityType": "TaxRefund",
  "amounts": {
    "payer": {
      "amount": 5000,
      "type": "debit"
    }
  },
  "releaseDate": "2024-02-15",
  "invoiceReleaseDate": "2024-02-15",
  "description": "Tax refund for 2023"
}
BODY;

$ch = curl_init('https://sandbox.payme.io/api/partner/api/sellers/tax-return');
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 — Tax return charge processed successfully (success)

400 — Bad Request - Validation failed (error)

Field Type Description
statusCode integer
message string
error string
{
  "statusCode": 400,
  "message": [
    "Validation failed"
  ],
  "error": "Bad Request"
}

401 — Unauthorized - Invalid or missing authentication (error)

Field Type Description
statusCode integer
message string
error string
{
  "statusCode": 401,
  "message": "Unauthorized",
  "error": "Unauthorized"
}