whalet
    English
    • 简体中文
    • English
    • Integration Guide
    • Appendix
    • Authorize
      • Obtain Token
        POST
      • File Upload
        POST
    • Connectivity
      • Webhook
        • connectivityNotify
      • connectivity
        POST
    • User Onboarding
      • Onboarding
        • User Onboarding Apply
      • Supplemental information (EDD)
        • Edd Replenish Query
        • Edd Replenish Submit
      • Webhook
        • User Onboarding Result Notification
        • Edd Replenish Notify
        • Edd Replenish Result Notify
    • Payee
      • Card Holder
        • Card Holder Apply
        • Card Holder Query
        • Card Holder Beneficary Apply
        • Card Holder Beneficary Query
      • Virtual Account
        • Cross-border B2B collection
          • Virtual Account Apply for B2B
          • Channel Banks Query for B2B
        • E-commerce B2C collection
          • Virtual Account Apply for B2C
          • Platform Query for B2C
          • Card Holder Query for B2C
          • Card number Query for B2C
          • Bind/Unbind Shop for B2C
          • Cancel Collection Card ((Card Cancel for B2C))
          • Card Detail Query for B2C
          • Shop Query for B2C
          • Card Query for B2C
          • Apply Bank Letter (Bank Letter Apply For B2C)
      • Order (Order)
        • Cross-border collection (Trade Order)
          • Trade Order Apply for B2B
          • Trade Order Query Detail for B2B
          • Trade Order Query List for B2B
          • Trade Order Bind Apply for B2B
        • E-commerce collection (Shop Order)
          • Query the results of the uploaded order for B2C
          • Shop Order Upload for B2C
      • Webhook
        • mockPayeeNotify
        • Card Holder Result Notification
        • Card Holder Beneficary Result Notify
        • Virtual Account Notify for B2C
        • Payee Received Notify
        • Trade Order Bind Notify for B2B
        • Shop Bind/Unbind/Add Result Notify for B2C
        • Card Cancel Result Notify for B2C
        • Upload Order Result Notify for B2C
    • Acquiring
      • Integration Method
      • Payment Method
      • Test Data
      • Shop
        • Get available payment methods
        • Add Store
        • Query Store Details
        • Apply shop payment methods
      • Hosted Payment Page
        • Create Payment Link
      • Embedded Payment
        • Integration Method
        • Create Payment Session
        • Query Payment Session
      • Direct Payments
        • Create Payment
        • Get Card Details
        • Get bank list
      • Detail (Detail)
        • Query Transaction Information
      • Cancel (Cancel)
        • Cancel payment transaction request
      • Refund (Refund)
        • Refund Request
      • Chargeback (Chargeback)
        • Chargeback Details
        • Query Chargeback Reason
        • Chargeback Appeal
        • Chargeback Accept
      • Webhook
        • Add store result notification
        • Store payment method application result notification
        • Payment Created Notification
        • Payment Result Notification
        • Refund Result Notification
        • Chargeback Raised Notification
        • Chargeback Result Notification
        • Fraud Notification
      • Plugin
        • WordPress/WooCommerce plugin installation guide
        • Shoplazza installation guide
      • Logistics (Logistics)
        • Supplement order logistics information
    • Whalet Card (VCC)
      • Whalet Card Wallet (Account/Wallet)
        • Enable Whalet Card wallet
        • Whalet Card Wallet Query
        • Whalet Card Wallet Top-up
        • Wallet Transaction Query
      • Whalet Card management (Card)
        • Available card BIN query
        • Create Whalet Card
        • Query Whalet Card Information
        • Close Whalet Card
        • Lock Whalet Card
        • Unlock Whalet Card
        • Whalet Card Top-up
        • Whalet Card Withdrawal
        • Whalet Card Transaction Query
      • Webhook
        • Whalet Card Created Notification
        • Whalet Card Canceled Notification
        • Whalet Card Locked Notification
        • Whalet Card Unlocked Notification
        • Whalet Card Transaction Notification
        • Whalet Card wallet transaction notification
    • Purchase
      • Webhook
        • Pay Result Notify
      • Pay Apply
      • Pay Confirm
    • Payout
      • Webhook
        • Payout Result Notify
        • Beneficiary Account Result Notify
      • Get Payout Apply Info
      • Payout Apply
      • Payout Confirm
      • Rate Inquiry
      • Beneficiary Account Fields Query
      • Beneficiary Account Apply
      • Beneficiary Account Delete
      • Beneficiary Account Country Query
    • Trade
      • Trade Query
        • Payee Query
        • Withdraw Query
        • Payment Query
        • Pay Query
      • Supplementary Materials
        • Webhook
          • Trade Replenish Notify
          • Trade Replenish Result Notify
        • Trade Replenish Submit
    • Wallet
      • Currency Balance
      • Platform Balance
    • Mock
      • mockPayeeNotify
    • Schemas
      • Schemas
        • TradeAcquiringNofDetail
        • TradeAcquiringDisputeType
        • OrderUploadInfo
        • CheckoutV2BillingInfo
        • StorageFile
        • WhaletCardId
        • IndustryCode
        • CheckoutV2ShippingInfo
        • Address
        • WhaletCardAddress
        • AcquiringShopStatus
        • CheckoutV2PayerInfo
        • Member
        • WhaletCardInfo
        • AcquiringShopInfo
        • 3DS threeDSInfo
        • EddItem
        • WhaletCardTransactionInfo
        • AcquiringShopMethodInfo
        • DirectApiDeviceInfoV2
        • PayFac
        • WhaletCardBin
        • DirectApiTransactionInfoV2
        • ActualBeneficiary
        • WhaletCardBinVerification
        • AcquiringShopMethodStatus
        • EddItem1
        • Card paymentInfo.card (checkout)
        • WhaletCardBinCardLimit
        • Edd
        • Payment paymentInfo (checkout)
        • WhaletCardIdTrans
        • TradeAcquiringChargebackStatus
        • DirectApiPaymentInfoV2
        • Shop
        • WhaletCardAccountTransactionInfo
        • TradeAcquiringChargebackHandleType
        • AcquiringAction
        • TradePayeeOrder
        • WhaletCardAccountInfo
        • TradeAcquiringHandleStatus
        • YesOrNo
        • Bank
        • WhaletCardTransactionType
        • CaptureType
        • CardSupplier
        • TradeAcquiringChargebackDetail
        • WhaletCardAccountTransactionType
        • AcquiringProductStatus
        • AcquiringProduct
        • Card
        • WhaletCardTransactionStatus
        • AcquiringCardDetail
        • FeeDetail
        • UserHolder
        • AcquiringPayByBankDetail
        • AcquiringLocalPaymentDetail
        • UserHolderBankAccount
        • AcquiringVoucherDetail
        • ResultNotify
        • PlatformType
        • AcquiringDigitalWalletDetail
        • VirtualAccountBank
        • AcquiringEpsDetail
        • AcquiringSepaDebitDetail
        • Balance
        • ListObject
        • AcquiringChargebackDefenseDocument
        • TradeAcquiringChargebackReasonInfo
        • TradeAcquiringChargebackReason
        • FeeRuleDetail
        • SupplierType
        • FeeRule
        • PayeeCardStatus
        • BankCode
        • ShopStatus
        • BeneficiaryBankAccountField
        • BeneficiaryAccountType
        • BeneficiaryBankAccount
        • SellGoodsType
        • CertificateType
        • FundSource
        • ConnectivityGuideRequestBody
        • ServiceTradeType
        • AcquiringGoods
        • AcquiringPaymentMethod
        • TradeAcquiringLinkStatus
        • TradeAcquiringLinkInfo
        • TradeAcquiringLinkCustomerInfo
        • TradeAcquiringLinkGoodsInfo
        • TradeAcquiringOrderInfo
        • TradeAcquiringInfo
        • TradeAcquiringRefundInfo
        • Currency
        • RemittancePurpose
        • RelationshipSender
        • ConnectivityGuideResponseBody
        • BeneficiaryAccountCategory
      • AcquiringPixDetail
      • AcquiringCaptureType
      • AcquiringActionType
      • AcquiringRedirectData
      • AcquiringCardBrand
      • AcquiringBoletoDetail
      • AcquiringPicpayBrazilDetail
      • AcquiringPaypalBrazilDetail
      • AcquiringPaymentDetailBase
      • AcquiringGooglePayDetail
      • AcquiringApplePayDetail
      • AcquiringBcmcDetail
      • AcquiringIdealDteail
      • AcquiringUserAgent
      • AcquiringAffirmDetail
      • AcquiringKlarnaDetail
      • AcquiringCashAppPayDetail
      • AcquiringLinkDetail
      • AcquiringAddress
      • AcquiringChannel
      • AcquiringSdkBillingInfo
      • AcquiringSdkShippingInfo
      • AcquiringSdkTransactionInfo
      • AcquiringSdkPayerInfo
      • AcquiringSubmitDetail
      • OpenApiAcquiringSupplementOrderLogisticsForm
      • OpenRestfulResultVoid
      • UserAgent
      • AcquiringBrowserInfo
      • Browser
      • Platform
      • CountryCode
      • AcquiringCustomer
      • OS
      • AcquiringOrder
      • Engine
      • LogisticsInfo
      • AcquiringDeviceData
      • AcquiringMethodType
      • Currency
      • AcquiringQrCodeData
      • AcquiringMethodDetail
      • AcquiringCustomData

    Integration Guide

    Whalet Open API Integration Guide#

    1. Introduction#

    1.1 Overview#

    This document helps partners integrate quickly with Whalet’s open capabilities for collections, acquiring, VCC, payout, and more.

    1.2 Integration flow#

    whalet-integration-flow-en.jpg

    1.3 Integration parameters#

    📌
    Technical parameters that Whalet and partners must exchange before starting integration
    ParameterProviderDescriptionExample
    partnerIdwhaletPartner ID202506241658268
    clientIdwhaletApplication IDbudrOyt8X0qTCeyaDPMd2t5EI2DOUIii
    secretKeywhaletApplication secretsaBHKCCpWQXqEWRRFtSLmzStlVeXKBiE4p...
    hmacKeywhaletSigning keybudrOyt8X0qTCeyaDPMd2t5EI2DOUIii
    aesKeywhaletKey for encrypting sensitive fieldsFvB+9fRjT1fb1JTbrlMRpw==
    sdk clientKeywhaletPayment component keytest_Tz3kDyBMUhv0lHJYPwzfHuyD69x
    webhookUrlPartnerNotification URLhttps://example.com/webhook

    1.4 Technical support#

    For integration or debugging questions during business hours, contact technical support:
    implement@whalet.com

    2. Common message format#

    2.1 Access method#

    APIs follow REST conventions, use OAuth 2.0 authorization, communicate over HTTPS, and accept POST requests.
    EnvironmentBase URL
    Sandboxhttps://api-test.whalet.com
    Productionhttps://api.whalet.com

    2.2 Notes#

    All API requests must use HTTPS
    TLS 1.2 or higher is recommended
    Use UTF-8 for all character encoding
    Some request fields must be encrypted: use the encrypted prefix and encrypt with AES using the assigned aesKey

    2.3 Status codes#

    Success codes#

    CodeDescriptionUsage
    SUCCESSOperation succeededNormal completion
    PROCESSINGIn progressProcessing

    Error codes#

    CodeDescriptionResolution
    FAILUREFailedCheck the error reason
    TOO_MANY_REQUESTSRate limit exceededReduce request frequency
    PARTNER_NOT_EXISTPartner not foundCheck header partnerId
    INTERNAL_ERRORInternal errorContact technical support
    PARAMETER_ERRORInvalid parameterSee detailed error message
    IDEMPOTENT_ERRORIdempotency errorContact technical support
    REQUEST_NO_NOT_UNIQUEDuplicate request numberCheck requestNo
    UNAUTHORIZEDUnauthorizedAPI not authorized; contact Whalet to enable access
    UNAUTHENTICATED_ERRORAuthentication (signature) errorVerify signature
    INTERFACE_UNAUTHORIZEDAPI not authorizedAPI not authorized; contact Whalet to enable access

    2.4 Sensitive field encryption#

    Encryption rules#

    1.
    Content: Original value of the sensitive field
    2.
    Algorithm: AES
    3.
    Key: Provided by Whalet to the partner (128-bit, ECB padding mode)
    4.
    Process:
    Encrypt the sensitive field value with the assigned key
    Send the ciphertext as the field value in the request

    Sample code#

    java
    php
    python
    go

    3. Authentication and authorization#

    3.1 Obtain access token#

    API details
    Endpoint: POST /v1/auth/token
    Description: Obtain an access token with client ID and secret
    Auth: No authentication required
    Request parameters
    TypeNameRequiredTypeDescriptionExample
    HeaderpartnerIdYesstringPartner ID202506241658268
    HeaderrequestNoYesstringRequest serial numberREQ202312010001
    HeadertimestampYeslongTimestamp (milliseconds)1753682997568
    BodyclientIdYesstringClient IDbudrOyt8X0qTCeyaDPMd2t5EI2DOUIii
    BodysecretKeyYesstringSecretsaBHKCCpWQXqEWRRFtSLmzStlVeXK...
    Request example
    Response parameters
    NameTypeDescriptionExample
    codestringResponse codeSUCCESS
    messagestringResponse messagesuccess
    data.tokenstringAccess tokeneyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
    data.expirenumberExpiry (seconds)3600
    data.tokenTypestringToken typeBearer
    Success response example
    {
        "message": "success",
        "code": "SUCCESS",
        "data": {
            "token": "S5laCM1hbNZxcWqp7l8xBTtDKopQtE7wfRy4fxyzyQIHbvJJ76bW6UkJvVAmakZS",
            "expire": 3600,
            "tokenType": "Bearer"
        }
    }

    3.2 Token expiry and refresh#

    Token lifetime in seconds is specified by expire (e.g. 3600 means one hour).
    Cache the token locally. If remaining lifetime is less than 5 minutes (300 seconds), obtain a new token; the previous token becomes invalid.

    4. Business APIs#

    3.1 Overview#

    Complete authorization (obtain a token) before calling business APIs; all business endpoints require authorization.

    3.2 Request format#

    Request headers (HTTP Headers)#

    Every API request must include the following headers:
    NameRequiredTypeDescriptionExample
    partnerIdYesstringPartner ID identifying the request sourcepartner_001
    requestNoYesstringRequest serial number; use a unique value for troubleshootingREQ202312010001
    AuthorizationYesstringAccess token from /v1/auth/tokenBearer eyJhbGciO...
    timestampYeslongRequest timestamp (milliseconds)1753682997568
    Content-TypeYesstringFixed value application/jsonapplication/json
    Note: Authorization is required on every endpoint
    Header example
    {
      "partnerId": "partner_001",
      "requestNo": "REQ202312010001",
      "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
      "timestamp": "1753682997568",
      "Content-Type": "application/json"
    }
    curl example

    Request body (HTTP Body)#

    The body is JSON; parameters are defined in each API’s documentation.
    {
      "param1": "value1",
      "param2": "value2",
      "param3": {
        "nestedParam": "nestedValue"
      }
    }

    3.3 Response format#

    Response headers (HTTP Headers)#

    The server returns:
    NameTypeDescriptionExample
    Content-TypestringFixed value application/jsonapplication/json
    Response header example
    {
      "Content-Type": application/json
    }

    Response body (HTTP Body)#

    All API responses use a uniform JSON shape:
    {
      "code": "SUCCESS",
      "message": "Response description",
      "data": "Payload as defined in the API reference"
    }
    Response fields
    FieldTypeRequiredDescriptionExample
    codestringYesResponse codeSUCCESS
    messagestringYesHuman-readable descriptionOperation succeeded
    dataobject/array/nullYesPayload; structure per API docs{}
    Success response example
    {
      "code": "SUCCESS",
      "message": "success",
      "data": {
        "id": "12345",
        "name": "Sample data",
        "status": "active"
      }
    }
    Error response example
    {
        "message": "clientId length must be 32",
        "code": "PARAMETER_ERROR",
        "data": null
    }

    4. Notifications (webhook)#

    Webhooks push notifications to partners, such as inbound funds or business outcome events.

    4.1 Delivery policy#

    Retries: up to 5 attempts with intervals of 1s, 2s, 4s, 8s, and 16s
    Response: return within 30 seconds; if all 5 attempts fail, Whalet will notify the partner offline
    Success: HTTP status code 200

    4.2 Request details#

    Method: POST
    URL: Provided by the partner

    Notification headers#

    NameRequiredTypeDescription
    Content-TypeYesstringapplication/json
    signatureYesstringSignature; see rules below

    Notification body#

    FieldTypeRequiredDescription
    typestringYesBusiness type (see each notification’s type definition)
    dataobjectYesBusiness payload (see each notification API’s parameters)
    requestNostringYesRequest serial number
    versionstringYesAPI version
    timestamplongYesTimestamp (milliseconds)
    curl example

    4.3 Signature verification#

    Verification rules#

    1.
    Content: Raw JSON string of the request body (HTTP payload; do not reformat or alter whitespace)
    2.
    Algorithm: HMAC-SHA256
    3.
    Key: Provided by Whalet to the partner
    4.
    Process:
    Sign the request body (payload) with the signing key
    Base64-encode the signature to produce the final string
    Compare that string with the signature header using a constant-time equality check

    Sample code#

    java
    php
    python
    go

    5. File upload#

    5.1 Upload API#

    API details
    Endpoint: POST /v1/upload
    Description: Upload files (IDs, attachments, proofs, etc.)
    Auth: Authentication required
    Request parameters
    TypeNameRequiredTypeDescriptionExample
    HeaderpartnerIdYesstringPartner ID202506241658268
    HeaderrequestNoYesstringRequest serial numberREQ202312010001
    HeadertimestampYeslongTimestamp (milliseconds)1740995200123
    HeaderContent-TypeYesstringFixed headermultipart/form-data
    HeaderAuthorizationYesstringAccess tokenBearer eyJhbGciOiU...
    BodyfileYesfileFile to upload(binary)
    Request example

    5.2 Supported formats#

    Images: jpeg, jpg, png, gif, bmp
    Documents: pdf, doc, docx, xls, xlsx, csv, txt
    Archives: zip, rar

    5.3 Size limit#

    Maximum 10 MB

    5.4 Response body#

    Response parameters
    NameTypeDescriptionExample
    codestringResponse codeSUCCESS
    messagestringResponse messagesuccess
    data.fileIdstringFile ID202507301610248867670001
    data.fileNamestringFile nameimage1.jpg
    data.fileUrlstringFile URLhttps://test-file.whalet.com/2025-07-30/demo.jpg
    Success response example
    {
        "message": "success",
        "code": "SUCCESS",
        "data": {
            "fileId": "202507301610248867670001",
            "fileName": "demo.png",
            "fileUrl": "https://test-file.whalet.com/2025-07-30/demo.jpg"
        }
    }

    6. Main API categories#

    User onboarding
    User onboarding applications and supplemental materials.
    Collections
    Open VA accounts and receive funds.
    Acquiring
    International card acquiring and local payment methods.
    VCC
    Virtual Credit Card.
    Payout
    Fund payout.
    Wallet
    Wallet and Balance.
    Next
    Appendix
    Built with