Referencja API

Dostęp produkcyjny zamknięty · 37 operacji

Sprawdź stan checkoutu

GET/api/v1/payments/{id}/checkout

Stan konkretnej płatności zapisany przez Motano. Użyj payment.id zwróconego przez operację ogłoszenia.

Wymagany zakres payments:read

Przejdź do przykładu

Parametry

NazwaMiejsceTypWymaganyOpis
idpathstringTakmin. znaków 1 · maks. znaków 120

Odpowiedzi

200 Stan checkoutu i kwota w groszach.
application/json
Schemat CheckoutStatus
NazwaTypWymaganyOpis
idstringTak—
listingIdstring | nullTak—
status"pending" | "paid" | "failed" | "partially_refunded" | "refunded"Tak"pending" | "paid" | "failed" | "partially_refunded" | "refunded"
checkoutState"awaiting_confirmation" | "opening" | "awaiting_payment" | "paid" | "failed" | "partially_refunded" | "refunded"Tak"awaiting_confirmation" | "opening" | "awaiting_payment" | "paid" | "failed" | "partially_refunded" | "refunded"
amountCentsintegerTak—
currencystringTak—
checkoutStartedAtstring | nullTakformat date-time
createdAtstringTakformat date-time
updatedAtstringTakformat date-time
paidAtstring | nullTakformat date-time
JSON Schema
{
  "$ref": "#/components/schemas/CheckoutStatus"
}
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"
      }
    }
  }
}
404 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

CheckoutStatus
{
  "type": "object",
  "required": [
    "id",
    "listingId",
    "status",
    "checkoutState",
    "amountCents",
    "currency",
    "checkoutStartedAt",
    "createdAt",
    "updatedAt",
    "paidAt"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "listingId": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "paid",
        "failed",
        "partially_refunded",
        "refunded"
      ]
    },
    "checkoutState": {
      "type": "string",
      "enum": [
        "awaiting_confirmation",
        "opening",
        "awaiting_payment",
        "paid",
        "failed",
        "partially_refunded",
        "refunded"
      ]
    },
    "amountCents": {
      "type": "integer"
    },
    "currency": {
      "type": "string"
    },
    "checkoutStartedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "paidAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}