Skip to content

Instantly share code, notes, and snippets.

@legendpeng
Created April 12, 2018 15:51
Show Gist options
  • Save legendpeng/1c352e168840692d21b6099260303b20 to your computer and use it in GitHub Desktop.
Save legendpeng/1c352e168840692d21b6099260303b20 to your computer and use it in GitHub Desktop.
sample response
{
"checkoutSessionId": "853725142015",
"lineItems": [
{
"itemId": "173250316124",
"title": "Apple iPhone SE 16GB 4G LTE (Sprint) Wireless Phone Smartphone-SRB",
"variationId": "471960613090",
"variationTitle": "Color: Rose Gold",
"summary": {
"shippingCost": {
"value": 0,
"currency": "USD"
}
},
"imageUrl": "https://i.ebayimg.com/images/g/~zYAAOSwpONZUWaT/s-l96.png",
"image": {
"title": "Apple iPhone SE 16GB 4G LTE (Sprint) Wireless Phone Smartphone-SRB",
"imageId": "~zYAAOSwpONZUWaT",
"imageIdType": "ZOOM_GUID",
"URL": "https://i.ebayimg.com/images/g/~zYAAOSwpONZUWaT/s-l96.png"
},
"price": {
"value": 99.99,
"currency": "USD"
},
"seller": {
"sellerId": "qualitycellz"
},
"quantity": 1,
"lineItemId": "BId-ItemId=173250316124;EId-VariationId=471960613090;Domain-ebay;LId-420002",
"availableQuantity": 2,
"logistics": [
{
"selected": true,
"logisticsId": "420005",
"name": "Economy Shipping",
"logisticsType": "SHIP_TO_HOME",
"cost": {
"value": 0,
"currency": "USD"
},
"estimate": "Apr 19",
"minDeliveryEstimate": "2018-04-19T07:00:00.000Z",
"maxDeliveryEstimate": "2018-04-19T07:00:00.000Z"
},
{
"selected": false,
"logisticsId": "420007",
"name": "USPS Priority Mail",
"logisticsType": "SHIP_TO_HOME",
"cost": {
"value": 5,
"currency": "USD"
},
"estimate": "Est. delivery varies",
"minDeliveryEstimate": "2018-04-18T16:00:00.000Z",
"maxDeliveryEstimate": "2018-04-18T16:00:00.000Z"
},
{
"selected": false,
"logisticsId": "420009",
"name": "One-day Shipping",
"logisticsType": "SHIP_TO_HOME",
"cost": {
"value": 35,
"currency": "USD"
},
"estimate": "Apr 16",
"minDeliveryEstimate": "2018-04-16T07:00:00.000Z",
"maxDeliveryEstimate": "2018-04-16T07:00:00.000Z"
}
]
}
],
"shippingAddress": {
"addressId": "6333207179010",
"contactName": "*",
"addressLine1": "*",
"addressLine2": "*",
"stateOrProvince": "DE",
"city": "New Castle",
"country": "US",
"postalCode": "19720",
"phoneNumber": "*",
"firstName": "*",
"lastName": "*"
},
"paymentInstrument": {
"paymentInstrumentId": "*",
"paymentInstrumentDetails": {
"accountType": "PAYPAL",
"accountId": "x-3240",
"label": "Credit card",
"type": "PAYMENT_CARD",
"fundingSourceId": "55ece96bf54e91162885681e450ee66d",
"selected": true,
"amount": {
"value": 651.78,
"currency": "CNY"
}
},
"selected": true,
"paymentInstrumentSource": "CORE",
"fundingSourceDetails": [
{
"accountType": "PAYPAL",
"accountId": "x-3240",
"label": "Credit card",
"type": "PAYMENT_CARD",
"fundingSourceId": "55ece96bf54e91162885681e450ee66d",
"selected": true,
"amount": {
"value": 651.78,
"currency": "CNY"
}
}
],
"loginName": "*"
},
"availablePaymentMethods": [
{
"paymentMethodId": "PAYPAL",
"selected": true,
"available": true,
"paymentDetailsComplete": true,
"paymentInstruments": [
{
"paymentInstrumentId": "*",
"paymentInstrumentDetails": {
"accountType": "PAYPAL",
"accountId": "x-3240",
"label": "Credit card",
"type": "PAYMENT_CARD",
"fundingSourceId": "55ece96bf54e91162885681e450ee66d",
"selected": true,
"amount": {
"value": 651.78,
"currency": "CNY"
}
},
"selected": true,
"paymentInstrumentSource": "CORE",
"fundingSourceDetails": [
{
"accountType": "PAYPAL",
"accountId": "x-3240",
"label": "Credit card",
"type": "PAYMENT_CARD",
"fundingSourceId": "55ece96bf54e91162885681e450ee66d",
"selected": true,
"amount": {
"value": 651.78,
"currency": "CNY"
}
}
],
"loginName": "*"
}
],
"integrationUrls": {
"paypalSwitchAccountUrl": "{ebaySignin}?SignInAuthRedirect3&ru={ru}&idp=104&fl=1&returnError=true&taid=1005&idpDisplay={idpDisplay}&idpData=idp_authorize_uri%3Dhttps%3A%2F%2Fwww.paypal.com%2Fwebapps%2Fhelios%26action%3Dlogin%26cart_id%3D41R96341F1418860K%26client_id%3DZjI5ZTI0NmY0ZDY2Y2JlNjkwYWY3MDkwMjZiYTRkYzg%253D%26redirect_uri%3D%26locale%3Den-US%26switch_user%3Dtrue",
"paypalAddFundingSourceUrl": "https://www.paypal.com/webapps/helios?action=addCard&payer_id=QQ3YGP3H3NNAA&client_id=ZjI5ZTI0NmY0ZDY2Y2JlNjkwYWY3MDkwMjZiYTRkYzg%3D&cart_id=41R96341F1418860K&redirect_uri={redirect_uri}"
}
},
{
"paymentMethodId": "CC",
"selected": false,
"available": false,
"paymentDetailsComplete": false,
"paymentInstruments": []
}
],
"errors": [
{
"name": "INCENTIVE_NOT_APPLIED",
"explanation": "This code can't be applied to your order.",
"errorCode": 200
}
],
"pricingSummary": {
"priceSubtotal": {
"value": 99.99,
"currency": "USD"
},
"shippingCost": {
"value": 0,
"currency": "USD"
},
"tax": {
"value": 0,
"currency": "USD"
},
"deduction": {
"value": 0,
"currency": "USD"
},
"importCharge": {
"value": 0,
"currency": "USD"
},
"discount": {
"value": 0,
"currency": "USD"
},
"total": {
"value": 99.99,
"currency": "USD"
}
},
"smePromotions": [],
"allShippingAddresses": [
{
"addressId": "6333207179010",
"contactName": "*",
"addressLine1": "*",
"addressLine2": "*",
"stateOrProvince": "DE",
"city": "New Castle",
"country": "US",
"postalCode": "19720",
"phoneNumber": "*",
"firstName": "*",
"lastName": "*"
},
{
"addressId": "b0d3e8eb-0ee1-4da8-b9cc-52faf3775cb9",
"contactName": "*",
"addressLine1": "*",
"stateOrProvince": "广东省",
"city": "广州市",
"country": "CN",
"postalCode": "510000",
"phoneNumber": "*",
"firstName": "*",
"lastName": "*",
"ebayCoreAddressId": "6333184788010",
"phoneIso2Code": "CN",
"phoneCallingCode": "86"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment