KashierDevelopersKashier Developers

Get payment session by id

curl -X GET "https://test-api.kashier.io/v3/payment/sessions/string"
{  "status": "CREATED",  "failureAttempts": 0,  "capturedAmount": 0,  "refundedAmount": 0,  "_id": "string",  "merchantId": "string",  "expireAt": "string",  "maxFailureAttempts": 0,  "paymentParams": {},  "apiKey": "string",  "history": [    {      "status": "string",      "date": "string"    }  ],  "webhookNotifications": [    null  ],  "createdAt": "string",  "updatedAt": "string",  "__v": 0,  "sessionUrl": "string"}

Returns the session document for one session — its current status, the payment parameters it was created with, and its history of state changes.

This endpoint takes no credential. It is the read the hosted checkout page itself performs, which is why it is unauthenticated, and why it is also the cheapest way for your backend to poll a session while the customer is paying. It exposes nothing beyond what the customer already sees on the payment page — but treat the sessionId itself as the capability it is, and do not publish one anywhere you would not publish the payment link.

Poll this until status reaches a final state (PAID, AUTHORIZED, FAILED, EXPIRED, ABANDONED, REJECTED, VOIDED, REVERSED, REFUNDED), or — better — let the webhook tell you and use this to confirm.

Path Parameters

sessionId*string

The session's _id, returned as _id by Create payment session and embedded in the sessionUrl.

Response Body

application/json

application/json

application/json

application/json

GET
/v3/payment/sessions/{sessionId}