Payvala

Assistant

Payvala Assistant

Suggestions

Press Enter to send · Shift+Enter for new line

Developer / SDKs

Payvala SDKs

Integrate with the Payvala API from your server-side application. Pick your language, install the SDK, configure credentials for the right environment, and send your first request.

Choose your SDK

Select the SDK that matches your server-side stack. Your selection carries through the installation and initialization sections below.

  • Available Released and documented.
  • Coming soon Planned; not yet released.
  • Unsupported No Payvala SDK. Use the REST API directly.
  • Node.js

    Available

    Integrate Payvala APIs into Node.js server applications.

    Language
    JavaScript / TypeScript
    Package manager
    npm
    Package
    To be confirmed
    Version
    To be confirmed
    Minimum runtime
    To be confirmed
    Capabilities
    To be confirmed
    Node.js docs
  • Java

    Available

    Integrate Payvala services into Java server applications.

    Language
    Java
    Package manager
    Maven
    Package
    To be confirmed
    Version
    To be confirmed
    Minimum runtime
    To be confirmed
    Capabilities
    To be confirmed
    Java docs
  • Python

    Coming soon

    The Payvala Python SDK is not released yet.

    Language
    Python
    Package manager
    pip
    Package
    To be confirmed
    Version
    To be confirmed
    Minimum runtime
    To be confirmed
    Capabilities
    To be confirmed
    Python docs
  • Go

    Coming soon

    The Payvala Go SDK is not released yet.

    Language
    Go
    Package manager
    Go Modules
    Package
    To be confirmed
    Version
    To be confirmed
    Minimum runtime
    To be confirmed
    Capabilities
    To be confirmed
    Go docs

Installation and requirements

Install the SDK with your package manager.

Install (npm)Placeholder
npm install @payvala/<actual-package-name>
ImportPlaceholder
const <SdkModule> = require('@payvala/<actual-package-name>');

Minimum Node.js version: To be confirmed

Before you begin

  • Onboarded organization

    Your organization is registered in the Payvala portal (POEMS) and you have admin access.

  • Payvala-issued mTLS client certificate

    Presented on every API call, including the OAuth token endpoint. Keep the private key in an HSM or hardware-backed secrets manager.

  • Registered egress IPs

    Register your outbound IP addresses or CIDR ranges in POEMS, separately for Staging and Production.

  • Credentials

    Master key credentials for tokens, an access key pair for request signing, and at least one authorization code.

  • TLS 1.3 and network access

    Enforce TLS 1.3 with strict server certificate validation, and allow the payvala.com domain through your firewalls.

  • Synchronized clock

    Enable NTP on every system that signs requests. Clock drift beyond the allowed tolerance causes requests to be rejected.

Replace placeholder package information with the details published for your selected SDK. Minimum language runtime versions are shown once confirmed.

Authentication

Payvala API calls are protected by layered controls: mutual TLS, an OAuth 2.0 access token, and, for transaction requests, an HMAC signature. The SDK is configured with the credentials below; run it only on servers you control.

CredentialFieldsWhere it comes fromUsed for
mTLS client certificateCertificate and private keyIssued by Payvala for your organization.Identifies your system on every call. Access tokens are bound to this certificate.
Master keyMasterKeyId, MasterKeySecretIssued by Payvala; generated in POEMS by a Super Admin.Requesting OAuth access tokens (client_credentials grant).
Access key pairAccessKeyId, AccessKeyGenerated in POEMS or through the Generate Secret Credentials API.HMAC request signing. AccessKeyId is public; AccessKey is a secret.
Authorization codeAuthCodeGenerated in POEMS or through the Generate Authorization Code API. At least one is required.Classifying and segmenting transactions. Sent as authCode in the payload.

How a request is authenticated

  1. Step 1

    Connect over mTLS

    Present your client certificate on a TLS 1.3 connection.

  2. Step 2

    Request an access token

    POST the master key credentials to /oauth/token. The token is a short-lived Bearer JWT.

  3. Step 3

    Call the API

    Send the token in the Authorization header. Transaction requests also carry the signature headers below.

  4. Step 4

    Reuse, then renew

    Cache the token for its 15-minute lifetime (ExpiresIn: 900), then request a new one.

Headers on transaction requests

HeaderValue
AuthorizationBearer <access token>. Never place the token in payloads or logs.
x-access-key-idYour AccessKeyId.
x-timestampRequest timestamp, ISO 8601.
x-nonceUnique value per request (UUID).
x-signatureHMAC-SHA256 signature of the request.

Signature

HMAC-SHA256
HMAC_SHA256(accessKey, accessKeyId + requestId + txnId + timestamp + nonce + payload)
  • Concatenate the values in the order shown, encoded as UTF-8.
  • Output is lowercase hexadecimal.
  • Depending on your environment configuration, JWE payload encryption and JWS signing may also apply.

Keep credentials server-side

  • Store secrets and private keys in an HSM or hardware-backed secrets manager.
  • Read credentials from environment variables or your secrets manager at startup.
  • Never hardcode secrets or commit them to source control.
  • Redact secrets, tokens and personal data from logs and monitoring tools.
  • Rotate credentials before they expire and keep an overlap window to avoid downtime.

Never expose

  • AccessKey and MasterKeySecret
  • Private keys, including the mTLS private key
  • Access tokens
  • Any credential in browser, mobile-app or other client-side code, URLs, error messages or logs
Authentication guide

Configuration

The concepts below come from the Payvala API. "SDK option" shows the exact option name once the SDK confirms it.

SettingStatusSDK optionDescriptionSuggested env var
EnvironmentDocumentedTo be confirmedStaging or Production. Credentials, keys, tokens and certificates are not interchangeable between them.PAYVALA_ENVIRONMENT
Base URLsDocumentedTo be confirmedTwo services per environment: partner-service (tokens, credentials) and api (transaction notifications). See Environments below.—
Master keyDocumentedTo be confirmedMasterKeyId and MasterKeySecret, used to request access tokens.PAYVALA_MASTER_KEY_ID / PAYVALA_MASTER_KEY_SECRET
Access key pairDocumentedTo be confirmedAccessKeyId and AccessKey, used for HMAC request signing.PAYVALA_ACCESS_KEY_ID / PAYVALA_ACCESS_KEY
Authorization codeDocumentedTo be confirmedSent as authCode on transaction requests.PAYVALA_AUTH_CODE
mTLS certificate and keyDocumentedTo be confirmedPayvala-issued client certificate and its private key.PAYVALA_MTLS_CERT_PATH / PAYVALA_MTLS_KEY_PATH
Payload security modeDocumentedTo be confirmedJWE encryption, JWS signing and response encryption are set per environment in POEMS. Your integration must match.—
TimeoutUnconfirmedTo be confirmedNo default or configurable timeout is documented yet.—
Retries and backoffUnconfirmedTo be confirmedYour integration must implement retry with exponential backoff. Whether the SDK retries automatically is not confirmed.—

Environment variable names are suggestions used in these examples. They are not defined by Payvala or the SDK.

Never expose credentials in client-side code, public repositories or logs.

Initialize the SDK

Create one client at application startup and reuse it for all requests.

Node.jsExample structure
const client = new <ClientClass>({

  <environmentOption>: '<staging | production>',

  <masterKeyIdOption>: process.env.PAYVALA_MASTER_KEY_ID,

  <masterKeySecretOption>: process.env.PAYVALA_MASTER_KEY_SECRET,

  <accessKeyIdOption>: process.env.PAYVALA_ACCESS_KEY_ID,

  <accessKeyOption>: process.env.PAYVALA_ACCESS_KEY,

  // mTLS client certificate + private key: option names to be confirmed

});

Example structure — replace with the official SDK initialization API.

Class and option names in angle brackets are placeholders until the official SDK API is published here.

Make your first request

Every integration starts the same way: authenticate, then call an API. The SDK is expected to wrap the token request for you.

  1. Install

    Add the SDK for your language.

  2. Configure credentials

    Load the credentials for one environment from your secrets store.

  3. Initialize the client

    Create the client with your environment and credentials.

  4. Call the API

    Request a token, then call an operation such as Send transaction notification.

  5. Handle the response

    Check status and code. Handle errors as described below.

textExample structure
response = client.<sdkMethod>({

  <parameter>: <value>

})



// Check response.status and response.code before continuing.

Example structure — replace with the official SDK method for this operation.

The same call over plain HTTP

Until SDK method names are published, this shows the underlying token request using the documented endpoint and fields.

Request an access token (Staging)Illustrative
curl --request POST "https://stage-partner-service.payvala.com/oauth/token" \\

  --cert <CLIENT_CERT_FILE> --key <CLIENT_KEY_FILE> \\

  --header "Content-Type: application/json" \\

  --data '{

    "MasterKeyId": "<MASTER_KEY_ID>",

    "MasterKeySecret": "<MASTER_KEY_SECRET>",

    "GrantType": "client_credentials"

  }'

Illustrative. If JWE/JWS payload protection is enabled for your environment, the body must be encrypted or signed accordingly.

API capabilities

These are the operations in the Payvala API that an SDK wraps. The SDK method column fills in as each method is confirmed.

Authentication

Obtain a short-lived OAuth access token for all other calls.

OperationEndpointRequiresSDK method
Get access tokenAuthenticates your organization and returns a Bearer token valid for 900 seconds.POST/oauth/tokenService: partner-servicemTLS + master keyTo be confirmed

Credential management

Manage access keys and authorization codes without using the portal.

OperationEndpointRequiresSDK method
Generate secret credentialsCreates an AccessKey and AccessKeyId for HMAC signing. The secret is returned once.POST/organization/generate-secret-credentialsService: partner-serviceBearer tokenTo be confirmed
Generate authorization codeCreates an authorization code with a description. Used to classify transactions.POST/organization/generate-auth-codeService: partner-serviceBearer tokenTo be confirmed
List secret keysLists keys with status and expiry for monitoring and rotation planning.GET/organization/secret-keysService: partner-serviceBearer tokenTo be confirmed
List authorization codesLists the authorization codes for your organization.GET/organization/auth-codesService: partner-serviceBearer tokenTo be confirmed
Change secret key statusActivate, deactivate or permanently retire a key. Status is activate, deactivate or retire.POST/organization/secret-key/{secretKeyId}/{status}Service: partner-serviceBearer tokenTo be confirmed

Transaction notification

Push a credit event so the merchant’s Soundbox or Virtual Soundbox announces it. Maximum request size is 8 KB.

OperationEndpointRequiresSDK method
Send transaction notificationDelivers a payment event to a merchant device. txnId acts as the idempotency key.POST/message/sendService: apiBearer token + HMAC headersTo be confirmed

Public key discovery

Retrieve Payvala’s public keys (JWKS) used for JWE payload encryption. Keys are identified by kid to support rotation.

OperationEndpointRequiresSDK method
Get JWKSReturns the public encryption keys (EC P-256, ECDH-ES).The integration spec lists this endpoint as POST. Confirm the method before publishing.Method TBC/well-known/jwks.jsonService: partner-serviceSee API referenceTo be confirmed

Advanced machine-to-machine APIs

Automate organization configuration, credential rotation and device onboarding without the portal. Provided under an addendum after security validation and approval.

Only operations documented in the Payvala API are listed. SDK coverage per language is confirmed separately.

Requests and responses

Each SDK method maps to one HTTP request. Use the API reference for the full schema of every operation.

  1. SDK method
  2. HTTP method
  3. API endpoint
  4. Request
  5. Payvala API
  6. Response
SDK method
To be confirmed
HTTP method
POST
Endpoint
/oauth/token
Request bodyIllustrative
{

  "MasterKeyId": "<MASTER_KEY_ID>",

  "MasterKeySecret": "<MASTER_KEY_SECRET>",

  "GrantType": "client_credentials"

}
Response bodyIllustrative
{

  "code": <integer>,

  "status": true,

  "message": "<message>",

  "data": {

    "AccessToken": "<JWT>",

    "TokenType": "Bearer",

    "ExpiresIn": 900

  }

}

Values in angle brackets are placeholders. Field names and types come from the Payvala API specification.

Environments

Build locally, test end to end in Staging, then go live in Production.

  1. Development
  2. Staging
  3. Production
  • Development

    Your own machines and test infrastructure. Payvala does not publish a separate development host.

  • Staging (also called Sandbox)

    Payvala-hosted environment for integration testing and certification.

    partner-service
    stage-partner-service.payvala.com
    api
    stage-api.payvala.com
  • Production

    Live transaction processing, for approved integrations.

    partner-service
    partner-service.payvala.com
    api
    api.payvala.com
  • Credentials, tokens, keys and certificates issued for Staging do not work in Production.
  • Register egress IPs in POEMS separately for each environment.
  • Keep configuration for each environment in separate secrets and deployment settings.
  • Complete testing in Staging before enabling Production.
Sandbox guide

Secure. Reliable. Scalable.

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