# Get payment details You can retrieve information about a sub-entity's payin or payout using one of the following: - Payment ID – Returned in the response to your sub-entity's 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. Call the [Get payment details](https://api-reference.checkout.com/tag/Payments/#operation/getPaymentDetails) endpoint, and provide the payment ID or session ID as the `{id}` path parameter. > **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}` ### Response example **Payin details** ```json { "id": "pay_mbabizu24mvu3mela5njyhpit4", "requested_on": "2019-08-24T14:15:22Z", "source": { "type": "card", "id": "src_nwd3m4in3hkuddfpjsaevunhdy", "billing_address": { "address_line1": "123 High St.", "address_line2": "Flat 456", "city": "London", "state": "str", "zip": "SW1A 1AA", "country": "GB" }, "phone": { "country_code": "+44", "number": "1234 567890" }, "expiry_month": 6, "expiry_year": 2025, "name": "Toby Arden", "scheme": "VISA", "scheme_local": "Cartes_Bancaires", "local_schemes": [ "cartes_bancaires", "visa" ], "last4": "9996", "fingerprint": "F639CAB2745BEE4140BF86DF6B6D6", "bin": "45434748", "card_type": "CREDIT", "card_category": "CONSUMER", "card_wallet_type": "applepay", "issuer": "Test Bank", "issuer_country": "UK", "product_id": "F", "product_type": "CLASSIC", "avs_check": "S", "cvv_check": "Y", "payment_account_reference": "EUNIX9AX7THOOJIEJ2AP6OOFAHGH4", "encrypted_card_number": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUz...", "account_update_status": "card_updated", "account_update_failure_code": "VAU009", "account_holder": { "type": "individual" } }, "destination": { "type": "bank_account", "id": "string" }, "amount": 6540, "amount_requested": 6540, "currency": "USD", "payment_type": "Recurring", "payment_plan": { "amount_variability": "Variable", "days_between_payments": 28, "total_number_of_payments": 5, "current_payment_number": 3, "expiry": "20251031" }, "reference": "ORD-5023-4E89", "description": "Set of 3 masks", "approved": true, "expires_on": "string", "status": "Authorized", "balances": { "total_authorized": 6540, "total_voided": 0, "available_to_void": 6540, "total_captured": 0, "available_to_capture": 6540, "total_refunded": 0, "available_to_refund": 0 }, "3ds": { "downgraded": false, "enrolled": "Y", "signature_valid": "Y", "authentication_response": "Y", "authentication_status_reason": "string", "cryptogram": "hv8mUFzPzRZoCAAAAAEQBDMAAAA=", "xid": "MDAwMDAwMDAwMDAwMDAwMzIyNzY=", "eci": "string", "version": "2.1.0", "exemption": "low_value", "exemption_applied": "string", "challenged": true, "upgrade_reason": "sca_retry", "trusted_listing": { "status": "Y", "source": "01" } }, "authentication": { "experience": "3ds" }, "risk": { "flagged": true, "score": 22 }, "customer": { "id": "cus_y3oqhf46pyzuxjbcn2giaqnb44", "email": "toby.arden@example.com", "name": "Toby Arden", "summary": { "registration_date": "2023-05-01", "first_transaction_date": "2023-07-01", "last_payment_date": "2023-08-01", "total_order_count": 15, "last_payment_amount": 500, "is_premium_customer": true, "is_returning_customer": true, "lifetime_value": 500 } }, "billing_descriptor": { "name": "Test payment", "city": "London", "reference": "string", "local_descriptors": [ { "name": "漢字", "character_set": "kanji" } ] }, "shipping": { "address": { "address_line1": "123 High St.", "address_line2": "Flat 456", "city": "London", "state": "str", "zip": "SW1A 1AA", "country": "GB" }, "phone": { "country_code": "+1", "number": "415 555 2671" } }, "payment_ip": "90.197.169.245", "sender": { "type": "instrument", "reference": "8285282045818" }, "amount_allocations": [ { "id": "ent_w4jelhppmfiufdnatam37wrfc4", "amount": 1000, "reference": "ORD-5023-4E89", "commission": { "amount": 1000, "percentage": 1.125 } } ], "recipient": { "dob": "1985-05-15", "account_number": "5555554444", "address": { "address_line1": "123 High St.", "address_line2": "Flat 456", "city": "London", "state": "str", "zip": "SW1A 1AA", "country": "GB" }, "zip": "SW1A", "first_name": "John", "last_name": "Jones" }, "processing": { "preferred_scheme": "cartes_bancaires", "app_id": "com.iap.linker_portal", "airline_data": [ { "ticket": { "number": "045-21351455613", "issue_date": "2023-05-20", "issuing_carrier_code": "AI", "travel_package_indicator": "B", "travel_agency_name": "World Tours", "travel_agency_code": "01" }, "passenger": [ { "first_name": "John", "last_name": "White", "date_of_birth": "1990-05-26", "address": { "country": "US" } } ], "flight_leg_details": [ { "flight_number": "101", "carrier_code": "BA", "class_of_travelling": "J", "departure_airport": "LHR", "departure_date": "2023-06-19", "departure_time": "15:30", "arrival_airport": "LAX", "stop_over_code": "x", "fare_basis_code": "SPRSVR" } ] } ], "accommodation_data": [ { "name": "The Sea View Hotel", "booking_reference": "HOTEL123", "check_in_date": "2023-06-20", "check_out_date": "2023-06-23", "address": { "address_line1": "123 Beach Road", "zip": "10001" }, "state": "FL", "country": "USA", "city": "Los Angeles", "number_of_rooms": 2, "guests": [ { "first_name": "Jane", "last_name": "Doe", "date_of_birth": "1985-07-14" } ], "room": [ { "rate": "70", "number_of_nights_at_room_rate": "3" } ] } ], "partner_customer_id": "2102209000001106125F8", "partner_payment_id": "440644309099499894406", "tax_amount": 1000, "locale": "en-US", "retrieval_reference_number": "909913440644", "partner_order_id": "string", "partner_status": "string", "partner_transaction_id": "string", "partner_error_codes": [ "string" ], "partner_merchant_advice_code": "24", "partner_error_message": "string", "partner_authorization_code": "string", "partner_authorization_response_code": "string", "partner_fraud_status": "string", "pan_type_processed": "fpan", "custom_payment_method_ids": [ "string" ], "aft": true, "merchant_category_code": "5311", "scheme_merchant_id": "123456" }, "items": [ { "type": "digital", "sub_type": "stablecoin", "name": "Necklace", "quantity": 2, "unit_price": 50, "reference": "858818ac", "commodity_code": "DEF123", "unit_of_measure": "metres", "total_amount": 29000, "tax_rate": 2000, "tax_amount": 1000, "tax_exempt": true, "discount_amount": 1000, "wxpay_goods_id": "1001", "url": "string", "image_url": "string", "service_ends_on": "2025-01-01", "purchase_country": "GB", "foreign_retailer_amount": 200 } ], "metadata": { "coupon_code": "NY2018", "partner_id": 123989 }, "eci": "06", "scheme_id": "488341541494658", "actions": [ { "id": "act_y3oqhf46pyzuxjbcn2giaqnb44", "type": "Authorization", "response_code": "10000", "response_summary": "Approved" } ], "retry": { "attempts_made": 0, "max_attempts": 6, "ends_on": "2019-08-24T14:15:22Z", "next_attempt_on": "2019-08-24T14:15:22Z" }, "cko_network_token_available": false, "instruction": { "purpose": "financial_services" }, "_links": { "self": { "href": "https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44" }, "actions": { "href": "https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/actions" }, "authorize": { "href": "https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/authorizations" }, "refund": { "href": "https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44/refund" } } } ``` **Payout details** ```json { "id": "pay_mbabizu24mvu3mela5njyhpit4", "requested_on": "2019-08-24T14:15:22Z", "source": { "id": "ca_y3oqhf46pyzuxjbcn2giaqnb44", "type": "currency_account", "currency": "GBP", "amount": 1000 }, "destination": { "type": "bank_account", "id": "src_4pakgjwmv5re5m5ivqohsqpxnm" }, "amount": 1000, "currency": "GBP", "reference": "PO-215-5721", "billing_descriptor": { "reference": "Withdrawal" }, "status": "Pending", "approved": true, "sender": { "type": "instrument", "reference": "8285282045818" }, "instruction": { "value_date": "2020-06-13T01:49:19.1864428Z", "purpose": "Wallet Withdrawal", "quote_id": "qte_xrhaw53z5m6ehbbxz2n6n5lk74" }, "_links": { "self": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_gwlowf7eap7uzm4cyaaqoq62au" }, "actions": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_gwlowf7eap7uzm4cyaaqoq62au/actions" } } } ```