Postman Guide
Use Postman to explore PayPal's REST APIs without a developer account. You can customize requests and receive responses for any of PayPal's core APIs.
You can test APIs right away by forking PayPal's Postman collection. To test an app from your Developer Dasard, plug in the app'sclient_id
and client_secret
.1. Fork the PayPal Postman collection
- Sign up or log in to an account on postman.com.
- Select the following Run in Postman button:
- Select Fork Collection.
- Name your fork and select a workspace.
2. Authenticate an app
Replace the default access token with aclient_id
and client_secret
from an app on the Developer Dasard.- On the Developer Dasard, find your
client_id
andclient_secret
under Dasard> Apps & Credentials. - In Postman, select your fork of the PayPal collection.
- Under the Variables tab, in the CURRENT VALUE column, enter your
client_id
andclient_secret
. - Select Save.
access_token
automatically. Use the access_token
to call any API in the collection on behalf of your app.3. Make API calls with Postman
This example uses the Orders API to create an order and capture payment using sandbox accounts linked to your Developer Dasard account. To find your sandbox account credentials, log into the Developer Dasard and select Sandbox> Accounts.To create an order:
- In your Postman workspace, navigate to your fork of the PayPal collection.
- Select Orders> Create Order> Send. On a successful call, the API returns a 201 order created response code.
- Find the approve link in the response.
- Open the approve link in a browser.
- Log in with your Developer Dasard sandbox personal account credentials.
Capture Payments
Capture payments in both your personal and business sandbox accounts as follows:
- Find the
id
in the response of the order you created and copy the value. - Select your fork of the PayPal collection.
- In the Variables tab, enter the value you copied in the
order_id
field. - Select Orders> Capture payment for order.
- Select Send. A successful call returns an HTTP
201 order created
response code.