List transactions
GET
client/transactions
API Token required
read
access_transactions
Returns a list of transations
Query-Parameter
| Feld | Datentyp | Beschreibung |
|---|---|---|
| before | date | Only get transactions before a specified date. optional |
| after | date | Only get transactions after a specified date. optional |
| gateway | string | Only get transactions accounted through a specific gateway. optional |
| page | int | Specify a page. optional |
| limit | int | Limit items per page. optional |
curl -X GET \
-G 'https://api.pph.sh/client/transactions' \
-H 'Authorization: Bearer ${ACCESS_TOKEN}' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
-G 'https://api.pph.sh/client/transactions' \
-H 'Authorization: Bearer ${ACCESS_TOKEN}' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
{
"data": [
{
"id": 47129,
"gateway": "banktransfer",
"date": "2021-05-11T16:21:54.000000Z",
"diff_for_humans": "vor 2 Minuten",
"description": "Invoice Payment",
"amountin": 1,
"invoiceid": 155975
}
],
"links": {
"first": "http:\/\/api.pph.sh\/client\/transactions?page=1",
"last": "http:\/\/api.pph.sh\/client\/transactions?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http:\/\/api.pph.sh\/client\/transactions?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "http:\/\/api.pph.sh\/client\/transactions",
"per_page": 15,
"to": 1,
"total": 1
}
}
Transaction
GET
client/transactions/:transactionId
read
access_transactions
Returns the invoice for a specific transaction
URL-Parameter
| Feld | Datentyp | Beschreibung |
|---|---|---|
| transactionId | int | The transaction id. Example: 47129 required |
curl -X GET \
-G 'https://api.pph.sh/client/transactions/<transactionId>' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
-G 'https://api.pph.sh/client/transactions/<transactionId>' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
{
"data": {
"id": 47129,
"gateway": "banktransfer",
"date": "2021-05-11T16:21:54.000000Z",
"diff_for_humans": "vor 2 Minuten",
"description": "Invoice Payment",
"amountin": 1,
"invoiceid": 155975
}
}
Initiate payment
POST
client/transactions/initiate
API Token required
read
access_transactions
Query-Parameter
| Feld | Datentyp | Beschreibung |
|---|---|---|
| paymentmethod | string | The name of the payment gateway. Example: PayPal required |
| value | float | The amount of credit to add. Must not be less than 'minimum-transaction'-rule. Example: 15.60 required |
Response-Params
| Feld | Datentyp | Beschreibung |
|---|---|---|
| url | string | The url for the transaction initiation. The url is valid for a few minutes. |
curl -X POST \
-G 'https://api.pph.sh/client/transactions/initiate' \
-H 'Authorization: Bearer ${ACCESS_TOKEN}' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
-G 'https://api.pph.sh/client/transactions/initiate' \
-H 'Authorization: Bearer ${ACCESS_TOKEN}' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
Transaction invoice
GET
client/transactions/:transactionId/invoice
read
access_transactions
access_invoices
Returns the invoice for a specific transaction
URL-Parameter
| Feld | Datentyp | Beschreibung |
|---|---|---|
| transactionId | int | The transaction id. Example: 47129 required |
curl -X GET \
-G 'https://api.pph.sh/client/transactions/<transactionId>/invoice' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
-G 'https://api.pph.sh/client/transactions/<transactionId>/invoice' \
-H 'Content-Type=application/json' \
-H 'Accept=application/json' \
-H 'Accept-Language=de; *;q=0.5' | jq
{
"data": {
"id": 155975,
"duedate": "2021-05-10T22:00:00.000000Z",
"datepaid": "2021-05-11T16:21:54.000000Z",
"date": "2021-05-10T22:00:00.000000Z",
"subtotal": 1,
"credit": 0,
"tax": 0,
"taxrate": 19,
"total": 1,
"status": "Paid",
"status_label": "Bezahlt",
"is_open": false,
"items": [
{
"id": 172053,
"invoiceid": 155975,
"type": "AddFunds",
"short_description": "Guthaben \/ Vorauszahlung hinzuf\u00fcgen",
"description": "Guthaben \/ Vorauszahlung hinzuf\u00fcgen",
"relid": 0,
"amount": "1.00",
"taxed": 0
}
],
"transaction": {
"id": 47129,
"gateway": "banktransfer",
"date": "2021-05-11T16:21:54.000000Z",
"diff_for_humans": "vor 2 Minuten",
"description": "Invoice Payment",
"amountin": 1,
"invoiceid": 155975
},
"resources": {
"invoice": "http:\/\/api.pph.sh\/client\/invoices\/155975",
"download": "http:\/\/api.pph.sh\/client\/invoices\/155975\/download"
}
}
}