Skip to main content

API Introduction

Authentication Models

Depending on how transaction processing responsibilities are divided, two distinct scenarios are covered.

It is preferable that the Issuer can provide their IP address, which we will add to our whitelist. The Issuer can use the Bearer Token mode.

Issuer Does NOT Manage Card/Account Balance
In this setup, Eastpay issuing system is fully responsible for transaction processing, including authorization logic and balance checking. The Issuer does not control card/account balance directly.

Issuer Manages Card/Account Balance
In this case, the Issuer system holds and manages the actual balance. Our system acts as a transaction gateway and forwards each authorization request to the Issuer in real time.

Authentication Setup:

  • Our system acts as the API Server, accepting secure requests from the Issuer.
  • OAuth 2.0 compliant authentication defined in Section Authentication Method is preferable.

Authentication Method

Authentication is based on OAuth 2.0 using the private_key_jwt method and client_credential as grant type (no user involved).

This ensures strong client authentication, token lifecycle management, and cryptographic protection of API payloads.

The following components are involved:

  • Authorization Server – issues and validates access tokens.
  • Client - the external system integrating with this API.
  • Resource Server - validates tokens and processes API requests.

Key Exchange

Before API integration, the client must obtain the required public keys from the server and provide its own keys.

  • Server-provided keys:
    • EC Public Key – used to verify access token signatures.
    • RSA Public Key – used to encrypt request payloads.
  • Client-provided keys:
    • EC Public Key – used to verify client_assertion signatures.
    • RSA Public Key – used to encrypt response payloads. If certificate-based distribution is required, the client must provide valid X.509 certificates. Certificates should be issued by a trusted CA.

Client Authentication

The client must authenticate to the Authorization Server using the following parameters:

  • clientAuthenticationMethod: private_key_jwt
  • authorizationGrantType: client_credentials
  • scope: as assigned by the server (principle of least privilege)
  • authenticationSigningAlgorithm: ES256

Token Usage

  • The access token is signed by the server with ES256 (JWS). The access token is short-lived for 60 minutes. Once it is expired, the issuer (client) could request the access token again via Client Authentication.
  • The client assertion must be signed by the client with ES256 (JWS).

Payload Encryption

All API payloads must be encrypted as follows:

  • Requests (Client → Server):
    • Encrypted with the server’s RSA Public Key.
    • Algorithm: RSA_OAEP_256 (key management) + A128GCM (content encryption).
  • Responses (Server → Client):
    • Encrypted with the client’s RSA Public Key.
    • Algorithm: RSA_OAEP_256 + A128GCM.

API Request

Each API request must include the access token (signed JWT) as a Bearer Token in the header.

Encoding

Our system expects data to be sent encoded in UTF-8.

Using this Content-Type header can help: application/json; charset=UTF-8

HTTP Header

Request HTTP Header:

RequestField NameDescriptionFormatLengthRemark
authorization TypeauthorizationBearer <access-token>, the access-token is assigned by CoshineStringMaximum 64 charactersExample: Bearer EAmHx5ClXw7nB7ai/ r2Nm9vDiPOXBdL/0P4CZiOHNeY=
TimestamptimestampTimestamp of the message sendStringMaximum 15 charactersExample: "10567867" UNIX Timestamp

Response HTTP :

ResponseField NameDescriptionFormatLengthRemark
TimestamptimestampTimestamp of the message sendStringMaximum 15 charactersExample: 10567867 UNIX Timestamp

HTTP Status Code

For each request sent to our API, the HTTP status code of the response will indicate the basic result.

Status CodeStatus MessageDescription
200SuccessMessage call is successful
307Temporary RedirectTemporary redirect
400Bad RequestMessage verification failed. This might either point to e.g. invalid parameters or values sent.
401Unauthorizedinvalid authorization header provided
403Invalid access tokeninvalid access token provided
404Not Foundrequested resource or endpoint is not found. I.e. endpoint/url doesn't exist.

API List

No.ModuleAPI NameAPI DescriptionPrepaidDebitRemark
1ApplicationCardApplicationSupport both Physical / virtual card application (delivery address is mandatory for Physical card)MM
2CustomerCustomerCardInfoInquiryReturn the card information (including card status) with inquiry of the customer idMM
3CustomerAccountInfoInquiryReturn the account information (including account status) with inquiry of the customer idONA
4CustomerInfoUpdateFor customer Information maintenance, including mobile number, email address, address (delivery address for physical card)…OO
5AccountAccountLinkageAssociate a card with an accountOO
6AccountStatusUpdateChange Account Status including block, close etc.ONA
7CardCardInfoInquiryReturn card information, card plastic status and status date, renew/reissuing information and other card-related informationOO
8CardActivationActivate a cardOO
9
10CardReplacementSupport Card Replacement with Same Card number or Specific card number or Random card number; Also can be used to convert virtual card to physical cardOO
11CardCancellationCard Cancellation with reason codes or memoOO
12CardStatusUpdateChange Card Status including lost, stolen, block etc.CC
13CardLimitSettingSet transaction limit + Domestic/Oversea & e-commerce/POS Transaction IndicatorOOCard level limit control
14CardCVV2InquiryRetrieve Card number, expiry date, CVV2 by card tokenONAOnly for virtual card
15CardCVV2VerifyVerify CVV2 by card tokenONAOnly for virtual card
16GenerateDCVVGenerate a new CVV2OO
17CardExpiryDateUpdateUpdate Card Expiry DateNA
18CardSecureRegist3D-Secure Service for cardholder. if registered, the cardholder will get OTP by mail /SMS when e-commerce transaction need authenticationOOIf use Coshine’s ACS Services
19BlacklistUpdateInsert or delete blacklist or whitelist cardNANAOld Version. Not used now.
20PINResetReset Card PINOMIf card support online PIN
21PINChangeChange Card PINOM
22PINVerifyVerify Card PINOO
23TransactionBalanceInquiryBalance InquiryONAWallet / Banking system will provide their own API if account is controlled by their system
24LoadFundLoad fund / Payment to card accountONA
25WithdrawWithdraw in ATMCNAIf prepaid card support ATM transaction
26TransferFundTransfer between two cardONA
27PurchasePurchase /Sale transactionCNA
28RefundRefund or Void transactionCNA
29ReversalReversal for LoadFund , Withdraw, TransferFund and PurchaseMNA
30BlockFundFor Preauthorization or other purpose to block the amountCNAIf prepaid card support pre-auth / block fund
31UnblockFundRelease/ Partial release preauthorizationCNA
32ServiceChargeService Fee chargeONA
33VerificationCard/Account VerificationONA
34DebitAdjustmentDebit Adjustment (Miscellaneous adjustment with memo)ONA
35CreditAdjustmentCredit Adjustment (Miscellaneous adjustment with memo)ONA
36TransactionHistoryInquiry Transaction History by token numberMNA
37AuthorizationHistoryInquiry Authorization History by token numberONA
38TokenTokenInquiryInquiry token information by card number.
39TokenRequestAfter Generated UnionPay Virtual PAN based on issuer’s mobile APP Account, initialize Token for the Virtual PAN.
40TokenStateUpdateWhen the Cardholder or the mobile application suspends, resumes, or deletes the card, the mobile application shall send the Token State Update request to change the state of the Token.
41TokenStateNotificationWhen the UMPS suspends, resumes, or deletes the card, the UMPS will send the Token State Notification request to notify the mobile application.
42TokenMetadataUpdateThe Token metadata, e.g., Token expiry date, needs to be updated from the mobile application’s side if the PAN expiry date has already been renewed.
43ReplenishTokenLUKMobile application will call SDK API “tokenValidForProcessing” to check if there are available LUKs in SDK before payment for a given Token identified by the Token ID
44AuthenticationSendOTPDirect OTP authentication request to issuer
45VerifyOTPRequest to verify the OTP provided
46StartOOBAuthenDirect OOB authentication request to issuer
47OOBResultInquiryInquiry the result of OOB authentication
48ParameterDropDownListInquiryRetrieve lookup table from our system, such as reason list for card replacement