Payment sessions

Get payment session by id

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.

get/v3/payment/sessions/{sessionId}

Request

  • Base URL: https://test-api.kashier.io
  • URL: https://test-api.kashier.io/v3/payment/sessions/{sessionId}
  • Auth: none required

Path parameters

sessionIdstring required

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

Response

The payment session.

status'CREATED' | 'OPENED' | 'PENDING' | 'ABANDONED' | 'PAID' | 'FAILED' | 'EXPIRED' | 'AUTHORIZED' | 'REFUNDED' | 'PARTIALLY_REFUNDED' | 'REFUND_PENDING' | 'VOIDED' | 'REVERSED' | 'REJECTED'

Where a payment session currently is. A session starts CREATED, becomes OPENED when the customer lands on the payment page, PENDING while an attempt is in flight, and then settles into one of the final states. ABANDONED is what Abandon a payment session sets; EXPIRED is what the session reaches on its own at expireAt.

failureAttemptsinteger
capturedAmountnumber
refundedAmountnumber
_idstring
merchantIdstring
expireAtstring
maxFailureAttemptsinteger
paymentParamsobject

The payment parameters the session was created with (echoed back, plus hash/store info).

apiKeystring
createdAtstring
updatedAtstring
__vinteger
sessionUrlstring

The URL that will be used to redirect the customer to the payment page. You can use it as the src attribute in a link or iframe.

Changes

No recorded changes to this operation across all 1 revision of this API.