GALAXY PAY - API Reference Guide
  • Payment Gateway
    • Payment solution
      • General integration steps
      • Modal checkout
        • Integration Guide for Web Desktop & Mobile Browser
      • Merchant checkout
      • Merchant Hosted Checkout
      • Pay with option
      • Pay with token
      • Fast pay
      • Pay with QR
      • Pay with E-Wallet
    • Demo
    • API Specification
      • Integration Keys
      • Definitions
        • Message Structure
        • Signature Algorithm
      • Data Flight
      • PAYMENT
        • Pay
        • Pay with create token
        • Pay with token
        • Pay with Option
        • Pay with QR
        • Checkout(for modal checkout)
        • Payment Link
        • Fast pay
      • TOKENIZATION
        • Merchants
          • Delete Token
        • Customers
          • Query Tokens
          • Remove Token
      • MANAGEMENT
        • Query Transaction
        • Refund Transaction
        • Void Transaction
        • Capture Transaction
      • IPN & CALLBACK
        • Result & IPN Callback
        • Cancel Callback
    • Appendix
      • Response Codes
      • Currencies
      • Domestic Banks
      • International Card Brands
      • eWallets
      • Payment Hubs
        • Apple Pay Validation
      • QR Payment Providers
      • Buy Now Pay Later
      • Test Information
      • Glossary
  • Payment Link
    • IPN callback
  • Archive
    • QR Payment (Old version)
      • API create QR
      • API query status
      • How to test
    • API create PaymentLink
Powered by GitBook
On this page
  • General integration steps
  • Step 1: APIKey & Salt:
  • Step 2: Signature Algorithm:
  • Step 3: Send request message
  • Step 4: Receive response message
  1. Payment Gateway
  2. Payment solution

General integration steps

PreviousPayment solutionNextModal checkout

Last updated 6 months ago

These are the general integration steps; the integration methods differ only in the input fields.

  • Source demo:

    • .Net:

    • Node JS:

  • Integration Keys:

Name
Value
Remark

Signature Salt (SHA256)

GALAXY PAY will provide

Use for Signature

API Key

GALAXY PAY will provide

Use for Authenticate

Base URL

UAT Environment

PRODUCTION Environment

Note:

API Key and Salt Signature will differ between UAT and PRODUCTION environment.

  • Message structure:

    • Service: REST API

    • HTTP Method: POST

    • Content Type: application/json

    • The Request structure:

#
Component
Param
Description

1

Header

APIKey

Key for authentication request.

Provided by GALAXY PAY.

Signature

Request signature, created with SHA256 & Salt

Accept

Accept encoding: application/json

Content-Type

Request content type: application/json

2

Body

JSON content

General integration steps

1

Step 1: APIKey & Salt:

  • APIKey: Use for Authentication

  • Salt: Use for Signature

2

Step 2: Signature Algorithm:

Apply hash algorithm SHA256 with Salt.

Signature = SHA256(SignData + Salt)

Sample Code

// JavaScript Example
var salt = "GO@2021";

// JSON Data (JSON Object)
var request =
{
    "requestID": "14653fa1-2f69-4f4f-9d4b-240e1bebbdf3",
    "requestDateTime": 20220426083322,
    "requestData": {
        "apiOperation": "PAY",
        "orderID": "2a43e4b9-c5df-49e6-8b18-42af9bcd150e",
        "orderNumber": 205249008064,
        "orderAmount": 100000,
        "orderCurrency": "VND",
        "orderDateTime": 20220426083322,
        "orderDescription": "DEMO TRANSACTION",
        "paymentMethod": "DOMESTIC",
        "sourceType": "970400",
        "language": "vi"
    }
};

// JSON String (JSON Serialized as string)
// {"requestID":"14653fa1-2f69-4f4f-9d4b-240e1bebbdf3","requestDateTime":20220426083322,"requestData":{"apiOperation":"PAY","orderID":"2a43e4b9-c5df-49e6-8b18-42af9bcd150e","orderNumber":205249008064,"orderAmount":100000,"orderCurrency":"VND","orderDateTime":20220426083322,"orderDescription":"DEMO TRANSACTION","paymentMethod":"DOMESTIC","sourceType":"970400","language":"vi"}}
var signData = JSON.stringify(request);

// require('crypto-js');
// signature = SHA256(signData + salt) 
// b4b7cb5596680bb343f399922fc32e63fd69191c573e83c0383fd734531eab03
var signature = crypto.SHA256(signData + salt).toString();
3

Step 3: Send request message

4

Step 4: Receive response message

GALAXY PAY will provide. If you don’t have an API Key & Salt, use:

You can test Signature in

View the request fields for each integration method

View the response fields for each integration method

https://github.com/galaxypayvn/sample-upc-dotnet
https://github.com/galaxypayvn/sample-upc-nodejs
https://uat-demo.galaxypay.vn/documents#auth
API Playground
here
here
https://uat-secure.galaxypay.vn
https://secure.galaxypay.vn