v2025-01-01
- Overview
- Orders
- Payments
- Payment Links
- Refunds
- Customers
- Payment Methods
- Offers
- Settlements
- Simulation
- Utilities
Orders
Get Order Extended
Use this API to fetch the order related data like address,cart,offers,customer details etc using the Cashfree’s order_id
.
When to use this API
- To get the extended data associated with order.
- Once the order is PAID
- Once your customer returns to
return_url
GET
/
orders
/
{order_id}
/
extended
Copy
curl --request GET \
--url https://sandbox.cashfree.com/pg/orders/{order_id}/extended \
--header 'x-api-version: <x-api-version>' \
--header 'x-client-id: <api-key>' \
--header 'x-client-secret: <api-key>'
Copy
{
"cf_order_id": "2149460581",
"order_id": "order_3242Tq4Edj9CC5RDcMeobmJOWOBJij",
"order_amount": 22,
"order_currency": "INR",
"created_at": "2023-08-11T18:02:46+05:30",
"charges": {
"shipping_charges": 5,
"cod_handling_charges": 10
},
"customer_details": {
"customer_id": "409128494",
"customer_name": "Aditya Keshri",
"customer_email": "pmlpayme@ntsas.com",
"customer_phone": "9876543210",
"customer_uid": "54deabb4-ba45-4a60-9e6a-9c016fe7ab10"
},
"shipping_address": {
"name": "Saurav Singh",
"address_line_one": "MK Building",
"address_line_two": "Test Address",
"country": "India",
"country_code": "IN",
"state": "Karnataka",
"state_code": "KA",
"city": "Bangalore",
"pin_code": "560034",
"phone": "+91 1118911189",
"email": "test@cashfree.com"
},
"billing_address": {
"name": "Saurav Singh",
"address_line_one": "MK Building",
"address_line_two": "Test Address",
"country": "India",
"country_code": "IN",
"state": "Karnataka",
"state_code": "KA",
"city": "Bangalore",
"pin_code": "560034",
"phone": "+91 1118911189",
"email": "test@cashfree.com"
},
"cart": {
"name": "test",
"items": [
{
"item_id": "26",
"item_name": "Sample Product",
"item_description": "item-description",
"item_tags": [
"1",
"2"
],
"item_details_url": "http://cashfree.com",
"item_image_url": "http://cashfree.com",
"item_original_unit_price": "1",
"item_discounted_unit_price": "1",
"item_quantity": 1,
"item_currency": "INR"
},
{
"item_id": "35",
"item_name": "Sample Product",
"item_description": "item-description",
"item_tags": [
"1",
"2"
],
"item_details_url": "http://cashfree.com",
"item_image_url": "http://cashfree.com",
"item_original_unit_price": "1",
"item_discounted_unit_price": "1",
"item_quantity": 1,
"item_currency": "INR"
}
]
},
"offer": {
"offer_id": "d2b430fb-1afe-455a-af31-66d00377b29a",
"offer_status": "active",
"offer_meta": {
"offer_title": "some title",
"offer_description": "some offer description",
"offer_code": "CFTESTOFFER",
"offer_start_time": "2023-03-21T08:09:51Z",
"offer_end_time": "2023-03-29T08:09:51Z"
},
"offer_tnc": {
"offer_tnc_type": "text",
"offer_tnc_value": "TnC for the Offer."
},
"offer_details": {
"offer_type": "DISCOUNT_AND_CASHBACK",
"discount_details": {
"discount_type": "flat",
"discount_value": "10",
"max_discount_amount": "10"
},
"cashback_details": {
"cashback_type": "percentage",
"cashback_value": "20",
"max_cashback_amount": "150"
}
},
"offer_validations": {
"min_amount": 10,
"payment_method": {
"wallet": {
"issuer": "paytm"
}
},
"max_allowed": 2
}
}
}
Authorizations
Client app ID. You can find your app id in the merchant dashboard.
Client secret key. You can find your secret in the merchant dashboard.
Headers
API version to be used. Format is in YYYY-MM-DD.
Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to Cashfree.
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
The id which uniquely identifies your order
Response
200
application/json
OK
The complete order extended data entity
Copy
curl --request GET \
--url https://sandbox.cashfree.com/pg/orders/{order_id}/extended \
--header 'x-api-version: <x-api-version>' \
--header 'x-client-id: <api-key>' \
--header 'x-client-secret: <api-key>'
Copy
{
"cf_order_id": "2149460581",
"order_id": "order_3242Tq4Edj9CC5RDcMeobmJOWOBJij",
"order_amount": 22,
"order_currency": "INR",
"created_at": "2023-08-11T18:02:46+05:30",
"charges": {
"shipping_charges": 5,
"cod_handling_charges": 10
},
"customer_details": {
"customer_id": "409128494",
"customer_name": "Aditya Keshri",
"customer_email": "pmlpayme@ntsas.com",
"customer_phone": "9876543210",
"customer_uid": "54deabb4-ba45-4a60-9e6a-9c016fe7ab10"
},
"shipping_address": {
"name": "Saurav Singh",
"address_line_one": "MK Building",
"address_line_two": "Test Address",
"country": "India",
"country_code": "IN",
"state": "Karnataka",
"state_code": "KA",
"city": "Bangalore",
"pin_code": "560034",
"phone": "+91 1118911189",
"email": "test@cashfree.com"
},
"billing_address": {
"name": "Saurav Singh",
"address_line_one": "MK Building",
"address_line_two": "Test Address",
"country": "India",
"country_code": "IN",
"state": "Karnataka",
"state_code": "KA",
"city": "Bangalore",
"pin_code": "560034",
"phone": "+91 1118911189",
"email": "test@cashfree.com"
},
"cart": {
"name": "test",
"items": [
{
"item_id": "26",
"item_name": "Sample Product",
"item_description": "item-description",
"item_tags": [
"1",
"2"
],
"item_details_url": "http://cashfree.com",
"item_image_url": "http://cashfree.com",
"item_original_unit_price": "1",
"item_discounted_unit_price": "1",
"item_quantity": 1,
"item_currency": "INR"
},
{
"item_id": "35",
"item_name": "Sample Product",
"item_description": "item-description",
"item_tags": [
"1",
"2"
],
"item_details_url": "http://cashfree.com",
"item_image_url": "http://cashfree.com",
"item_original_unit_price": "1",
"item_discounted_unit_price": "1",
"item_quantity": 1,
"item_currency": "INR"
}
]
},
"offer": {
"offer_id": "d2b430fb-1afe-455a-af31-66d00377b29a",
"offer_status": "active",
"offer_meta": {
"offer_title": "some title",
"offer_description": "some offer description",
"offer_code": "CFTESTOFFER",
"offer_start_time": "2023-03-21T08:09:51Z",
"offer_end_time": "2023-03-29T08:09:51Z"
},
"offer_tnc": {
"offer_tnc_type": "text",
"offer_tnc_value": "TnC for the Offer."
},
"offer_details": {
"offer_type": "DISCOUNT_AND_CASHBACK",
"discount_details": {
"discount_type": "flat",
"discount_value": "10",
"max_discount_amount": "10"
},
"cashback_details": {
"cashback_type": "percentage",
"cashback_value": "20",
"max_cashback_amount": "150"
}
},
"offer_validations": {
"min_amount": 10,
"payment_method": {
"wallet": {
"issuer": "paytm"
}
},
"max_allowed": 2
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.