PayOrc
Testing

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 Collection

What'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

  1. Open Postman.
  2. Click Import in the top-left corner.
  3. Select File and choose the downloaded collection JSON file.
  4. 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:

VariableInitial Value
urlhttps://api.payorc.com
merchant-keyYour merchant key
merchant-secretYour 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

  1. Expand the PayOrc Remote APIs collection in the left sidebar.
  2. Select an endpoint (e.g., Create Payment).
  3. Review the request body — sample data is pre-filled.
  4. Ensure the collection variables are set (Step 3 above).
  5. Click Send.

Understanding Variables

The collection uses Postman variables extensively. Here's how they work:

Variable Scopes

ScopePriorityDescription
EnvironmentHighestActive environment variables override all others
CollectionMediumVariables set at the collection level
GlobalLowestVariables 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:

FolderContents
PaymentsCreate, capture, void, and status-check endpoints
RefundsFull and partial refund endpoints
SettlementsSettlement details and listing endpoints
SubscriptionsSubscription plan management endpoints
InvoicesInvoice creation and management endpoints
WebhooksWebhook 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:

  1. Click Save As on the request tab.
  2. Choose a name (e.g., "My Test Payment").
  3. 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.

  1. Click the Runner button (or Ctrl+Shift+R).
  2. Select the PayOrc collection.
  3. Choose your environment.
  4. 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

IssueSolution
401 UnauthorizedCheck that merchant_key and merchant_secret are correct and match the active environment
403 ForbiddenEnsure you're using the correct key for the endpoint (e.g., S2S key for S2S endpoints)
Connection RefusedVerify the base_url is correct and your network allows outbound HTTPS
Empty ResponseCheck that the request body is valid JSON and includes all required fields
TimeoutIncrease the timeout in Postman settings (Settings → General → Request timeout)

On this page