Payments
Call the Payments API to authorize payments, capture authorized payments, refund payments that have already been captured, and show payment information. Use…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Call the Payments API to authorize payments, capture authorized payments, refund payments that have already been captured, and show payment information. Use the Payments API in conjunction with the Orders API . For more information, see the PayPal Checkout Overview .
Endpoints 8
authorizations
- GETShow details for authorized payment
/v2/payments/authorizations/:authorization_idShows details for an authorized payment, by ID. - POSTCapture authorized payment
/v2/payments/authorizations/:authorization_id/captureCaptures an authorized payment, by ID. - POSTReauthorize authorized payment
/v2/payments/authorizations/:authorization_id/reauthorizeReauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor… - POSTVoid authorized payment
/v2/payments/authorizations/:authorization_id/voidVoids, or cancels, an authorized payment, by ID. You cannot void an authorized payment that has been fully captured.
captures
- GETShow captured payment details
/v2/payments/captures/:capture_idShows details for a captured payment, by ID. - POSTRefund captured payment
/v2/payments/captures/:capture_id/refundRefunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an <code>amount</code>…
find-eligible-methods
- POSTFind a list of eligible payment methods.
/v2/payments/find-eligible-methodsGet a list of eligible payment methods based on the input parameters provided.
refunds
- GETShow refund details
/v2/payments/refunds/:refund_idShows details for a refund, by ID.
API details
- Base URL
https://api-m.paypal.com- Authentication
- OAuth 2.0 (client credentials flow) with 8 scopes
- Operations
- 8 operations on 8 pathsPOST 5GET 3
- Main resources
- authorizations 4captures 2find-eligible-methods 1refunds 1
- Response formats
application/json- Description format
- OpenAPI 3.0.4, API version
2.12 - Links
- OpenAPI document
- Listed from
- PayPal's published OpenAPI description (paypal/paypal-rest-api-specifications) (Apache-2.0)
How to test the Payments in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Payments collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (client credentials flow) with 8 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Show details for authorized payment” (GET /v2/payments/authorizations/:authorization_id), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Payments?
Call the Payments API to authorize payments, capture authorized payments, refund payments that have already been captured, and show payment information. Use… It is listed under Payments and has 8 endpoints.
Who publishes the Payments?
It is listed from PayPal's public API description (an OpenAPI document), not published by PayPal on Swastik Codes. Anyone who controls paypal.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Payments?
Requests go to https://api-m.paypal.com. Endpoint paths are added to this base URL.
How do I authenticate with the Payments?
With OAuth 2.0 (client credentials flow) with 8 scopes.
How many endpoints does the Payments have?
8 operations on 8 paths (5 POST, 3 GET). The largest groups are authorizations, captures, find-eligible-methods, refunds.
Is forking the Payments free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.