Postman Collection
Import and use the PayOrc Postman collection to quickly test all API endpoints.
Postman Collection Overview
The PayOrc Postman collection provides a ready-to-use set of API requests for every PayOrc endpoint. It includes pre-configured headers, example request bodies, and environment variables — so you can start testing within minutes.
The Postman collection is the fastest way to validate your integration before writing code. Use it to confirm your API keys work and understand request/response formats.
Download
Download PayOrc Postman CollectionWhat's Included
The collection contains:
- All API endpoints with pre-configured authentication headers
- Environment variables for merchant-key, merchant-secret, and base URL
- Example request bodies for each endpoint with sample data
- Response examples for both success and error scenarios
- Organized folders grouping endpoints by category (Payments, Refunds, Settlements, etc.)
Importing the Collection
Step 1: Download the Collection
Download the Postman collection JSON file from the PayOrc Dashboard under Developers → API Keys → Postman Collection, or request it from your PayOrc account manager.
Step 2: Import into Postman
- Open Postman.
- Click Import in the top-left corner.
- Select File and choose the downloaded collection JSON file.
- Click Import to add it to your workspace.
Step 3: Set Collection Variables
The collection includes built-in variables. Click the PayOrc Remote APIs collection in the sidebar, then go to the Variables tab and update:
| Variable | Initial Value |
|---|---|
url | https://api.payorc.com |
merchant-key | Your merchant key |
merchant-secret | Your merchant secret |
The collection uses {{url}}, {{merchant-key}}, and {{merchant-secret}} as variable placeholders in every request. Setting these once means all endpoints are ready to use.
Running Requests
Making Your First API Call
- Expand the PayOrc Remote APIs collection in the left sidebar.
- Select an endpoint (e.g., Create Payment).
- Review the request body — sample data is pre-filled.
- Ensure the collection variables are set (Step 3 above).
- Click Send.
Understanding Variables
The collection uses Postman variables extensively. Here's how they work:
Variable Scopes
| Scope | Priority | Description |
|---|---|---|
| Environment | Highest | Active environment variables override all others |
| Collection | Medium | Variables set at the collection level |
| Global | Lowest | Variables available across all collections and environments |
Pre-Request Scripts
The collection includes pre-request scripts that automatically set authentication headers on every request. This means you don't need to manually add headers — just ensure your environment variables are set.
Testing Scripts
Response scripts validate the API response structure and display helpful messages in the Postman console. Open View → Show Postman Console (or Ctrl+Alt+C) to see these messages.
Organizing Your Workspace
Collection Folders
The collection is organized into folders by API category:
| Folder | Contents |
|---|---|
| Payments | Create, capture, void, and status-check endpoints |
| Refunds | Full and partial refund endpoints |
| Settlements | Settlement details and listing endpoints |
| Subscriptions | Subscription plan management endpoints |
| Invoices | Invoice creation and management endpoints |
| Webhooks | Webhook configuration and testing |
Saving Requests
After customizing a request (e.g., with your own test data), save it as a copy to avoid overwriting the original:
- Click Save As on the request tab.
- Choose a name (e.g., "My Test Payment").
- Save it in a personal folder within the collection.
Running Collection Tests
Postman can run all requests in the collection sequentially — useful for regression testing after code changes.
- Click the Runner button (or
Ctrl+Shift+R). - Select the PayOrc collection.
- Choose your environment.
- Click Run PayOrc.
Add the Postman runner to your CI/CD pipeline using Newman (Postman's command-line runner) to automatically validate your API integration on every deployment.
Troubleshooting
| Issue | Solution |
|---|---|
| 401 Unauthorized | Check that merchant_key and merchant_secret are correct and match the active environment |
| 403 Forbidden | Ensure you're using the correct key for the endpoint (e.g., S2S key for S2S endpoints) |
| Connection Refused | Verify the base_url is correct and your network allows outbound HTTPS |
| Empty Response | Check that the request body is valid JSON and includes all required fields |
| Timeout | Increase the timeout in Postman settings (Settings → General → Request timeout) |