# Get payment details You can retrieve information about a payment or payout using a: - Payment ID – Returned in the response to your payment or payout request - Session ID – Provided in the `cko-session-id` query parameter included in the redirect URL back to your site – for example, `http://example.com/success?cko-session-id=sid_ubfj2q76miwundwlk72vxt2i7` > **Note** > > The `cko-session-id` expires 15 minutes after creation. You can also [retrieve a list of payments](https://www.checkout.com/docs/payments/manage-payments/get-a-list-of-payments.md) that match a specific payment reference. For the full API specification, refer to the [API reference](https://api-reference.checkout.com/tag/Payments/#operation/getPaymentDetails). > **Information** > > Your base URL's `{prefix}` value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see [API endpoints](https://www.checkout.com/docs/developer-resources/api/api-endpoints.md). **Production** `GET` `https://{prefix}.api.checkout.com/payments/{id}` **Sandbox** `GET` `https://{prefix}.api.sandbox.checkout.com/payments/{id}` The response will contain information about the payment or payout that matches the ID you provided. If you performed the request with a `cko-session-id`, the response will include an additional `actions` object in the response. > **Note** > > If a payment matching the ID you provided was not found, you'll receive a `404 – Payment not found` error. ### Response example **Pay-in details** ```json { "id": "pay_f2ws3hn4ijquzbytp3v5lsfxge", "requested_on": "2022-04-21T13:39:44.3167397Z", "source": { "id": "src_3yk7vgcu4yxedktczvd6dnialy", "type": "card", "expiry_month": 1, "expiry_year": 2099, "name": "John Smith", "scheme": "Visa", "last4": "4242", "fingerprint": "2BBAB84F3374A8E6D73A7375D5E3F1D3A10502EDDE4B9F515DE8878561566423", "bin": "424242", "card_type": "CREDIT", "card_category": "CONSUMER", "issuer_country": "GB", "product_id": "F", "product_type": "Visa Classic", "avs_check": "N", "cvv_check": "Y", "payment_account_reference": "V001428640638148739", "billing_address": { "address_line1": "123 High St.", "address_line2": "Flat 456", "city": "London", "zip": "SW1A 1AA", "country": "GB" }, "phone": { "country_code": "+44", "number": "1234 567890" } }, "expires_on": "2022-05-21T13:40:25.1077817Z", "amount": 2000, "currency": "USD", "payment_type": "Regular", "status": "Captured", "approved": true, "3ds": { "downgraded": false, "enrolled": "Y", "authentication_response": "Y", "cryptogram": "AgAAAAAAAIR8CQrXcIhbQAAAAAA=", "xid": "ad368121-0244-4536-9dab-250857df3d2b", "version": "2.1.0", "challenged": true }, "balances": { "total_authorized": 2000, "total_voided": 0, "available_to_void": 0, "total_captured": 2000, "available_to_capture": 0, "total_refunded": 0, "available_to_refund": 2000 }, "risk": { "flagged": false }, "eci": "05", "scheme_id": "290750527988470", "_links": { "self": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_f2ws3hn4ijquzbytp3v5lsfxge" }, "actions": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_f2ws3hn4ijquzbytp3v5lsfxge/actions" }, "refund": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_f2ws3hn4ijquzbytp3v5lsfxge/refunds" } } } ``` **Payout details** ```json { "id": "pay_gwlowf7eap7uzm4cyaaqoq62au", "requested_on": "2024-06-12T13:49:19.085546Z", "source": { "id": "ca_y3oqhf46pyzuxjbcn2giaqnb44", "type": "currency_account" }, "destination": { "id": "src_4pakgjwmv5re5m5ivqohsqpxnm", "type": "bank_account" }, "amount": 1000, "currency": "GBP", "reference": "PO-215-5721", "billing_descriptor": { "reference": "Withdrawal" }, "status": "Returned", "approved": true, "sender": { "type": "instrument", "reference": "8285282045818" }, "instruction": { "value_date": "2024-06-13T01:49:19.1864428Z", "purpose": "Wallet withdrawal" }, "_links": { "self": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_gwlowf7eap7uzm4cyaaqoq62au" }, "actions": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_gwlowf7eap7uzm4cyaaqoq62au/actions" } } } ```