This Choreo retrieves the latest payment from your PayPal account. The documentation for this PayPal resource can be found here.
The following is a sample of the JSON information returned by this Choreo:
{
"payments": [
{
"id": "PAY-4H436625N9235282MKGATLSI",
"create_time": "2013-05-01T15:33:29Z",
"update_time": "2013-05-01T15:37:00Z",
"state": "approved",
"intent": "sale",
"payer": {
"payment_method": "paypal",
"status": "VERIFIED",
"payer_info": {
"email": "aaron.jennings@temboo.com",
"first_name": "Aaron",
"last_name": "Jennings",
"payer_id": "77BX5A5LR9SBN",
"shipping_address": {
"line1": "1 Main St",
"city": "San Jose",
"state": "CA",
"postal_code": "95131",
"country_code": "US",
"recipient_name": "Aaron Jennings"
}
}
},
"transactions": [
{
"amount": {
"total": "1.00",
"currency": "USD",
"details": {
"subtotal": "1.00"
}
},
"related_resources": [
{
"sale": {
"id": "6HK48032YP993821M",
"create_time": "2013-05-01T15:33:29Z",
"update_time": "2013-05-01T15:37:00Z",
"amount": {
"total": "1.00",
"currency": "USD"
},
"payment_mode": "INSTANT_TRANSFER",
"state": "refunded",
"reason_code": "REFUND",
"protection_eligibility": "ELIGIBLE",
"protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE",
"parent_payment": "PAY-4H436625N9235282MKGATLSI",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/sale/6HK48032YP993821M",
"rel": "self",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/sale/6HK48032YP993821M/refund",
"rel": "refund",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-4H436625N9235282MKGATLSI",
"rel": "parent_payment",
"method": "GET"
}
]
}
},
{
"refund": {
"id": "1JM33847HC345243E",
"create_time": "2013-05-01T15:37:00Z",
"update_time": "2013-05-01T15:37:00Z",
"state": "completed",
"amount": {
"total": "-1.00",
"currency": "USD"
},
"sale_id": "6HK48032YP993821M",
"parent_payment": "PAY-4H436625N9235282MKGATLSI",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/refund/1JM33847HC345243E",
"rel": "self",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-4H436625N9235282MKGATLSI",
"rel": "parent_payment",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/sale/6HK48032YP993821M",
"rel": "sale",
"method": "GET"
}
]
}
}
]
}
],
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-4H436625N9235282MKGATLSI",
"rel": "self",
"method": "GET"
}
]
}
],
"count": 1,
"next_id": "PAY-1RS8448490660973AKGAABPA"
}