{"files":{"SKILL.md":"---\nname: payouts\ndescription: \"Payouts API skill. Use when working with Payouts for payments. Covers 4 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Payouts\nAPI version: 1.9\n\n## Auth\nOAuth2\n\n## Base URL\nhttps://api-m.sandbox.paypal.com\n\n## Setup\n1. Configure auth: OAuth2\n2. GET /v1/payments/payouts/{id} -- show payout batch details\n3. POST /v1/payments/payouts -- create first payout\n\n## Endpoints\n4 endpoints across 1 group. See references/api-spec.lap for full details.\n\n### Payments\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /v1/payments/payouts | Create batch payout |\n| GET | /v1/payments/payouts/{id} | Show payout batch details |\n| GET | /v1/payments/payouts-item/{payout_item_id} | Show payout item details |\n| POST | /v1/payments/payouts-item/{payout_item_id}/cancel | Cancel unclaimed payout item |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a payout?\" -> POST /v1/payments/payouts\n- \"Get payout details?\" -> GET /v1/payments/payouts/{id}\n- \"Get payouts-item details?\" -> GET /v1/payments/payouts-item/{payout_item_id}\n- \"Create a cancel?\" -> POST /v1/payments/payouts-item/{payout_item_id}/cancel\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Paginated endpoints accept limit/offset or cursor parameters\n- Create/update endpoints return the modified resource on success\n- Error responses include status codes and descriptions in the spec\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Payouts\n@base https://api-m.sandbox.paypal.com\n@version 1.9\n@auth OAuth2\n@endpoints 4\n@toc payments(4)\n\n@endpoint POST /v1/payments/payouts\n@desc Create batch payout\n@required {sender_batch_header: map{sender_batch_id: str, recipient_type: str, email_subject: str, email_message: str, note: str} # The sender-provided payout header for a payout request., items: [map{recipient_type: str, amount!: map, note: str, receiver!: str, sender_item_id: str, recipient_wallet: str, alternate_notification_method: map, notification_language: str(ppaas_common_language_v3), application_context: map, purpose: str}] # An array of individual payout items.}\n@optional {PayPal-Request-Id: str # The server stores keys for 30 days.}\n@returns(201) {batch_header: map{payout_batch_id: str, batch_status: str, time_created: str(date-time), sender_batch_header: map{sender_batch_id: str, recipient_type: str, email_subject: str, email_message: str}}, links: [map]} # A successful request returns the HTTP 201 Created status code and a JSON response body that shows the ID for the payout and payout details. To show payout status, use the payout_batch_id value that appears in the response. If the initial scan that checks for syntax errors, missing or duplicated keywords, and more succeeds, the batch_status is PENDING. The initial scan checks for syntax errors and missing or duplicated keywords. The API does not immediately validate some payout item values, such as the receiver phone numbers.\n@errors {400: Request is not well-formed, syntactically incorrect, or violates schema., 403: Authorization failed due to insufficient permissions., 500: An internal server error has occurred.}\n@example_request {\"sender_batch_header\":{\"sender_batch_id\":\"Payouts_2018_100007\",\"email_subject\":\"You have a payout!\",\"email_message\":\"You have received a payout! Thanks for using our service!\"},\"items\":[{\"recipient_type\":\"EMAIL\",\"amount\":{\"value\":\"9.87\",\"currency\":\"USD\"},\"note\":\"Thanks for your patronage!\",\"sender_item_id\":\"201403140001\",\"receiver\":\"receiver@example.com\",\"alternate_notification_method\":{\"phone\":{\"country_code\":\"91\",\"national_number\":\"9999988888\"}},\"notification_language\":\"fr-FR\"},{\"recipient_type\":\"PHONE\",\"amount\":{\"value\":\"112.34\",\"currency\":\"USD\"},\"note\":\"Thanks for your support!\",\"sender_item_id\":\"201403140002\",\"receiver\":\"91-734-234-1234\"},{\"recipient_type\":\"PAYPAL_ID\",\"amount\":{\"value\":\"5.32\",\"currency\":\"USD\"},\"note\":\"Thanks for your patronage!\",\"sender_item_id\":\"201403140003\",\"receiver\":\"G83JXTJ5EHCQ2\"}]}\n\n@endpoint GET /v1/payments/payouts/{id}\n@desc Show payout batch details\n@required {id: str # The ID of the payout for which to show details.}\n@optional {fields: str # Shows details for only the specified fields., page: int=1 # A non-zero integer representing the page of the results., page_size: int # The maximum number of results to return at one time. Value is a non-negative, non-zero integer. If the user chooses pagination, the maximum page is `1000`., total_required: bool=false # Indicates whether to show the total items and total pages count in the response.}\n@returns(200) {total_items: int, total_pages: int, batch_header: map{payout_batch_id: str, batch_status: str, time_created: str(date-time), time_completed: str(date-time), time_closed: str(date-time), sender_batch_header: map{sender_batch_id: str, recipient_type: str, email_subject: str, email_message: str}, funding_source: str, amount: map{currency: str, value: str}, fees: map{currency: str, value: str}}, items: [map], links: [map]} # A successful request returns the HTTP `200 OK` status code and a JSON response body that shows batch payout details.\n@errors {404: Resource Not Found., 500: An internal server error has occurred.}\n\n@endpoint GET /v1/payments/payouts-item/{payout_item_id}\n@desc Show payout item details\n@required {payout_item_id: str # The ID of the payout item to cancel.}\n@returns(200) {payout_item_id: str, transaction_id: str, activity_id: str, transaction_status: str, payout_item_fee: map{currency: str, value: str}, payout_batch_id: str, sender_batch_id: str, payout_item: map{recipient_type: str, amount: map{currency: str, value: str}, note: str, receiver: str, sender_item_id: str, recipient_name: map{prefix: str, given_name: str, surname: str, middle_name: str, suffix: str, alternate_full_name: str, full_name: str}, recipient_wallet: str, purpose: str}, currency_conversion: map{from_amount: map{currency: str, value: str}, to_amount: map{currency: str, value: str}, exchange_rate: str}, time_processed: str(date-time), errors: map{name: str, message: str, debug_id: str, information_link: str, details: [map], links: [map]}, links: [map]} # A successful request returns the HTTP 200 OK status code and a JSON response body with a payout_item_details object, which contains data about a payout item including the transaction status.\n@errors {404: Resource Not Found., 500: An internal server error has occurred.}\n\n@endpoint POST /v1/payments/payouts-item/{payout_item_id}/cancel\n@desc Cancel unclaimed payout item\n@required {payout_item_id: str # The ID of the payout item to cancel.}\n@returns(200) {payout_item_id: str, transaction_id: str, activity_id: str, transaction_status: str, payout_item_fee: map{currency: str, value: str}, payout_batch_id: str, sender_batch_id: str, payout_item: map{recipient_type: str, amount: map{currency: str, value: str}, note: str, receiver: str, sender_item_id: str, recipient_name: map{prefix: str, given_name: str, surname: str, middle_name: str, suffix: str, alternate_full_name: str, full_name: str}, recipient_wallet: str, purpose: str}, currency_conversion: map{from_amount: map{currency: str, value: str}, to_amount: map{currency: str, value: str}, exchange_rate: str}, time_processed: str(date-time), errors: map{name: str, message: str, debug_id: str, information_link: str, details: [map], links: [map]}, links: [map]} # A successful request returns the HTTP `200 OK` status code with a JSON response body that shows payout item details.\n@errors {400: Request is not well-formed, syntactically incorrect, or violates schema., 404: Resource Not Found., 500: An internal server error has occurred.}\n\n@end\n"}}