Refund captured payment
documentedRefund a captured payment.
POST /v2/payments/captures/{capture_id}/refundPaymentsno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://api-m.paypal.com/v2/payments/captures/{{$capture_id}}/refund" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
-H "PayPal-Request-Id: {{$request_id}}" \
-H "Prefer: return=minimal" \
-H "PayPal-Auth-Assertion: {{PAYPAL_AUTH_ASSERTION}}" \
-d '{"amount": {"currency_code": "{{$currency_code}}", "value": "{{$amount}}"}, "invoice_id": "{{$invoice_id}}", "note_to_payer": "{{$note_to_payer}}"}'