Skip to content

Step 10 - GET /payments/

Poll the payment status using the PaymentId returned in Step 9:

typescript
const statusResponse = await fetch(
  `${LFI_API_BASE}/open-finance/payment/v2.1/payments/${paymentId}`,
  {
    headers: { Authorization: `Bearer ${access_token}` },
    // agent: new https.Agent({ cert: transportCert, key: transportKey }),
  }
)

const { Data: { Status, StatusUpdateDateTime } } = await statusResponse.json()
python
status_response = httpx.get(
    f"{LFI_API_BASE}/open-finance/payment/v2.1/payments/{payment_id}",
    headers={"Authorization": f"Bearer {access_token}"},
    # cert=("transport.crt", "transport.key"),
)

data                   = status_response.json()["Data"]
status                 = data["Status"]
status_update_datetime = data["StatusUpdateDateTime"]
StatusDescription
PendingPayment received by LFI, awaiting processing
AcceptedSettlementInProcessPayment accepted and settlement is in progress
AcceptedSettlementCompletedPayment settled successfully
RejectedPayment rejected by the LFI or payment rail

See GET /payments/{PaymentId} for the full response schema.