Referencja API

Dostęp produkcyjny zamknięty · 37 operacji

Pobierz historię płatności

GET/api/v1/payments

Historia opłaconych i zwróconych płatności wraz ze ścieżkami dokumentów.

Wymagany zakres payments:read

Przejdź do przykładu

Parametry

NazwaMiejsceTypWymaganyOpis
queryquerystringNiemaks. znaków 120
dateFromquerystringNieformat date
dateToquerystringNieformat date
limitqueryintegerNieminimum 1 · maksimum 50 · domyślnie 20
cursorquerystringNiemaks. znaków 600

Odpowiedzi

200 Żądanie zakończone pomyślnie.
application/json
Schemat PaymentHistory
NazwaTypWymaganyOpis
totalintegerNie—
totalSpentnumberNie—
paidCountintegerNie—
pendingCountintegerNie—
nextCursorstring | nullNie—
itemsobject[]Nie—
JSON Schema
{
  "$ref": "#/components/schemas/PaymentHistory"
}
403 Błąd przetwarzania żądania.
application/json
Schemat object
NazwaTypWymaganyOpis
codestringTak—
messagestringTak—
requestIdstringTak—
issuesobject[]Nie—
JSON Schema
{
  "type": "object",
  "required": [
    "code",
    "message",
    "requestId"
  ],
  "properties": {
    "code": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "requestId": {
      "type": "string"
    },
    "issues": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
422 Błąd przetwarzania żądania.
application/json
Schemat object
NazwaTypWymaganyOpis
codestringTak—
messagestringTak—
requestIdstringTak—
issuesobject[]Nie—
JSON Schema
{
  "type": "object",
  "required": [
    "code",
    "message",
    "requestId"
  ],
  "properties": {
    "code": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "requestId": {
      "type": "string"
    },
    "issues": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
429 Błąd przetwarzania żądania.
application/json
Schemat object
NazwaTypWymaganyOpis
codestringTak—
messagestringTak—
requestIdstringTak—
issuesobject[]Nie—
JSON Schema
{
  "type": "object",
  "required": [
    "code",
    "message",
    "requestId"
  ],
  "properties": {
    "code": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "requestId": {
      "type": "string"
    },
    "issues": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
Pozostałe błędy API Błąd przetwarzania żądania.
application/json
Schemat object
NazwaTypWymaganyOpis
codestringTak—
messagestringTak—
requestIdstringTak—
issuesobject[]Nie—
JSON Schema
{
  "type": "object",
  "required": [
    "code",
    "message",
    "requestId"
  ],
  "properties": {
    "code": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "requestId": {
      "type": "string"
    },
    "issues": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}
401 Brak prawidłowego klucza API.
503 Dostęp jest zamknięty lub usługa jest chwilowo niedostępna. Sprawdź code.

Obsługa błędów i limitów ↗

Powiązane schematy

PaymentHistory
{
  "type": "object",
  "properties": {
    "total": {
      "type": "integer"
    },
    "totalSpent": {
      "type": "number"
    },
    "paidCount": {
      "type": "integer"
    },
    "pendingCount": {
      "type": "integer"
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "serviceName": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "paid",
              "partially_refunded",
              "refunded"
            ]
          },
          "amount": {
            "type": "integer"
          },
          "amountCents": {
            "type": "integer"
          },
          "grossAmountCents": {
            "type": "integer"
          },
          "refundedAmountCents": {
            "type": "integer"
          },
          "netAmountCents": {
            "type": "integer"
          },
          "invoicePath": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoiceStatus": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoiceNumber": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ksefNumber": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoiceIssuedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "paidAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "refundedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "listing": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "make": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "model": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "title": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "corrections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "invoiceNumber": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "amountCents": {
                  "type": "integer"
                },
                "issuedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "downloadPath": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "refunds": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "disputes": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    }
  }
}