geowallet
    geowallet
    • Overview
    • Authentication
    • APIs
      • Ledger Balance
        • Get Balance of all ledgers
        • Get Balance for a single currency
      • Create a Quotation
        • quotations
      • Create a Transaction
        • Transaction
      • Transaction Query
        • Transaction Query
      • Transaction Status Webhook
    • Business Transaction API
      • Business to Business (B2B)
        • Transaction
      • Business to Person (B2P)
        • Transaction
      • B2P to mobile wallet
        • Transaction
      • Person to Business (P2B)
        • Transaction
      • Request parameter list
    • Response Codes & Messages
      • Generic Response
      • Beneficiary Validation Responses
      • Quote Response
      • Remit Response
    • Purpose, Source of Funds, and Relationship
      • P2P Purpose for Transaction
      • P2P Source of Funds
      • P2P Relationship
      • Person to Business
      • Business to Person
      • Business to Business
    • Country Specific Parameters list
    • Country Specific Recipient Documents
    • GeoSwift Verify (GSV)
    • About Us

    Authentication

    All requests to the GeoSwift Platform REST APIs must be authenticated using a multi-factor security model that combines application identity verification, scoped authorization, and cryptographically signed requests.
    To make an API call:
    1.
    Identify your application using your issued Client ID and API Key.
    2.
    Obtain a short-lived access token by exchanging your credentials via the token endpoint. This token includes permissions (scopes) that define what actions you’re authorized to perform.
    3.
    Sign every request with an HMAC-SHA256 signature derived from your secret key, ensuring the request hasn’t been altered in transit and isn’t being replayed.
    You can find your Client ID, API Key, and Secret Key in the GeoSwift Partner Dashboard under API Credentials.
    All requests to the GeoSwift API must be authenticated using a three-layer security model that enforces:
    Application identity verification,
    Scoped authorization, and
    Cryptographically verified request integrity with anti-replay protection.
    This layered approach adheres to established industry best practices for financial-grade APIs, ensuring robust security, regulatory compliance, and resilience against credential compromise, request tampering, and replay attacks.

    🔐 Security Model Overview#

    LayerPurposeMechanism
    1. Application IdentityVerifies which registered application is initiating the requestGS-API-Key + GS-Client-ID
    2. Scoped AuthorizationGrants least-privilege access based on pre-approved permissionsShort-lived OAuth 2.0 Bearer Token with explicit scopes
    3. Request Integrity & Anti-ReplayGuarantees the request has not been altered or replayedHMAC-SHA256 signature over critical request components, combined with timestamp and nonce
    ✅ All three layers are mandatory for all write operations (e.g., creating transactions). Read operations may optionally relax Layer 3 in low-risk environments, but full enforcement is strongly recommended in production.

    🔑 Step 1: Obtain an Access Token#

    Before invoking any business endpoint, obtain a scoped access token using your issued credentials.

    Endpoint#

    Headers#

    HeaderRequiredExample
    GS-API-KeyYesgs_live_abc123def456789
    GS-Client-IDYespartner_corp_xyz
    Content-TypeYesapplication/json

    Request Body#

    {
      "grant_type": "client_credentials",
      "scope": "remittance:write verification:read"
    }
    💡 Supported Scopes (examples):
    remittance:write
    verification:read
    transaction:read
    webhook:manage

    Response (200 OK)#

    {
      "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.xxxxx",
      "token_type": "Bearer",
      "expires_in": 3600,
      "scope": "remittance:write verification:read"
    }

    Step 2: Call a Business API#

    Include the token and cryptographic headers in all subsequent requests.

    Example: Create a Remittance#

    Required Headers#

    HeaderDescription
    AuthorizationBearer <access_token> obtained in Step 1
    GS-API-KeyYour issued API key (must match the one used to obtain the token)
    GS-TimestampUnix timestamp in seconds. Requests with |now - timestamp| > 300 are rejected.
    GS-NonceRandom string (≥16 characters), unique per request
    GS-SignatureBase64-encoded HMAC-SHA256 signature (see below)
    Idempotency-KeyUUID v4. Required for all non-idempotent methods (POST, PATCH) to prevent duplicate processing

    Step 3: Generate the Request Signature#

    To ensure end-to-end request integrity and prevent tampering, every request must include an HMAC-SHA256 signature in the GS-Signature header.

    3.1 Signature Payload Construction#

    The signature payload is constructed by joining the following components with a pipe character (|) as a delimiter. Do not include trailing or leading pipes.
    Payload Pattern:
    HTTP_METHOD|URL_PATH|REQUEST_BODY|TIMESTAMP|NONCE
    Components:
    ComponentDescriptionExample
    HTTP_METHODUppercase HTTP methodPOST, GET, PUT, DELETE
    URL_PATHThe request path (excluding domain and query parameters)/api/v1/payments
    TIMESTAMPMust match the X-Timestamp header.1709123456
    NONCEA unique random string for each requesta1b2c3d4e5f6g7h8
    REQUEST_BODYThe raw request body string. Use empty string if no body{"name":"John"}, `` (empty)
    Important: The payload is case-sensitive. Ensure the REQUEST_BODY is the exact raw string being sent in the HTTP request (minify JSON to avoid whitespace discrepancies).

    HMAC Algorithm (Java Example)#

    3.2 Handling the secretKey#

    The secretKey is a secret key that is used solely for signing API requests to ensure that the requests are authentic and have not been tampered with during transmission. It is never shared publicly and should be kept confidential.
    Where to Obtain the secretKey
    The secretKey is provided when you create your API credentials in the GeoSwift Partner Dashboard. It is a sensitive piece of information and should only be used in the backend of your application.
    Storage of the secretKey
    It should be stored securely in your backend system, using environment variables or a secrets management service (e.g., AWS Secrets Manager or HashiCorp Vault).
    Use in Signing
    The secretKey is used in the HMAC-SHA256 signing process, as shown in the example code above, to generate the signature. This ensures that the request's integrity is verified and that the request comes from an authorized source.

    Common Error Responses#

    StatusError CodeMessageCause
    401 UnauthorizedINVALID_TOKEN"Access token is missing, expired, or invalid"Invalid or missing Authorization header
    403 ForbiddenINSUFFICIENT_SCOPE"Token lacks required scope: remittance:write"Token does not include necessary permission
    400 Bad RequestINVALID_SIGNATURE"Request signature verification failed"HMAC mismatch due to tampering or incorrect secret
    400 Bad RequestTIMESTAMP_TOO_OLD"Request timestamp exceeds allowed window (±300s)"Clock skew or replay attempt
    400 Bad RequestMISSING_IDEMPOTENCY_KEY"Idempotency-Key is required for this operation"Omitted for state-changing request

    Additional Security Controls#

    Transport Security: All endpoints require TLS 1.2 or higher.
    Credential Rotation: API keys and secrets can be rotated via the Partner Dashboard without service interruption.
    Network Restrictions: Partners may configure IP allowlists to restrict API access to known sources.
    Webhook Verification: Incoming event notifications are signed using a dedicated webhook secret (separate from the API secret).
    Auditability: Every request is logged with GS-API-Key, token scope, source IP, and timestamp for forensic analysis.
    Modified at 2026-03-12 10:41:51
    Previous
    Overview
    Next
    Ledger Balance
    Built with