Przejdź do głównej zawartości

PaymentSession

Payment session created for an order. Branch on flow to launch payment: ONLINE_REDIRECT → redirect to redirectUrl; ONLINE_EMBEDDED → render an in-page widget using clientSecret; INSTANT_DIRECT → the payment is already settled, check status.

type PaymentSession {
clientSecret: String
expiresAt: String
flow: PaymentInitiationFlow!
id: ID!
orderId: ID!
provider: String!
redirectUrl: URL
status: OrderPaymentStatus!
}

Fields

PaymentSession.clientSecret ● String scalar

Client secret / token for the in-page payment widget. Populated only when flow is ONLINE_EMBEDDED. Treat as sensitive — do not log.

PaymentSession.expiresAt ● String scalar

When the redirectUrl / clientSecret stops being usable (ISO 8601). The storefront should call paymentCreate again to get a fresh session after this time.

PaymentSession.flow ● PaymentInitiationFlow! non-null enum

How the storefront should launch the payment — branch on this with switch(flow).

PaymentSession.id ● ID! non-null scalar

Stable identifier of the payment record.

PaymentSession.orderId ● ID! non-null scalar

ID of the order this payment is for.

PaymentSession.provider ● String! non-null scalar

Provider code of the integration behind the session (e.g. "PAYU", "STRIPE"). Use for analytics; do not branch UI on it — use flow and the order paymentMethodType instead.

PaymentSession.redirectUrl ● URL scalar

Hosted-gateway URL to redirect the buyer to. Populated only when flow is ONLINE_REDIRECT.

PaymentSession.status ● OrderPaymentStatus! non-null enum

Payment status of the order at the time the session was created. For INSTANT_DIRECT, this already reflects the settled outcome.

Member Of

PaymentCreatePayload object