You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
546 lines
17 KiB
546 lines
17 KiB
//用户付款
|
|
{
|
|
"id": "WH-62W810145R7409724-8CH11354TY024302T",
|
|
"event_version": "1.0",
|
|
"create_time": "2022-10-21T06:42:32.606Z",
|
|
"resource_type": "checkout-order",
|
|
"resource_version": "2.0",
|
|
"event_type": "CHECKOUT.ORDER.APPROVED",
|
|
"summary": "An order has been approved by buyer",
|
|
"resource": {
|
|
"create_time": "2022-10-21T06:27:07Z",
|
|
"purchase_units": [
|
|
{
|
|
"reference_id": "default",
|
|
"amount": {
|
|
"currency_code": "USD",
|
|
"value": "4999.81"
|
|
},
|
|
"payee": {
|
|
"email_address": "sb-gsncy21794962@business.example.com",
|
|
"merchant_id": "3SQBR4YEWZ4BA"
|
|
},
|
|
"shipping": {
|
|
"name": {
|
|
"full_name": "John Doe"
|
|
},
|
|
"address": {
|
|
"address_line_1": "1 Main St",
|
|
"admin_area_2": "San Jose",
|
|
"admin_area_1": "CA",
|
|
"postal_code": "95131",
|
|
"country_code": "US"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v2/checkout/orders/9JL52742K01513702",
|
|
"rel": "self",
|
|
"method": "GET"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v2/checkout/orders/9JL52742K01513702",
|
|
"rel": "update",
|
|
"method": "PATCH"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v2/checkout/orders/9JL52742K01513702/capture",
|
|
"rel": "capture",
|
|
"method": "POST"
|
|
}
|
|
],
|
|
"id": "9JL52742K01513702",
|
|
"payment_source": {
|
|
"paypal": {}
|
|
},
|
|
"intent": "CAPTURE",
|
|
"payer": {
|
|
"name": {
|
|
"given_name": "John",
|
|
"surname": "Doe"
|
|
},
|
|
"email_address": "sb-79rfq21745286@business.example.com",
|
|
"payer_id": "RCSNJCSEN36ZJ",
|
|
"address": {
|
|
"country_code": "US"
|
|
}
|
|
},
|
|
"status": "APPROVED"
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-62W810145R7409724-8CH11354TY024302T",
|
|
"rel": "self",
|
|
"method": "GET"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-62W810145R7409724-8CH11354TY024302T/resend",
|
|
"rel": "resend",
|
|
"method": "POST"
|
|
}
|
|
]
|
|
}
|
|
//确认收款
|
|
{
|
|
"id": "WH-4KR61645R81861232-4LN31734K5078982S",
|
|
"event_version": "1.0",
|
|
"create_time": "2022-10-21T06:46:50.303Z",
|
|
"resource_type": "capture",
|
|
"resource_version": "2.0",
|
|
"event_type": "PAYMENT.CAPTURE.COMPLETED",
|
|
"summary": "Payment completed for $ 4999.81 USD",
|
|
"resource": {
|
|
"amount": {
|
|
"value": "4999.81",
|
|
"currency_code": "USD"
|
|
},
|
|
"seller_protection": {
|
|
"dispute_categories": [
|
|
"ITEM_NOT_RECEIVED",
|
|
"UNAUTHORIZED_TRANSACTION"
|
|
],
|
|
"status": "ELIGIBLE"
|
|
},
|
|
"supplementary_data": {
|
|
"related_ids": {
|
|
"order_id": "9JL52742K01513702"
|
|
}
|
|
},
|
|
"update_time": "2022-10-21T06:46:46Z",
|
|
"create_time": "2022-10-21T06:46:46Z",
|
|
"final_capture": true,
|
|
"seller_receivable_breakdown": {
|
|
"paypal_fee": {
|
|
"value": "195.29",
|
|
"currency_code": "USD"
|
|
},
|
|
"gross_amount": {
|
|
"value": "4999.81",
|
|
"currency_code": "USD"
|
|
},
|
|
"net_amount": {
|
|
"value": "4804.52",
|
|
"currency_code": "USD"
|
|
}
|
|
},
|
|
"links": [
|
|
{
|
|
"method": "GET",
|
|
"rel": "self",
|
|
"href": "https://api.sandbox.paypal.com/v2/payments/captures/5FH6806799924231W"
|
|
},
|
|
{
|
|
"method": "POST",
|
|
"rel": "refund",
|
|
"href": "https://api.sandbox.paypal.com/v2/payments/captures/5FH6806799924231W/refund"
|
|
},
|
|
{
|
|
"method": "GET",
|
|
"rel": "up",
|
|
"href": "https://api.sandbox.paypal.com/v2/checkout/orders/9JL52742K01513702"
|
|
}
|
|
],
|
|
"id": "5FH6806799924231W",
|
|
"status": "COMPLETED"
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-4KR61645R81861232-4LN31734K5078982S",
|
|
"rel": "self",
|
|
"method": "GET"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-4KR61645R81861232-4LN31734K5078982S/resend",
|
|
"rel": "resend",
|
|
"method": "POST"
|
|
}
|
|
]
|
|
}
|
|
//提现(提现失败回调)
|
|
{
|
|
"id": "WH-5A19140561140630Y-2JL02815W4313754E",
|
|
"event_version": "1.0",
|
|
"create_time": "2022-10-21T07:14:45.696Z",
|
|
"resource_type": "payouts",
|
|
"event_type": "PAYMENT.PAYOUTSBATCH.DENIED",
|
|
"summary": "Payouts batch got denied.",
|
|
"resource": {
|
|
"batch_header": {
|
|
"payout_batch_id": "34MY452YBHPQW",
|
|
"batch_status": "DENIED",
|
|
"time_created": "2022-10-21T07:14:34Z",
|
|
"sender_batch_header": {
|
|
"sender_batch_id": "dsdsdsd"
|
|
},
|
|
"funding_source": "BALANCE",
|
|
"amount": {
|
|
"currency": "USD",
|
|
"value": "0.00"
|
|
},
|
|
"fees": {
|
|
"currency": "USD",
|
|
"value": "0.00"
|
|
},
|
|
"payments": 1
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/payments/payouts/34MY452YBHPQW",
|
|
"rel": "self",
|
|
"method": "GET",
|
|
"encType": "application/json"
|
|
}
|
|
]
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-5A19140561140630Y-2JL02815W4313754E",
|
|
"rel": "self",
|
|
"method": "GET"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-5A19140561140630Y-2JL02815W4313754E/resend",
|
|
"rel": "resend",
|
|
"method": "POST"
|
|
}
|
|
]
|
|
}
|
|
//转账成功
|
|
{
|
|
"id": "WH-27156021MJ807552P-9XF02986TA428514C",
|
|
"event_version": "1.0",
|
|
"create_time": "2022-10-21T07:34:58.791Z",
|
|
"resource_type": "payouts",
|
|
"event_type": "PAYMENT.PAYOUTSBATCH.SUCCESS",
|
|
"summary": "Payouts batch completed successfully.",
|
|
"resource": {
|
|
"batch_header": {
|
|
"payout_batch_id": "RLBRKVTX9W5JL",
|
|
"batch_status": "SUCCESS",
|
|
"time_created": "2022-10-21T07:34:44Z",
|
|
"time_completed": "2022-10-21T07:34:45Z",
|
|
"time_closed": "2022-10-21T07:34:45Z",
|
|
"sender_batch_header": {
|
|
"sender_batch_id": "dsdsdsd"
|
|
},
|
|
"funding_source": "BALANCE",
|
|
"amount": {
|
|
"currency": "USD",
|
|
"value": "96.00"
|
|
},
|
|
"fees": {
|
|
"currency": "USD",
|
|
"value": "1.92"
|
|
},
|
|
"payments": 1
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/payments/payouts/RLBRKVTX9W5JL",
|
|
"rel": "self",
|
|
"method": "GET",
|
|
"encType": "application/json"
|
|
}
|
|
]
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-27156021MJ807552P-9XF02986TA428514C",
|
|
"rel": "self",
|
|
"method": "GET"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-27156021MJ807552P-9XF02986TA428514C/resend",
|
|
"rel": "resend",
|
|
"method": "POST"
|
|
}
|
|
]
|
|
}
|
|
//取消支付(订单退款)
|
|
{
|
|
"id": "WH-7GU47175YW005840T-0VM77075J61186502",
|
|
"event_version": "1.0",
|
|
"create_time": "2022-10-21T07:50:01.873Z",
|
|
"resource_type": "refund",
|
|
"resource_version": "2.0",
|
|
"event_type": "PAYMENT.CAPTURE.REFUNDED",
|
|
"summary": "A $ 4999.81 USD capture payment was refunded",
|
|
"resource": {
|
|
"seller_payable_breakdown": {
|
|
"total_refunded_amount": {
|
|
"value": "4999.81",
|
|
"currency_code": "USD"
|
|
},
|
|
"paypal_fee": {
|
|
"value": "194.99",
|
|
"currency_code": "USD"
|
|
},
|
|
"gross_amount": {
|
|
"value": "4999.81",
|
|
"currency_code": "USD"
|
|
},
|
|
"net_amount": {
|
|
"value": "4804.82",
|
|
"currency_code": "USD"
|
|
}
|
|
},
|
|
"amount": {
|
|
"value": "4999.81",
|
|
"currency_code": "USD"
|
|
},
|
|
"update_time": "2022-10-21T00:49:57-07:00",
|
|
"create_time": "2022-10-21T00:49:57-07:00",
|
|
"links": [
|
|
{
|
|
"method": "GET",
|
|
"rel": "self",
|
|
"href": "https://api.sandbox.paypal.com/v2/payments/refunds/9F317409RP583132H"
|
|
},
|
|
{
|
|
"method": "GET",
|
|
"rel": "up",
|
|
"href": "https://api.sandbox.paypal.com/v2/payments/captures/5FH6806799924231W"
|
|
}
|
|
],
|
|
"id": "9F317409RP583132H",
|
|
"status": "COMPLETED"
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-7GU47175YW005840T-0VM77075J61186502",
|
|
"rel": "self",
|
|
"method": "GET"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-7GU47175YW005840T-0VM77075J61186502/resend",
|
|
"rel": "resend",
|
|
"method": "POST"
|
|
}
|
|
]
|
|
}
|
|
//转账item信息
|
|
{
|
|
"id": "WH-62214818PA778164H-6VJ474188Y3865907",
|
|
"event_version": "1.0",
|
|
"create_time": "2022-10-21T07:14:45.699Z",
|
|
"resource_type": "payouts_item",
|
|
"event_type": "PAYMENT.PAYOUTS-ITEM.FAILED",
|
|
"summary": "A payout item has failed",
|
|
"resource": {
|
|
"payout_item_fee": {
|
|
"currency": "USD",
|
|
"value": "0.00"
|
|
},
|
|
"transaction_status": "FAILED",
|
|
"sender_batch_id": "dsdsdsd",
|
|
"time_processed": "2022-10-21T07:14:34Z",
|
|
"payout_item": {
|
|
"recipient_type": "EMAIL",
|
|
"amount": {
|
|
"currency": "USD",
|
|
"value": "0.00"
|
|
},
|
|
"note": "打款",
|
|
"receiver": "sb-e37dy21833133@personal.example.com",
|
|
"recipient_wallet": "PAYPAL"
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/payments/payouts-item/C67WB53FB6BAW",
|
|
"rel": "self",
|
|
"method": "GET",
|
|
"encType": "application/json"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/payments/payouts/34MY452YBHPQW",
|
|
"rel": "batch",
|
|
"method": "GET",
|
|
"encType": "application/json"
|
|
}
|
|
],
|
|
"payout_item_id": "C67WB53FB6BAW",
|
|
"payout_batch_id": "34MY452YBHPQW",
|
|
"errors": {
|
|
"name": "ZERO_AMOUNT",
|
|
"message": "The Payout can't be done without any amount. You must enter a valid amount that's greater than zero.",
|
|
"information_link": "https://developer.paypal.com/docs/api/payments.payouts-batch/#errors",
|
|
"details": [],
|
|
"links": []
|
|
}
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-62214818PA778164H-6VJ474188Y3865907",
|
|
"rel": "self",
|
|
"method": "GET"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-62214818PA778164H-6VJ474188Y3865907/resend",
|
|
"rel": "resend",
|
|
"method": "POST"
|
|
}
|
|
]
|
|
}
|
|
|
|
{
|
|
"id": "WH-4CJ36714CJ204831L-9DY42878JG883501V",
|
|
"event_version": "1.0",
|
|
"create_time": "2022-10-21T07:34:58.765Z",
|
|
"resource_type": "payouts_item",
|
|
"event_type": "PAYMENT.PAYOUTS-ITEM.SUCCEEDED",
|
|
"summary": "A payout item has succeeded",
|
|
"resource": {
|
|
"transaction_id": "7X589343BN135035E",
|
|
"payout_item_fee": {
|
|
"currency": "USD",
|
|
"value": "1.92"
|
|
},
|
|
"transaction_status": "SUCCESS",
|
|
"sender_batch_id": "dsdsdsd",
|
|
"time_processed": "2022-10-21T07:34:45Z",
|
|
"activity_id": "07S085733Y1996237",
|
|
"payout_item": {
|
|
"recipient_type": "EMAIL",
|
|
"amount": {
|
|
"currency": "USD",
|
|
"value": "96.00"
|
|
},
|
|
"note": "打款",
|
|
"receiver": "sb-e37dy21833133@personal.example.com",
|
|
"recipient_wallet": "PAYPAL"
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/payments/payouts-item/RGQUU37L46TEQ",
|
|
"rel": "self",
|
|
"method": "GET",
|
|
"encType": "application/json"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/payments/payouts/RLBRKVTX9W5JL",
|
|
"rel": "batch",
|
|
"method": "GET",
|
|
"encType": "application/json"
|
|
}
|
|
],
|
|
"payout_item_id": "RGQUU37L46TEQ",
|
|
"payout_batch_id": "RLBRKVTX9W5JL"
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-4CJ36714CJ204831L-9DY42878JG883501V",
|
|
"rel": "self",
|
|
"method": "GET"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-4CJ36714CJ204831L-9DY42878JG883501V/resend",
|
|
"rel": "resend",
|
|
"method": "POST"
|
|
}
|
|
]
|
|
}
|
|
|
|
|
|
|
|
{
|
|
"id": "WH-2B088173KT8286923-7YM54303XB465773L",
|
|
"event_version": "1.0",
|
|
"create_time": "2022-11-03T13:58:49.707Z",
|
|
"resource_type": "payouts",
|
|
"event_type": "PAYMENT.PAYOUTSBATCH.PROCESSING",
|
|
"summary": "Payouts batch is getting processed.",
|
|
"resource": {
|
|
"batch_header": {
|
|
"payout_batch_id": "444ZSA7VMXR5L",
|
|
"batch_status": "PROCESSING",
|
|
"time_created": "2022-11-03T13:58:31Z",
|
|
"time_completed": "2022-11-03T13:58:33Z",
|
|
"time_closed": "2022-11-03T13:58:33Z",
|
|
"sender_batch_header": {
|
|
"sender_batch_id": "202211031358298010010001"
|
|
},
|
|
"funding_source": "BALANCE",
|
|
"amount": {
|
|
"currency": "USD",
|
|
"value": "499.00"
|
|
},
|
|
"fees": {
|
|
"currency": "USD",
|
|
"value": "9.98"
|
|
},
|
|
"payments": 1
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/payments/payouts/444ZSA7VMXR5L",
|
|
"rel": "self",
|
|
"method": "GET",
|
|
"encType": "application/json"
|
|
}
|
|
]
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-2B088173KT8286923-7YM54303XB465773L",
|
|
"rel": "self",
|
|
"method": "GET"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-2B088173KT8286923-7YM54303XB465773L/resend",
|
|
"rel": "resend",
|
|
"method": "POST"
|
|
}
|
|
]
|
|
}
|
|
|
|
{
|
|
"id": "WH-2PN47871N9299911D-36A939639Y5266517",
|
|
"event_version": "1.0",
|
|
"create_time": "2022-11-22T15:36:17.558Z",
|
|
"resource_type": "payouts",
|
|
"event_type": "PAYMENT.PAYOUTSBATCH.SUCCESS",
|
|
"summary": "Payouts batch completed successfully.",
|
|
"resource": {
|
|
"batch_header": {
|
|
"payout_batch_id": "7KD8ZC2WRXZYN",
|
|
"batch_status": "SUCCESS",
|
|
"time_created": "2022-11-22T15:36:02Z",
|
|
"time_completed": "2022-11-22T15:36:03Z",
|
|
"sender_batch_header": {
|
|
"sender_batch_id": "202211222335594910010002"
|
|
},
|
|
"funding_source": "BALANCE",
|
|
"amount": {
|
|
"currency": "USD",
|
|
"value": "3000.00"
|
|
},
|
|
"fees": {
|
|
"currency": "USD",
|
|
"value": "0.25"
|
|
},
|
|
"payments": 1
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/payments/payouts/7KD8ZC2WRXZYN",
|
|
"rel": "self",
|
|
"method": "GET",
|
|
"encType": "application/json"
|
|
}
|
|
]
|
|
},
|
|
"links": [
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-2PN47871N9299911D-36A939639Y5266517",
|
|
"rel": "self",
|
|
"method": "GET"
|
|
},
|
|
{
|
|
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-2PN47871N9299911D-36A939639Y5266517/resend",
|
|
"rel": "resend",
|
|
"method": "POST"
|
|
}
|
|
]
|
|
}
|