From 1c409ee182e735122a8739aadf64e81cea637c05 Mon Sep 17 00:00:00 2001 From: Thomas Brinkmann Date: Wed, 1 Jun 2022 20:49:10 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9EGET=20/billing/paymentmethods=E2=80=9C?= =?UTF-8?q?=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GET-%2Fbilling%2Fpaymentmethods.md | 109 +++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 GET-%2Fbilling%2Fpaymentmethods.md diff --git a/GET-%2Fbilling%2Fpaymentmethods.md b/GET-%2Fbilling%2Fpaymentmethods.md new file mode 100644 index 0000000..1e17ed8 --- /dev/null +++ b/GET-%2Fbilling%2Fpaymentmethods.md @@ -0,0 +1,109 @@ +## **GET /billing/paymentmethods** + + +## **Inhalt** +--- +- Parameter +- Optionale Parameter +- Beispiel Anfrage +- Beispiel Antwort +- Mögliche Fehlermeldungen +--- + +### Parameter + +|URL Parameter | Typ | Beschreibung| +|----------|-----|-------------| +|- | -| - + +|Body Parameter | Typ | Beschreibung| +|----------|-----|-------------| +| - | - | - | + + +--- + +### Optionale Parameter + +|Query-String Parameter | Typ | Beschreibung| +|----------|-----|-------------| +|?page | integer | Beschreibt die aktuelle Seitenzahl +|?limit | integer | Beschreibt wieviele Elemente pro Seite angezeigt werden sollen + +--- + +### Beispiel Anfrage + +##### PHP +```php + 'control.local/api/v2/billing/paymentmethods', + CURLOPT_CUSTOMREQUEST => 'GET', + CURLOPT_HTTPHEADER => array( + 'X-TOKEN: test-token', + 'Content-Type: application/json' + ), +)); + +$response = curl_exec($curl); + +curl_close($curl); +echo $response; +``` + +##### cURL +```bash +curl --location --request GET 'control.local/api/v2/billing/paymentmethods' \ +--header 'X-TOKEN: test-token' \ +--header 'Content-Type: application/json' +``` + +--- + +### Beispiel Antwort + +```json +{ + "status": "OK", + "totalResults": 6, + "page": 1, + "itemsPerPage": 10, + "maxPages": 1, + "items": [ + { + "id": "paysafecard", + "displayname": "PaySafeCard" + }, + { + "id": "paypal", + "displayname": "PayPal" + }, + { + "id": "sofort", + "displayname": "Klarna (Sofortüberweisung)" + }, + { + "id": "banktransfer", + "displayname": "SEPA - Überweisung (Bevorzugt)" + }, + { + "id": "coingate", + "displayname": "CoinGate (CryptoCurrencies)" + }, + { + "id": "dshstripe", + "displayname": "Mastercard/Visa | Creditcard" + } + ] +} +``` + +### Mögliche Fehlermeldungen + +> :warning: Status Code **403** - Permission denied + +> :warning: Status Code **500** - Payment Methods could not be fetched! \ No newline at end of file