Skip to main content
GET
/
orders
/
{order_id}
/
payments
/
{cf_payment_id}
Get Payment by ID
curl --request GET \
  --url https://sandbox.cashfree.com/pg/orders/{order_id}/payments/{cf_payment_id} \
  --header 'x-api-version: <x-api-version>' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>'
{
  "cf_payment_id": "12376123",
  "order_id": "order_8123",
  "entity": "payment",
  "payment_currency": "INR",
  "error_details": null,
  "order_amount": 10.01,
  "order_currency": "INR",
  "is_captured": true,
  "payment_group": "upi",
  "authorization": {
    "action": "CAPTURE",
    "status": "PENDING",
    "captured_amount": 100,
    "start_time": "2022-02-09T18:04:34+05:30",
    "end_time": "2022-02-19T18:04:34+05:30",
    "approve_by": "2022-02-09T18:04:34+05:30",
    "action_reference": "6595231908096894505959",
    "action_time": "2022-08-03T16:09:51"
  },
  "payment_method": {
    "upi": {
      "channel": "collect",
      "upi_id": "rohit@xcxcx",
      "upi_payer_ifsc": "AXL1234",
      "upi_payer_account_number": "XXXXXXX6024"
    }
  },
  "payment_amount": 10.01,
  "payment_time": "2021-07-23T12:15:06+05:30",
  "payment_completion_time": "2021-07-23T12:18:59+05:30",
  "payment_status": "SUCCESS",
  "payment_message": "Transaction successful",
  "bank_reference": "P78112898712",
  "auth_id": "A898101",
  "international_payment": {
    "international": false
  },
  "payment_gateway_details": {
    "gateway_name": "CASHFREE",
    "gateway_order_id": "1234421ABD",
    "gateway_payment_id": "XABDJ2213",
    "gateway_order_reference_id": "BDIWO233",
    "gateway_settlement": "cashfree",
    "gateway_reference_name": ""
  }
}
Run in Postman: You can also try this API in our Postman Collection.

Error codes

The following table lists the error codes you may encounter when retrieving payment details for an order using a payment ID:
CodeDescriptionTypeStatus
order_id_invalidThe order_id field contains a value in an invalid format. Provide a correctly formatted order ID and try again. Value received: #INVALIDinvalid_request_error400
order_id_missingThe order_id field is required but was not included in the request.invalid_request_error400
version_missingThe version field is required but was not included in the request header.invalid_request_error400
payment_id_invalidThe payment_id field must be a numeric value. Value received: INVALIDinvalid_request_error400
payment_get_failedThe payment_id value is out of the supported integer range and cannot be processed. Value received: 100000000000000000000000000000000000000invalid_request_error400
payment_id_missingThe payment_id field is required but was not included in the request.invalid_request_error400
payment_not_foundNo transaction was found for the specified payment ID. Verify the payment ID and try again.invalid_request_error404
order_not_foundNo order was found for the specified order reference ID. Verify the order ID and try again.invalid_request_error404
This API allows you to retrieve payment data for the current and previous financial years. To access data older than this period, log in to the Merchant Dashboard

Authorizations

x-client-id
string
header
required

Client app ID. You can find your app id in the Merchant Dashboard.

x-client-secret
string
header
required

Client secret key. You can find your secret key in the Merchant Dashboard.

Headers

x-api-version
string
default:2025-01-01
required

API version to be used.

x-request-id
string

Request ID for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to Cashfree.

x-idempotency-key
string<UUID>

An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.

Path Parameters

order_id
string
required

The ID which uniquely identifies your order.

cf_payment_id
string
required

The Cashfree payment or transaction ID.

Response

Success response for fetching payment by ID.

cf_payment_id
string

Payment entity full object.

order_id
string
entity
string
error_details
ErrorDetailsInPayments Ā· object

The error details are present only for failed payments.

Example:
{
"error_code": "TRANSACTION_DECLINED",
"error_description": "issuer bank or payment service provider declined the transaction",
"error_reason": "auth_declined",
"error_source": "customer",
"error_code_raw": "ZM",
"error_description_raw": "INVALID / INCORRECT MPIN",
"error_subcode_raw": ""
}
is_captured
boolean
order_amount
number

Order amount can be different from payment amount if you collect service fee from the customer.

payment_group
string

Type of payment group. One of ['prepaid_card', 'upi_ppi_offline', 'cash', 'upi_credit_card', 'paypal', 'net_banking', 'cardless_emi', 'credit_card', 'bank_transfer', 'pay_later', 'debit_card_emi', 'debit_card', 'wallet', 'upi_ppi', 'upi', 'credit_card_emi'].

payment_currency
string
payment_amount
number
payment_time
string

This is the time when the payment was initiated.

payment_completion_time
string

This is the time when the payment reaches its terminal state.

payment_status
enum<string>

The transaction status can be one of ["SUCCESS", "NOT_ATTEMPTED", "FAILED", "USER_DROPPED", "VOID", "CANCELLED", "PENDING"].

Available options:
SUCCESS,
NOT_ATTEMPTED,
FAILED,
USER_DROPPED,
VOID,
CANCELLED,
PENDING
payment_message
string
bank_reference
string

Issuing bank’s transaction reference number.

auth_id
string

Authorisation ID provided by the issuing bank.

order_currency
string
authorization
AuthorizationInPayments Ā· object

If preauth enabled for account you will get this body.

Example:
{
"action": "CAPTURE",
"status": "PENDING",
"captured_amount": 100,
"start_time": "2022-02-09T18:04:34+05:30",
"end_time": "2022-02-19T18:04:34+05:30",
"approve_by": "2022-02-09T18:04:34+05:30",
"action_reference": "6595231908096894505959",
"action_time": "2022-08-03T16:09:51"
}
payment_method
Card Ā· object

The following code samples show the payment method object payload for different payment methods.

Example:
{
"channel": "link",
"card_number": "XXXXXXXXXXXX4738",
"card_network": "visa",
"card_type": "credit_card",
"card_sub_type": "R",
"card_country": "IN",
"card_bank_name": "HDFC Bank",
"card_network_reference_id": "100212023061229",
"instrument_id": "3fc5814b-e732-4a71-b2ee-94b4f147d9e1"
}
international_payment
InternationalPayment Ā· object

International payment details.

payment_gateway_details
PaymentGatewayDetails Ā· object

payment gateway details present in the webhook response.

payment_surcharge
object