Payvala

Assistant

Payvala Assistant

Suggestions

Press Enter to send ยท Shift+Enter for new line

Sandbox Overview

The Payvala Sandbox is a separate environment for building and verifying your integration. It accepts the same kinds of API requests as Production, but requests use Sandbox credentials, target the Sandbox base URL, and operate on test data.

Use the Sandbox to develop request logic, inspect responses, handle errors, and confirm webhook handling before any live traffic is involved. Build and validate your integration here first, then switch configuration to Production.

The Sandbox supports the following activities:

Develop

Write and iterate on integration code without affecting live systems.

Verify

Check that request payloads, headers, and response parsing match the API contract.

Debug

Reproduce failures repeatedly and inspect the exact request and response involved.

Validate

Confirm end-to-end behavior, including asynchronous events, before deployment.

Environment isolation. Sandbox data and activity are isolated from Production where applicable. Objects created in Sandbox are not visible in Production, and Sandbox credentials are not accepted by Production.
Replace before publishing. Values shown as <SANDBOX_BASE_URL>, <SANDBOX_API_KEY>, <SANDBOX_CLIENT_ID>, <SANDBOX_CLIENT_SECRET>, <TEST_ACCOUNT_ID>, and <PRODUCTION_BASE_URL> are placeholders and must be replaced with confirmed Payvala values. Statements marked [confirm] are not verified.

Sandbox vs Production

The two environments use the same integration pattern but are separate in base URL, credentials, and data. Use Sandbox while building, changing, or debugging an integration and when running automated tests. Use Production only after your integration has passed Sandbox validation and your account is approved for live access.

Environment comparison

AttributeSandboxProduction
PurposeDevelopment, testing, and debuggingLive operation
Base URL<SANDBOX_BASE_URL><PRODUCTION_BASE_URL>
CredentialsSandbox credentials onlyProduction credentials only
DataTest dataLive data
TransactionsSimulated, no real movement of funds [confirm]Real
WebhooksDelivered to endpoints registered for Sandbox [confirm]Delivered to endpoints registered for Production
Rate limits[confirm; may differ from Production][confirm]
Impact of mistakesNo live impactAffects live operations
Unconfirmed rows. Rows marked [confirm] describe common environment distinctions and are not confirmed statements about Payvala. Verify each before publication.

Getting Sandbox Access

Follow these steps to obtain Sandbox access. Navigation paths and UI labels are not confirmed and are described generically.

1

Create or access your Payvala account

Sign in with an existing account or register a new one. [Confirm whether account verification is required for Sandbox.]

2

Open the Sandbox environment

Go to the developer area at <DASHBOARD_URL> and select the Sandbox environment. [Confirm navigation and labels.]

3

Create or select an application

If credentials are grouped by application, create one for your integration. [Confirm whether this step applies.]

4

Generate Sandbox credentials

Create the credentials required for authentication. The credential type is described in Authentication in Sandbox.

5

Store credentials securely

Save credentials in a secrets manager or environment variables. Never commit them to source control.

Before you start

  • A Payvala account with access to the developer area
  • A role that allows creating and viewing credentials [confirm role names, if applicable]
  • A secure place to store credentials, such as a secrets manager
Treat Sandbox secrets as secrets. Sandbox credentials grant access to your Sandbox account. Keep them out of client-side code, logs, and repositories, and rotate them if exposed.

Sandbox Configuration

Keep environment-specific values in configuration, not in code. This lets you switch between Sandbox and Production by changing environment variables only.

Environment variables (API key)

Use these values if API-key authentication applies.

bash
PAYVALA_ENVIRONMENT=sandbox
PAYVALA_BASE_URL=<SANDBOX_BASE_URL>
PAYVALA_API_KEY=<SANDBOX_API_KEY>

Environment variables (client credentials)

Use these values if client ID and secret authentication applies.

bash
PAYVALA_ENVIRONMENT=sandbox
PAYVALA_BASE_URL=<SANDBOX_BASE_URL>
PAYVALA_CLIENT_ID=<SANDBOX_CLIENT_ID>
PAYVALA_CLIENT_SECRET=<SANDBOX_CLIENT_SECRET>

Loading configuration in application code

Read values once and fail at startup if required values are missing.

typescript
export const payvalaConfig = {
  environment: process.env.PAYVALA_ENVIRONMENT,
  baseUrl: process.env.PAYVALA_BASE_URL,
  apiKey: process.env.PAYVALA_API_KEY,
};

if (!payvalaConfig.baseUrl || !payvalaConfig.apiKey) {
  throw new Error("Missing Payvala configuration");
}

Configuration recommendations

  • Add the environment file to .gitignore
  • Use separate configuration for development, CI, and staging
  • Log the active environment name at startup, never the credentials
  • Keep Sandbox and Production values in separate secret stores
Replace before publishing. Replace all angle-bracket values with confirmed Payvala values. If SDKs provide an environment option, document it here.

Authentication in Sandbox

Authenticate every Sandbox request with Sandbox credentials. Production credentials are rejected by Sandbox, and Sandbox credentials are rejected by Production.

The authentication scheme for Payvala is not confirmed in the source material. The examples below are illustrative. Keep the one that applies and remove the other.

Authentication failures

CauseExpected behaviorAction
Missing or malformed credentialsRequest rejected as unauthenticated [confirm status code and body]Check the header name and format
Wrong-environment credentialsRequest rejected [confirm error code]Use Sandbox credentials with the Sandbox base URL
Expired or revoked credentialsRequest rejected [confirm token lifetime if tokens are used]Generate new credentials and update configuration

Example: API key in a request header (placeholder)

Illustrative only. Replace the header format with Payvala's confirmed scheme.

bash
curl "<SANDBOX_BASE_URL>/<ENDPOINT_PATH>" \
  -H "Authorization: Bearer <SANDBOX_API_KEY>"

Example: exchanging client credentials for a token (placeholder)

Illustrative alternative. Use only if Payvala confirms client-credentials authentication.

bash
curl -X POST "<SANDBOX_BASE_URL>/<TOKEN_ENDPOINT_PATH>" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "<SANDBOX_CLIENT_ID>",
    "client_secret": "<SANDBOX_CLIENT_SECRET>"
  }'

Making Your First Sandbox Request

Start with a simple read-only request to confirm that your base URL and credentials are correct. A successful response confirms your configuration before you build more complex flows.

Request

Replace the path with a confirmed read-only endpoint.

bash
curl "<SANDBOX_BASE_URL>/<FIRST_REQUEST_ENDPOINT_PATH>" \
  -H "Authorization: Bearer <SANDBOX_API_KEY>" \
  -H "Accept: application/json"

Response (shape to be confirmed)

Replace with the confirmed response for the chosen endpoint.

json
{
  "<RESPONSE_FIELDS>": "Replace with the confirmed response"
}

If the request fails, check

  • The base URL is the Sandbox URL, not Production
  • The credential is a Sandbox credential and has not been revoked
  • The authentication header name and format match Payvala's documentation
  • The endpoint path and HTTP method are correct
  • Your network or proxy is not blocking outbound HTTPS

Testing API Flows

Test each flow your integration uses from request through to its final state. For every flow, verify the request you send, the synchronous response, and any asynchronous update delivered later.

1

Start with one successful flow

Run a single flow end to end and confirm each response matches the documented contract.

2

Record requests and identifiers

Save each request, response, and returned identifier so failures can be reproduced and traced.

3

Cover every resource state

Confirm your system handles every documented state of a resource, not only the success state.

4

Retrieve created resources

Fetch resources by identifier and confirm the stored data matches what you created.

5

Automate the flow

Turn the verified flow into an integration test that runs against Sandbox.

Flow test plan (fill in with confirmed Payvala flows)

FlowWhat to verifyExpected outcome
<FLOW_NAME_1>Valid request is accepted and returns the documented response[confirm]
<FLOW_NAME_2>Resource moves through its documented states[confirm]
RetrievalCreated resources can be fetched by identifier[confirm]
Idempotent retriesRepeating a request does not create duplicates[confirm support]
Needs confirmation. List the actual Payvala flows, their endpoints, and how Sandbox simulates outcomes. Do not document simulated behavior until Payvala confirms it.

Testing Errors & Edge Cases

Production traffic includes invalid input, expired credentials, and transient failures. Exercise these cases in Sandbox so that your error handling is tested before deployment.

Error scenarios to cover

ScenarioHow to triggerWhat to verify
Invalid or missing fieldOmit a required field or send a malformed valueValidation error is surfaced and not retried blindly
Authentication failureUse an invalid or revoked Sandbox credentialCode stops and alerts rather than looping
Resource not foundRequest an identifier that does not existNot-found response is handled
Rate limiting[confirm]Code backs off and retries safely
Server error[confirm whether Sandbox can simulate]Code retries with backoff without duplicating side effects
TimeoutSet a short client timeoutCode can reconcile request status afterwards

Error response (shape to be confirmed)

Replace with Payvala's confirmed error format.

json
{
  "error": {
    "code": "<ERROR_CODE>",
    "message": "<ERROR_MESSAGE>"
  }
}
Do not publish unconfirmed triggers. Add special test inputs that produce specific failures only after Payvala confirms them. Do not document guessed values.

Testing Webhooks

If Payvala notifies your system of events through webhooks, test the receiving endpoint in Sandbox before relying on it in Production.

1

Expose an HTTPS endpoint

Your endpoint must be reachable from Payvala. During local development, use a tunneling tool to expose your machine.

2

Register the endpoint for Sandbox

Add the URL as a Sandbox webhook endpoint. [Confirm where and how this is done.]

3

Trigger an event

Run a Sandbox flow that produces an event, or use a test-event feature if available. [Confirm.]

4

Verify receipt and processing

Confirm your endpoint receives the event, validates it, and responds quickly with a success status.

Minimal receiver (illustrative)

Verify, enqueue, and acknowledge. The signature scheme is not confirmed.

typescript
app.post("/webhooks/payvala", express.raw({ type: "application/json" }), (req, res) => {
  // 1. Verify the signature using <SIGNATURE_HEADER_NAME> [confirm scheme]
  // 2. Parse the event and enqueue it for processing
  // 3. Acknowledge immediately
  res.sendStatus(200);
});

Webhook handler requirements

  • Verify authenticity of each event before processing [confirm signing method]
  • Respond with a success status quickly and process work asynchronously
  • Handle duplicate deliveries safely
  • Do not depend on event ordering [confirm Payvala's guarantees]
  • Handle retries after failure [confirm retry policy]
Needs confirmation. Confirm event names, payload schema, signature scheme, retry policy, and whether Sandbox offers event replay or a test-event tool.

Sandbox Data & Test Scenarios

Sandbox uses test data. Objects created with Sandbox credentials exist only in Sandbox and are not carried over to Production. Identifiers from Sandbox must not be reused in Production.

Test data reference (all values pending confirmation)

ItemValueBehavior
Test account<TEST_ACCOUNT_ID>[confirm]
Success scenario input<TEST_VALUE_SUCCESS>[confirm]
Failure scenario input<TEST_VALUE_FAILURE>[confirm]
Pending scenario input<TEST_VALUE_PENDING>[confirm]
Data retention and reset[confirm][confirm whether and when Sandbox data is reset]
Do not use real data. Never enter real personal, payment, or account information in Sandbox.

Sandbox Limitations

Sandbox is a testing environment and does not reproduce every aspect of Production. Passing Sandbox tests does not guarantee identical behavior in Production.

Differences to account for

  • Transactions are simulated and have no real-world effect [confirm]
  • Timing of asynchronous events may differ from Production [confirm]
  • Rate limits and quotas may differ from Production [confirm]
  • Third-party and network integrations may be simulated or unavailable [confirm which]
  • Some features may be unavailable or behave differently [confirm list]
  • Availability and maintenance windows may differ from Production [confirm]
Needs confirmation. Replace this list with the confirmed Payvala limitations. The items above are common categories, not stated facts about Payvala.

Moving to Production

Before switching to Production, confirm that your integration works in Sandbox and that your account is enabled for live access.

1

Complete Sandbox validation

Confirm all required flows, error paths, and webhooks pass in Sandbox.

2

Request Production access

Complete Payvala's Production access process. [Confirm process, approval requirements, and support contact.]

3

Switch configuration

Replace Sandbox values with Production values using environment configuration, not code changes.

4

Register Production webhooks

Add Production webhook endpoints separately from Sandbox registrations.

5

Verify and monitor

Run a minimal live check, then monitor error rates, webhook processing, and reconciliation before ramping up traffic.

Values to change

SettingSandboxProduction
PAYVALA_ENVIRONMENTsandboxproduction
PAYVALA_BASE_URL<SANDBOX_BASE_URL><PRODUCTION_BASE_URL>
CredentialsSandbox credentialsProduction credentials
Webhook endpointsSandbox registrationsProduction registrations

Pre-launch checklist

  • All required flows pass end to end in Sandbox
  • Error and edge cases are handled and tested
  • Webhook handling is verified, including duplicates and failures
  • Secrets are stored securely and absent from source control and logs
  • Logging, monitoring, and alerting are in place
  • Production access has been requested and approved

Ready to build?

Review the API reference, then confirm your version before going live.

Secure. Reliable. Scalable.

Payvala is built with enterprise-grade security, 99.9% uptime, and scalable infrastructure.