Get Transaction Data

Credentials

No credentials are documented for this endpoint.

Overview

This endpoint enable to get transaction, based on the transaction status, sale status, sale currency and sale payment method.

Parameters

Name In Type Required Description
PayMe-Public-Key header string no XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Request body

Content type: application/json

Field Type Required Description
transaction_type integer no Filter the type of the transactions that will be presented. For all the transaction types click here.
transaction_status string no Filter the status of the transactions that will be presented. For all the transaction statuses click here.
sale_status array no Filter the status of the sales that will be presented. For all the sale statuses click here. Example: "initial"
sale_currency array no Sale currency. 3-letter ISO 4217 name. Example: "ILS"
sale_payment_method array no the Payment method used to pay the sale. For all the payment methods click here. Example: "credit-card"

Request example

{
  "transaction_type": 1,
  "transaction_status": "validated",
  "sale_status": [
    "completed"
  ],
  "sale_currency": [
    "ILS"
  ],
  "sale_payment_method": [
    "credit-card"
  ]
}

Code samples

curl

curl -X POST 'https://sandbox.payme.io/api/get-transaction-data' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "transaction_type": 1,
  "transaction_status": "validated",
  "sale_status": [
    "completed"
  ],
  "sale_currency": [
    "ILS"
  ],
  "sale_payment_method": [
    "credit-card"
  ]
}'

Node.js

const response = await fetch("https://sandbox.payme.io/api/get-transaction-data", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "transaction_type": 1,
    "transaction_status": "validated",
    "sale_status": [
      "completed"
    ],
    "sale_currency": [
      "ILS"
    ],
    "sale_payment_method": [
      "credit-card"
    ]
  }),
});

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

Python

import requests

response = requests.post(
    "https://sandbox.payme.io/api/get-transaction-data",
    json={
        "transaction_type": 1,
        "transaction_status": "validated",
        "sale_status": [
            "completed",
        ],
        "sale_currency": [
            "ILS",
        ],
        "sale_payment_method": [
            "credit-card",
        ],
    },
)

print(response.text)

PHP

<?php

$body = <<<'BODY'
{
  "transaction_type": 1,
  "transaction_status": "validated",
  "sale_status": [
    "completed"
  ],
  "sale_currency": [
    "ILS"
  ],
  "sale_payment_method": [
    "credit-card"
  ]
}
BODY;

$ch = curl_init('https://sandbox.payme.io/api/get-transaction-data');
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 — OK (success)

Field Type Description
status_code integer Status of the request (0 - success, 1 - error)
items array The transactions details.
items_count integer Count of the transactions.
{
  "status_code": 0,
  "items": [],
  "items_count": 0
}