Lyft API
  1. User
Lyft API
  • Restricted
  • Public
    • Cost estimates
      GET
    • Available drivers nearby
      GET
    • Pickup ETAs
      GET
    • Types of rides
      GET
  • User
    • The user's general info
      GET
    • List rides
      GET
    • Request a Lyft
      POST
    • Get the ride detail of a given ride ID
      GET
    • Cancel a ongoing requested ride
      POST
    • Update the destination of the ride
      PUT
    • Add the passenger's rating, feedback, and tip
      PUT
    • Get the receipt of the rides.
      GET
  • Sandbox
    • Preset Prime Time percentage
      PUT
    • Propagate ride through ride status
      PUT
    • Preset types of rides for sandbox
      PUT
    • Driver availability for processing ride request
      PUT
  1. User

Get the receipt of the rides.

GET
/rides/{id}/receipt
User
Get the receipt information of a processed ride by providing the ride id. Receipts will only be available to view once the payment has been processed. In the case of canceled ride, cancellation penalty is included if applicable.
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.lyft.com/rides//receipt'
响应示例响应示例
200 - 示例 1
{
    "charges": [
        {
            "amount": 500,
            "currency": "USD",
            "payment_method": "Card"
        },
        {
            "amount": 405,
            "currency": "USD",
            "payment_method": "Lyft Credit"
        }
    ],
    "line_items": [
        {
            "amount": 500,
            "currency": "USD",
            "type": "Ride"
        },
        {
            "amount": 250,
            "currency": "USD",
            "type": "Prime Time"
        },
        {
            "amount": 155,
            "currency": "USD",
            "type": "Service fee"
        }
    ],
    "price": {
        "amount": 905,
        "currency": "USD",
        "description": "Total ride price"
    },
    "requested_at": "2015-09-24T23:26:25+00:00",
    "ride_id": 123456789,
    "ride_profile": "personal"
}

请求参数

Path 参数
id
string 
必需
The ID of the ride

返回响应

🟢200成功
application/json
Detailed ride receipt information including cancel penalty if applicable.
Body
Receipt information of a processed ride.
charges
array[object (Charge) {3}] 
可选
The break down of charge method
amount
integer <int32>
必需
The line item amount
currency
string 
必需
The currency for the amount
payment_method
string 
必需
The payment method display name.
line_items
array[object (LineItem) {3}] 
可选
The break down of line items
amount
integer <int32>
必需
The line item amount
currency
string 
必需
The currency for the amount
type
string 
必需
The line item display name for a charge item
price
object 
可选
The total price for the current ride
示例值:
{"amount":500,"currency":"USD","description":"Total cost"}
amount
integer <int32>
必需
Total price of the ride
currency
string 
必需
The ISO 4217 currency code for the amount (e.g. USD)
description
string 
必需
The description for the cost
requested_at
string <date-time>
可选
The ride requested timestamp in date and time
ride_id
string 
可选
The unique ID of this ride
ride_profile
enum<string> 
可选
Indicates whether the ride was requested from the business profile or personal profile of the user.
枚举值:
personalbusiness
🟠403禁止访问
🟠404记录不存在

【Lyft】API开发者 微信交流群

用微信扫右侧二维码,加入【Lyft】API开发者 交流群,互助沟通

扫码加入交流群
上一页
Add the passenger's rating, feedback, and tip
下一页
Preset Prime Time percentage
Built with