LANGUAGE 🔽

1. Overview(Extreme speed mode)
By accessing the GLOCASHPAYMENT payment gateway system (hereinafter referred to as the GC gateway), the merchant system can obtain a variety of collection channels covering the whole world; in the extreme speed mode, the GC gateway provides a JavaScript script-based payment plug-in, which requires only a few lines of code to complete fast access and realize the best payment experience.
This document provides detailed technical support content for merchant system integration, which is composed of the following parts:
2. Load plugin and payment page
Just add a few lines of code to the business page, and a full payment request can be implemented:
    <script src="https://pay.glocash.com/public/gateway/js/embed.js" class="gc-embed-button"
      title="BUY NOW"
      d-emkey="xxx-YOUR-PUBLIC-KEY-xxx"
      d-merchant="MERCH-77 LTD."
      d-goodsname="Goods10 X-OEM"
      d-price="12.78"
      d-currency="EUR"
      d-cc3ds="1"
      d-email="customer@glocash.com"
      d-suceess="https://example.com/payNotify/success"
      d-failed="https://example.com/payNotify/failed"
      d-pending="https://example.com/payNotify/pending"
      d-notify="https://example.com/payNotify/notify"
      d-cc3ds="https://example.com/payNotify/notify"
    ><script>
After the page successfully loads the JavaScript plugin, a payment button will be automatically generated at the corresponding location:
After clicking the payment button, the payment page (Pop-up layer) containing the corresponding parameters (see Appendix 2 for details) will pop up on the current page:
If you want to customize the style of the payment button, you can add it yourself in the class attribute of the <script> tag(but you must keep the gc-embed-button style):
    <script src="https://..." class="gc-embed-button my-style1 my-style2" ...
3. Payment result
After the GC gateway completes the payment processing, the payer's terminal browser will jump to the corresponding merchant address, which can be configured in the merchant background or specified by the parameters in the payment plugin (and override the configuration in the merchant background):
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    d-suceess URL_SUCCESS / Redirecting URL of successful payment - 255 https://www.merchant77.com/success.php?order=ORD12345890
    d-pending URL_PENDING / Redirecting URL of payment in process - 255 https://www.merchant77.com/pending.php?order=ORD12345890
    d-failed URL_FAILED / Redirecting URL of failed payment - 255 https://www.merchant77.com/failed.php?order=ORD12345890
    d-notify URL_NOTIFY / Request URL of the PSN - 255 https://www.merchant77.com/notification.php?order=ORDER1234567890
When the request mode is configured as "POST / SUBMIT / INCLUDE TRANSACTION DATA", the relevant transaction information will be submitted to the above URL:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    REQ_TIMES UNIX timestamp of the current request YES 10 1466492149
    REQ_INVOICE Order number created by the merchant (submitted by payment request) YES 64 ORDER1234567890
    REQ_SIGN Digital signature of the current request YES 64 8a8d17fb8f50db848c8aa2f850e83688c9ceb611cea761f0c64b998c5bbd7e4e
    REQ_SANDBOX If the value is ON, then it's in the sandbox mode - 2 ON
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    CUS_EMAIL Email of the payer (submitted by payment request) YES 255 customer789@gmail.com
    TNS_GCID GC transaction number YES 16 CCGM48FGLP11H8MT
    TNS_UTIMES UNIX timestamp of transaction creation YES 16 1512360895.5831
    BIL_STATUS Payment status of the current transaction (see APPENDIX4 for details) YES 16 paid
    BIL_METHOD Code of the payment method YES 3 C01
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    PGW_PRICE Actual paid amount of the current transaction - 16 37.86
    PGW_CURRENCY The currency code of the paid amount (ISO4217) - 3 USD
    PGW_CC3DS 3DS result for credit card payment (authorized when it's not 0) - 1 3
    FDL_DECISION Risk decision of the current transaction (see APPENDIX5 for details) - 3 REV
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    CUSTOM_FD0 Merchant customized parameter 0 (submitted by payment request) - 255 123456
    CUSTOM_FD7 Merchant customized parameter 7 (submitted by payment request) - 255 ONEtwo three fourfive
A parameter with the digital signature will ensure the legality of the current request (same as the PSN request, for specific algorithm please refer to APPENDIX1).
NOTICE: When the request mode is configured as "GET / REDIRECT ONLY / NO ADDITIONAL DATA", the redirection can not be used as a proof of successful payment, as it can be counterfeited easily. Please use the payment status notification (PSN) or transaction query interface to confirm the final payment status.
4. Payment status notification(PSN)
A parameter containing a digital signature will ensure the legitimacy of the PSN request (see Appendix 1 for specific algorithms). The merchant system can perform related business processing according to the status information in the request (such as updating the order status or preparing for shipment, etc.)
Typical example of notification request:
    REQUEST
    POST /notification.php?order=ORDER1234567890 HTTP/1.1
    Host: www.merchant77.com
    ...

    REQ_INVOICE=ORDER1234567890&CUS_EMAIL=customer789%40gmail.com&BIL_METHOD=CCG&BIL_PRICE=3.79&BIL_CURRENCY=USD&REQ_EMAIL=account123%40merchant77.com&REQ_SANDBOX=ON&TNS_UTIMES=1512371781.833&TNS_GCID=CCGM48FGLP11H8MT&REQ_REFERER=https%3A%2F%2Fwww.merchant77.com%2checkout.php&BIL_IPADDR=123.123.123.123&PGW_PRICE=3.18&PGW_CURRENCY=EUR&FDL_DECISION=ACP&BIL_STATUS=paid&REQ_TIMES=1512371788&REQ_SIGN=789e9d6691adae0f3d7d50b49b0682b18f3c48b068ef8a6d0321a716f47ac34c
NOTICE: After the merchant system receives the notification, please return a 200 HTTP response code, otherwise GC Gateway will deem this notification as failed and try again after a few minutes.
5. Test environment
When the payment plugin is set to sandbox mode (parameter d-sandbox="1" ), the GC Gateway will create a test transaction. The payment page in the test transaction will defaultly be set to the credit card method, which can be tested using any card number that conforms to the specification, but the actual debit operation will not be performed (the final status of the transaction can be configured in the merchant background).
The test transaction also performs a Payment Status Notification (PSN), except that the transaction information will contain a parameter that identifies the test environment:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    REQ_SANDBOX If the value is ON, then it's in the sandbox mode - 2 ON
NOTICE: After completed the testing processes, please contact your account manager to enable the live mode.
APPENDIX1: DIGITAL SIGNATURE
PSN request (initiated by GC Gateway):
    REQ_SIGN = SHA256 ( SECRET_KEY + REQ_TIMES + REQ_EMAIL + CUS_EMAIL + TNS_GCID + BIL_STATUS + BIL_METHOD + PGW_PRICE + PGW_CURRENCY )
    NOTE: For the detail of parameters, please refer to APPENDIX3. SECRET_KEY is the secret key of the merchant account.
Appendix 2: Payment Plugin Parameter Table
Complete parameter list as follow:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    title Payment button text - - PAY NOW
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    d-emkey Merchant public key for the payment plugin YES 32 cF5UFQBQJFVCgBcB
    d-goodsname Product description displayed in the payment page YES 255 Smart Phone P238 x1
    d-price Total amount of the payment YES 16 37.86
    d-currency The currency code of the payment (ISO4217) YES 3 EUR
    d-email Email of the payer YES 255 customer789@gmail.com
    d-method Code of the payment method (see APPENDIX6 for details) - 3 C01
    d-cc3ds Whether to enable 3DS authentication or not for credit card payment (enable when it's not 0) - 1 1
    d-invoice Order number created by the merchant system (numbers, uppercase and lowercase characters, symbol _ and - are allowed) - 64 ORDER1234567890
    d-merchant Merchant name displayed in the payment page - 32 MERCHANT-77 LTD.
    d-sandbox Set to sandbox mode if the parameter value is non-zero - 1 1
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    d-suceess URL_SUCCESS / Redirecting URL of successful payment - 255 https://www.merchant77.com/success.php?order=ORD12345890
    d-pending URL_PENDING / Redirecting URL of payment in process - 255 https://www.merchant77.com/pending.php?order=ORD12345890
    d-failed URL_FAILED / Redirecting URL of failed payment - 255 https://www.merchant77.com/failed.php?order=ORD12345890
    d-notify URL_NOTIFY / Request URL of the PSN - 255 https://www.merchant77.com/notification.php?order=ORDER1234567890
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    d-custom0 CUSTOM_FD0 / Custom parameters of the merchant system0 - 255 123456
    d-custom1 CUSTOM_FD1 / Custom parameters of the merchant system1 - 255 3457fdddc
    d-custom2 CUSTOM_FD2 / Custom parameters of the merchant system2 - 255 ONEtwo three fourfive
APPENDIX3: PARAMETER LIST OF PAYMENT STATUS NOTIFICATION (PSN)
Complete parameter list as follow:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    REQ_TIMES UNIX timestamp of the current request YES 10 1466492149
    REQ_EMAIL GC account email of the merchant YES 255 account123@merchant77.com
    REQ_INVOICE Order number created by the merchant (submitted by payment request) YES 64 ORDER1234567890
    REQ_SIGN Digital signature of the current request YES 64 8a8d17fb8f50db848c8aa2f850e83688c9ceb611cea761f0c64b998c5bbd7e4e
    REQ_REFERER Referer URL of the payment page - 255 https://www.merchant77.com/checkout.php
    REQ_SANDBOX If the value is ON, then it's in the sandbox mode - 2 ON
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    CUS_EMAIL Email of the payer (submitted by payment request) YES 255 customer789@gmail.com
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    TNS_GCID GC transaction number YES 16 CCGM48FGLP11H8MT
    TNS_UTIMES UNIX timestamp of transaction creation YES 16 1512360895.5831
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    BIL_PRICE Total amount of the request (submitted by payment request) YES 16 37.86
    BIL_CURRENCY The currency code of the request (submitted by payment request) YES 3 USD
    BIL_METHOD Code of the payment method YES 3 C01
    BIL_IPADDR Payer's IP address (v4/v6) in the payment page YES 40 123.123.123.123
    BIL_STATUS Payment status of the current transaction (see APPENDIX4 for details) YES 16 paid
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    PGW_PRICE Actual paid amount of the current transaction - 16 37.86
    PGW_CURRENCY The currency code of the paid amount (ISO4217) - 3 USD
    PGW_CCHOLDER The card holder's name for credit card payment - 64 John Smith
    PGW_CC3DS 3DS result for credit card payment (authorized when it's not 0) - 1 3
    PGW_MESSAGE Related information returned by gateway (e.g. error messages) - 255 payment success.
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    FDL_DECISION Risk decision of the current transaction (see APPENDIX5 for details) - 3 REV
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    CUSTOM_FD0 Merchant customized parameter 0 (submitted by payment request) - 255 123456
    CUSTOM_FD7 Merchant customized parameter 7 (submitted by payment request) - 255 ONEtwo three fourfive
APPENDIX4: TRANSACTION STATUS
Complete status list as follow:
    STATUS DESCRIPTION
    unpaid The payment is successfully paid
    paid The payment is unpaid
    pending The payment is in progress
    cancelled The payment is cancelled (operated by the payer)
    failed The payment is failed
    refunding The refund is in process
    refunded The payment is fully refunded
    complaint The payment is held due to a complaint/dispute (initiated by the payer)
    chargeback The payment is reversed due to a chargeback
APPENDIX5: RISK DECISION
Complete decision list as follow:
    DECISION DESCRIPTION
    ACP Passed the risk rules
    REV Risky transaction to be reviewed
    REJ Refused the payment or a refund is recommended (high risk)
    BAN Refused the payment (high risk and blacklist)
APPENDIX6: AVAILABLE PAYMENT METHOD
Please contact your account manager to confirm and activate relevant payment methods in your business area.
    REQ_EMKEY
    REQ_SANDBOX
    INVOICE_REPEAT_MAX
    TNS_GCID
    REFUND FAILED
    BIL_CURRENCY
    CREDIT_CARD_FAILED_MAX
    REQ_REFERER
    BIL_CCNUMBER
    PGW_GATEWAY
1. INTRODUCTION (CLASSIC MODE)
The merchant system will obtain diverse worldwide payment methods by integrating with the GLOCASHPAYMENT payment gateway system (hereinafter referred to as GC Gateway).
This document provides detailed technical support for the merchant system integration, consisting of the following parts:
Before the integration, please contact your account manager to obtain your test account. The test environment will be running in a sandbox mode which simulates the real business environment, and it will not result in real payment behaviors.
2. PROTOCOL AND FORMAT
GC Gateway's communication protocols are based on HTTP, and can be divided into the following forms:
  • REQUEST - including the request sent by the merchant system to GC Gateway (such as payment request), or the request sent by GC Gateway to the merchant system (such as PSN request), it uses the POST method (name/value).
  • RESPONSE - data response from GC Gateway, which is a JSON encoded string.
  • REDIRECTION - it is the payer's browser to carry out the redirection/loading of a specific URL.
NOTICE: All data must be encoded in UTF-8 character set, otherwise it may cause unexpected errors.
3. SYSTEM FLOW
The main payment processes are as follow:
  • The customer (payer) create an order in the merchant system.
  • The merchant system (backend server) initiates a payment request to GC Gateway.
  • GC Gateway return a response with the payment page URL.
  • The customer (payer) browser redirects to the payment page.
  • Once the customer finished the payment, the browser redirects to the successful page of the merchant system.
  • GC Gateway initiates a request of payment status notification (PSN) to the merchant system.
4. PAYMENT REQUEST
The merchant system initiates a payment request to GC Gateway through the POST method:
  • SANDBOX - https://sandbox.glocash.com/gateway/payment/index
  • LIVE - https://pay.glocash.com/gateway/payment/index
The parameters in the request include all the related information of the payment. A simple payment request will include the mandatory parameters as follow:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    REQ_TIMES UNIX timestamp of the current request YES 10 1466492149
    REQ_EMAIL GC account email of the merchant YES 255 account123@merchant77.com
    REQ_INVOICE Order number created by the merchant system (numbers, uppercase and lowercase characters, symbol _ and - are allowed) YES 64 ORDER1234567890
    REQ_SIGN Digital signature of the current request YES 64 8a8d17fb8f50db848c8aa2f850e83688c9ceb611cea761f0c64b998c5bbd7e4e
    CUS_EMAIL Email of the payer YES 255 customer789@gmail.com
    BIL_PRICE Total amount of the payment YES 16 37.86
    BIL_CURRENCY The currency code of the payment (ISO4217) YES 3 https://www.merchant77.com/success.php?order=ORDER1234567890
    BIL_CC3DS Whether to enable 3DS authentication or not for credit card payment (enable when it's not 0) - 1 1
    URL_SUCCESS Redirecting URL of successful payment - 255 https://www.merchant77.com/success.php?order=ORDER1234567890
    URL_PENDING Redirecting URL of payment in process - 255 https://www.merchant77.com/pending.php?order=ORDER1234567890
    URL_FAILED Redirecting URL of failed payment - 255 https://www.merchant77.com/failed.php?order=ORDER1234567890
    URL_NOTIFY Request URL of the PSN - 255 https://www.merchant77.com/notify.php?order=ORDER1234567890
A parameter with the digital signature will ensure the legality of the current request (for specific algorithm please refer to APPENDIX1). Once GC Gateway successfully processed the request, it will return a JSON encoded data containing the GC transaction number and payment page URL. The decoded parameters as follow:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    TNS_GCID GC transaction number YES 16 CCGM48FGLP11H8MT
    URL_PAYMENT Payment page URL of the transaction YES 255 https://pay.glocash.com/gateway/payment/index/token/cd4d62f6b36e20d821f3311cf3e6e12b
If in the request has incorrect parameters, GC Gateway will return a JSON encoded data containing incorrect parameter name. The decoded parameters as follow:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    REQ_ERROR The incorrect parameter name YES 32 REQ_SIGN
Example of successful payment request:
    REQUEST
    POST /gateway/payment/index HTTP/1.1
    Host: sandbox.glocash.com
    ...

    BIL_CC3DS=1&REQ_INVOICE=ORDER1234567890&CUS_EMAIL=customer789%40gmail.com&BIL_PRICE=37.86&BIL_CURRENCY=USD&REQ_EMAIL=account123%40merchant77.com&REQ_TIMES=1466492149&REQ_SIGN=df2683bd26b928c0b2f60213210ba684348ec785dab158c6d10b7330e03d03ba
    RESPONSE
    HTTP/1.1 200 OK
    Date: Fri, 01 Dec 2017 08:15:25 GMT
    ...

    {"TNS_GCID":"CCGM48FGLP11H8MT","URL_PAYMENT":"https:\/\/sandbox.glocash.com\/gateway\/payment\/index\/token\/cd4d62f6b36e20d821f3311cf3e6e12b"}
    JSON DECODED
    {
        TNS_GCID: "CCGM48FGLP11H8MT",
        URL_PAYMENT: "https://sandbox.glocash.com/gateway/payment/index/token/cd4d62f6b36e20d821f3311cf3e6e12b"
    }
Example of failed payment request:
    REQUEST
    POST /gateway/payment/index HTTP/1.1
    Host: sandbox.glocash.com
    ...

    BIL_CC3DS=1&REQ_INVOICE=ORDER1234567890&CUS_EMAIL=customer789%40gmail.com&BIL_PRICE=37.86&BIL_CURRENCY=USD&REQ_EMAIL=account123%40merchant77.com&REQ_TIMES=1466492149&REQ_SIGN=123abc456def
    RESPONSE
    HTTP/1.1 200 OK
    Date: Fri, 01 Dec 2017 08:15:25 GMT
    ...

    {"REQ_ERROR":"REQ_SIGN"}
    JSON DECODED
    {
        REQ_ERROR: "REQ_SIGN",
    }
NOTICE: To ensure the security, the payment request must be initiated by the merchant backend server, instead of the browser of the payer.
Example Parameters
Parameter Value Description Parameter
Type
REQ_TIMES required 1747111837 The UNIX timestamp currently being requested Int
REQ_EMAILrequired GC account email of the merchant string
REQ_INVOICErequired Order number created by the merchant system (numbers, uppercase and lowercase characters, symbol _ and - are allowed) string
CUS_EMAILrequired Email of the payer string
BIL_METHODrequired Code of the payment method string
BIL_PRICErequired Total amount of the payment float
BIL_CURRENCYrequired The currency code of the payment (ISO4217) string
REQ_SIGNrequired ab941060f352440b7edc7cf186da67964...... Digital signature of the current request string
BIL_CC3DS Whether to enable 3DS authentication or not for credit card payment (enable when it's not 0) Int
URL_SUCCESS Redirecting URL of successful payment string
URL_PENDING Redirecting URL of payment in process string
URL_FAILED Redirecting URL of failed payment string
URL_NOTIFY Request URL of the PSN string
5. PAYMENT PAGE
The payer's browser will redirect to the payment page, and complete the subsequent payment operations.
Test credit card:
Visa | 4000000000000002 | 01/2022 | 237 | 14 3ds paid
Visa | 5200000000000023 | 01/2021 | 123 | 14 3ds failed
Visa | 5200000000000106 | 01/2021 | 123 | 14 3ds pending
For better experience, the payment page can be embedded in other merchant pages by technologies such as page frame dynamic loading.
6. PAYMENT RESULT
After GC Gateway completed the payment processing, the payer's browser will redirect to the corresponding merchant page, which is included in the payment request parameters by the merchant system:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    URL_SUCCESS Redirecting URL of successful payment - 255 https://www.merchant77.com/success.php?order=ORDER1234567890
    URL_PENDING Redirecting URL of payment in process - 255 https://www.merchant77.com/pending.php?order=ORDER1234567890
    URL_FAILED Redirecting URL of failed payment - 255 https://www.merchant77.com/failed.php?order=ORDER1234567890
When the request mode is configured as "POST / SUBMIT / INCLUDE TRANSACTION DATA", the relevant transaction information will be submitted to the above URL:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    REQ_TIMES UNIX timestamp of the current request YES 10 1466492149
    REQ_INVOICE Order number created by the merchant (submitted by payment request) YES 64 ORDER1234567890
    REQ_SIGN Digital signature of the current request YES 64 8a8d17fb8f50db848c8aa2f850e83688c9ceb611cea761f0c64b998c5bbd7e4e
    REQ_SANDBOX If the value is ON, then it's in the sandbox mode - 2 ON
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    CUS_EMAIL Email of the payer (submitted by payment request) YES 255 customer789@gmail.com
    TNS_GCID GC transaction number YES 16 CCGM48FGLP11H8MT
    TNS_UTIMES UNIX timestamp of transaction creation YES 16 1512360895.5831
    BIL_STATUS Payment status of the current transaction (see APPENDIX4 for details) YES 16 paid
    BIL_METHOD Code of the payment method YES 3 C01
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    PGW_PRICE Actual paid amount of the current transaction - 16 37.86
    PGW_CURRENCY The currency code of the paid amount (ISO4217) - 3 USD
    PGW_CC3DS 3DS result for credit card payment (authorized when it's not 0) - 1 3
    FDL_DECISION Risk decision of the current transaction (see APPENDIX5 for details) - 3 REV
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    CUSTOM_FD0 Merchant customized parameter 0 (submitted by payment request) - 255 123456
    CUSTOM_FD7 Merchant customized parameter 7 (submitted by payment request) - 255 ONEtwo three fourfive
A parameter with the digital signature will ensure the legality of the current request (same as the PSN request, for specific algorithm please refer to APPENDIX1).
NOTICE: When the request mode is configured as "GET / REDIRECT ONLY / NO ADDITIONAL DATA", the redirection can not be used as a proof of successful payment, as it can be counterfeited easily. Please use the payment status notification (PSN) or transaction query interface to confirm the final payment status.
7. PAYMENT STATUS NOTIFICATION (PSN)
When there is a status update of each transaction (such as paid, failed, refunded, etc.), GC Gateway will initiate to the merchant system a notification request containing the related data of this transaction. The specific URL of this request is included in the payment request parameters by the merchant system:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    URL_NOTIFY Request URL of the PSN - 255 https://www.merchant77.com/notification.php?order=ORDER1234567890
A parameter with the digital signature will ensure the legality of the current request (for specific algorithm please refer to APPENDIX1). The merchant system can execute related business processes according to the status information in the request (such as update order status or prepare to ship, etc.).
Typical example of notification request:
    REQUEST
    POST /notification.php?order=ORDER1234567890 HTTP/1.1
    Host: www.merchant77.com
    ...

    REQ_INVOICE=ORDER1234567890&CUS_EMAIL=customer789%40gmail.com&BIL_METHOD=CCG&BIL_PRICE=3.79&BIL_CURRENCY=USD&REQ_EMAIL=account123%40merchant77.com&REQ_SANDBOX=ON&TNS_UTIMES=1512371781.833&TNS_GCID=CCGM48FGLP11H8MT&REQ_REFERER=https%3A%2F%2Fwww.merchant77.com%2checkout.php&BIL_IPADDR=123.123.123.123&PGW_PRICE=3.18&PGW_CURRENCY=EUR&FDL_DECISION=ACP&BIL_STATUS=paid&REQ_TIMES=1512371788&REQ_SIGN=789e9d6691adae0f3d7d50b49b0682b18f3c48b068ef8a6d0321a716f47ac34c
NOTICE: After the merchant system receives the notification, please return a 200 HTTP response code, otherwise GC Gateway will deem this notification as failed and try again after a few minutes.
8. PAYMENT STATUS QUERY
GC Gateway provides a real-time transaction status query interface:
  • Sandbox - https://sandbox.glocash.com/gateway/transaction/index
  • LIVE - https://pay.glocash.com/gateway/transaction/index
The merchant system can query about the status and other information of the appointed transaction through this interface. A qualified query request will include the following mandatory parameters:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    REQ_TIMES UNIX timestamp of the current request YES 10 1466492149
    REQ_EMAIL GC account email of the merchant YES 255 account123@merchant77.com
    REQ_SIGN Digital signature of the current request YES 64 c8aa2f1cea7850e83688c9ceb618a8d17fb8f50db84861f0c64b998c5bbd7e4e
    TNS_GCID GC transaction number to be query YES 16 CCGM48FGLP11H8MT
A parameter with the digital signature will ensure the legality of the current request (for specific algorithm please refer to APPENDIX1). The query result will return the related information of the corresponding transaction (complying with the information in PSN), along with the JSON encoding data. If the appointed transaction does not exist, it will return a 404 HTTP response code.
Typical example of query request:
    REQUEST
    POST /gateway/transaction/index HTTP/1.1
    Host: sandbox.glocash.com
    ...

    REQ_EMAIL=account123%40merchant77.com&REQ_TIMES=1466492149&TNS_GCID=CCGM48FGLP11H8MT&REQ_SIGN=c8aa2f1cea7850e83688c9ceb618a8d17fb8f50db84861f0c64b998c5bbd7e4e
    RESPONSE
    HTTP/1.1 200 OK
    Date: Fri, 01 Dec 2017 08:15:25 GMT
    ...

    {"CCGM48FGLP11H8MT":{"REQ_INVOICE":"ORDER1234567890","CUS_EMAIL":"customer789@gmail.com","BIL_METHOD":"CCG","BIL_PRICE":"3.79","BIL_CURRENCY":"USD","REQ_EMAIL":"account123@merchant77.com","REQ_SANDBOX":"ON","TNS_UTIMES":1512371781.833,"TNS_GCID":"CCGM48FGLP11H8MT","REQ_REFERER":"https:\/\/www.merchant77.com\/checkout.php","BIL_IPADDR":"123.123.123.123","PGW_PRICE":"3.18","PGW_CURRENCY":"EUR","FDL_DECISION":"ACP","BIL_STATUS":"paid","REQ_TIMES":1512371788,"REQ_SIGN":"789e9d6691adae0f3d7d50b49b0682b18f3c48b068ef8a6d0321a716f47ac34c"}}
    JSON DECODED
    {
        CCGM48FGLP11H8MT: {
            REQ_INVOICE: "ORDER1234567890",
            CUS_EMAIL: "customer789@gmail.com",
            BIL_METHOD: "CCG",
            BIL_PRICE: "3.79",
            BIL_CURRENCY: "USD",
            REQ_EMAIL: "account123@merchant77.com",
            REQ_SANDBOX: "ON",
            TNS_UTIMES: 1512371781.833,
            TNS_GCID: "CCGM48FGLP11H8MT",
            REQ_REFERER: "https://www.merchant77.com/checkout.php",
            BIL_IPADDR: "123.123.123.123",
            PGW_PRICE: "3.18",
            PGW_CURRENCY: "EUR",
            FDL_DECISION: "ACP",
            BIL_STATUS: "paid",
            REQ_TIMES: 1512371788,
            REQ_SIGN: "789e9d6691adae0f3d7d50b49b0682b18f3c48b068ef8a6d0321a716f47ac34c",
        }
    }
9. SANDBOX
When the payment request is initiated through the sandbox mode, GC Gateway will create a testing transaction. The sandbox payment page won't appear any actual payment operations, instead it will directly display the final transaction status (can be configured in the merchant center):
The testing transaction can use the query interface (sandbox), and also carry out the payment status notification (PSN). The difference is that the transaction information will include a parameter that identifies the sandbox mode:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    REQ_SANDBOX If the value is ON, then it's in the sandbox mode - 2 ON
NOTICE: After completed the testing processes, please contact your account manager to enable the live mode.
10. REFUND REQUEST
GC Gateway provides a real-time refund interface:
  • Sandbox - https://sandbox.glocash.com/gateway/transaction/refund
  • LIVE - https://pay.glocash.com/gateway/transaction/refund
The merchant system can submit an order for refund through this interface. A refund request that meets the requirements will contain the following necessary parameters:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    REQ_TIMES The UNIX timestamp currently being requested YES 10 1466492149
    REQ_EMAIL Merchant’s GC account mailbox YES 255 account123@merchant77.com
    REQ_SIGN The digital signature currently being requested (see Appendix 1) YES 64 c8aa2f1cea7850e83688c9ceb618a8d17fb8f50db84861f0c64b998c5bbd7e4e
    TNS_GCID GC transaction serial number to be refunded YES 16 CCGM48FGLP11H8MT
    PGW_PRICE Transaction amount to be refunded (support partial refund) YES 16 10
A parameter with the digital signature will ensure the legality of the current request (for specific algorithm please refer to APPENDIX1). The refund result will return the corresponding status and the JSON encoded data. If the REQ_CODE is 200, the refund is successful.
Typical refund request example:
    REQUEST
    POST /gateway/transaction/refund HTTP/1.1
    Host: sandbox.glocash.com
    ...

    REQ_EMAIL=account123%40merchant77.com&REQ_TIMES=1466492149&TNS_GCID=CCGM48FGLP11H8MT&PGW_PRICE=10&REQ_SIGN=c8aa2f1cea7850e83688c9ceb618a8d17fb8f50db84861f0c64b998c5bbd7e4e
    RESPONSE
    HTTP/1.1 200 OK
    Date: Fri, 01 Dec 2017 08:15:25 GMT
    ...

    '{"REQ_CODE":200,"REQ_ERROR":"REFUND SUCCESS"}'
    JSON DECODED
    {
            REQ_CODE: 200,
            REQ_ERROR: "REFUND SUCCESS",
    }
APPENDIX1: DIGITAL SIGNATURE
Payment request (initiated by the merchant system):
    REQ_SIGN = SHA256 ( SECRET_KEY + REQ_TIMES + REQ_EMAIL + REQ_INVOICE + CUS_EMAIL + BIL_METHOD + BIL_PRICE + BIL_CURRENCY )
    NOTE: For the detail of parameters, please refer to APPENDIX2. SECRET_KEY is the secret key of the merchant account.
Query request (initiated by the merchant system):
    REQ_SIGN = SHA256 ( SECRET_KEY + REQ_TIMES + REQ_EMAIL + TNS_GCID )
    NOTE: For the detail of parameters, please refer to APPENDIX4. SECRET_KEY is the secret key of the merchant account.
PSN request (initiated by GC Gateway):
    REQ_SIGN = SHA256 ( SECRET_KEY + REQ_TIMES + REQ_EMAIL + CUS_EMAIL + TNS_GCID + BIL_STATUS + BIL_METHOD + PGW_PRICE + PGW_CURRENCY )
    NOTE: For the detail of parameters, please refer to APPENDIX3. SECRET_KEY is the secret key of the merchant account.
Refund request (initiated by the merchant system):
    REQ_SIGN = SHA256 ( SECRET_KEY + REQ_TIMES + REQ_EMAIL + TNS_GCID + PGW_PRICE )
APPENDIX2: PARAMETER LIST OF PAYMENT REQUEST
Complete parameter list as follow:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    REQ_TIMES UNIX timestamp of the current request YES 10 1466492149
    REQ_EMAIL GC account email of the merchant YES 255 account123@merchant77.com
    REQ_INVOICE Order number created by the merchant system (numbers, uppercase and lowercase characters, symbol _ and - are allowed) YES 64 ORDER1234567890
    REQ_SIGN Digital signature of the current request YES 64 8a8d17fb8f50db848c8aa2f850e83688c9ceb611cea761f0c64b998c5bbd7e4e
    REQ_MERCHANT Merchant name displayed in the payment page - 32 MERCHANT-77 LTD.
    BIL_CC3DS Whether to enable 3DS authentication or not for credit card payment (enable when it's not 0) - 1 1
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    CUS_EMAIL Email of the payer YES 255 customer789@gmail.com
    CUS_COUNTRY Country code of the payer (ISO3166) - 2 US
    CUS_STATE State/County/Region of the payer - 64 New York
    CUS_CITY City of the payer - 32 Rochester
    CUS_ADDRESS Address of the payer - 255 333 Lexington Avenue, 7th Floor, Room 701
    CUS_POSTAL Postal code of the payer - 16 10017
    CUS_PHONE Telephone number of the payer (country code|number) - 32 86|65430127
    CUS_MOBILE mobile number of the payer (country code|number) - 32 86|13913913913
    CUS_IMUSR IM username of the payer (type|name) - 255 skype:user2345
    CUS_FNAME First name of the payer - 32 John
    CUS_LNAME Last name of the payer - 32 Smith
    CUS_REGISTER registration time of the payer in the merchant system (UNIX timestamp) - 10 1466452149
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    BIL_GOODSNAME Product description displayed in the payment page - 255 Smart Phone P238 x1
    BIL_QUANTITY Product quantity - 10 3
    BIL_PRICE Total amount of the payment YES 16 37.86
    BIL_CURRENCY The currency code of the payment (ISO4217) YES 3 USD
    BIL_METHOD Code of the payment method (see APPENDIX6 for details) - 3 C01
    BIL_PRCCODE Pricing code of a specific payment method - 255 9487545
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    URL_SUCCESS Redirecting URL of successful payment - 255 https://www.merchant77.com/success.php?order=ORDER1234567890
    URL_PENDING Redirecting URL of payment in process - 255 https://www.merchant77.com/pending.php?order=ORDER1234567890
    URL_FAILED Redirecting URL of failed payment - 255 https://www.merchant77.com/failed.php?order=ORDER1234567890
    URL_NOTIFY Request URL of the PSN - 255 https://www.merchant77.com/notification.php?order=ORDER1234567890
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    CUSTOM_FD0 Merchant customized parameter 0 - 255 123456
    CUSTOM_FD7 Merchant customized parameter 7 - 255 ONEtwo three fourfive
APPENDIX3: PARAMETER LIST OF PAYMENT STATUS NOTIFICATION (PSN)
Complete parameter list as follow:
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    REQ_TIMES UNIX timestamp of the current request YES 10 1466492149
    REQ_EMAIL GC account email of the merchant YES 255 account123@merchant77.com
    REQ_INVOICE Order number created by the merchant (submitted by payment request) YES 64 ORDER1234567890
    REQ_SIGN Digital signature of the current request YES 64 8a8d17fb8f50db848c8aa2f850e83688c9ceb611cea761f0c64b998c5bbd7e4e
    REQ_REFERER Referer URL of the payment page - 255 https://www.merchant77.com/checkout.php
    REQ_SANDBOX If the value is ON, then it's in the sandbox mode - 2 ON
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    CUS_EMAIL Email of the payer (submitted by payment request) YES 255 customer789@gmail.com
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    TNS_GCID GC transaction number YES 16 CCGM48FGLP11H8MT
    TNS_UTIMES UNIX timestamp of transaction creation YES 16 1512360895.5831
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    BIL_PRICE Total amount of the request (submitted by payment request) YES 16 37.86
    BIL_CURRENCY The currency code of the request (submitted by payment request) YES 3 USD
    BIL_METHOD Code of the payment method YES 3 C01
    BIL_IPADDR Payer's IP address (v4/v6) in the payment page YES 40 123.123.123.123
    BIL_STATUS Payment status of the current transaction (see APPENDIX4 for details) YES 16 paid
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    PGW_PRICE Actual paid amount of the current transaction - 16 37.86
    PGW_CURRENCY The currency code of the paid amount (ISO4217) - 3 USD
    PGW_CCHOLDER The card holder's name for credit card payment - 64 John Smith
    PGW_CC3DS 3DS result for credit card payment (authorized when it's not 0) - 1 3
    PGW_MESSAGE Related information returned by gateway (e.g. error messages) - 255 payment success.
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    FDL_DECISION Risk decision of the current transaction (see APPENDIX5 for details) - 3 REV
    PARAMETER DESCRIPTION MAND LEN VALUE EXAMPLE
    CUSTOM_FD0 Merchant customized parameter 0 (submitted by payment request) - 255 123456
    CUSTOM_FD7 Merchant customized parameter 7 (submitted by payment request) - 255 ONEtwo three fourfive
APPENDIX4: TRANSACTION STATUS
Complete status list as follow:
    STATUS DESCRIPTION
    unpaid The payment is successfully paid
    paid The payment is unpaid
    pending The payment is in progress
    cancelled The payment is cancelled (operated by the payer)
    failed The payment is failed
    refunding The refund is in process
    refunded The payment is fully refunded
    complaint The payment is held due to a complaint/dispute (initiated by the payer)
    chargeback The payment is reversed due to a chargeback
APPENDIX5: RISK DECISION
Complete decision list as follow:
    DECISION DESCRIPTION
    ACP Passed the risk rules
    REV Risky transaction to be reviewed
    REJ Refused the payment or a refund is recommended (high risk)
    BAN Refused the payment (high risk and blacklist)
APPENDIX6: AVAILABLE PAYMENT METHOD
Please contact your account manager to confirm and activate relevant payment methods in your business area.
    REQ_EMKEY
    REQ_SANDBOX
    INVOICE_REPEAT_MAX
    TNS_GCID
    REFUND FAILED
    BIL_CURRENCY
    CREDIT_CARD_FAILED_MAX
    REQ_REFERER
    BIL_CCNUMBER
    PGW_GATEWAY
1. Payment list and name description
A list of payment methods supported by the GLOCASHPAYMENT payment gateway system (BIL_METHOD allowed list):
    BIL_METHOD code Payment type Description
    C01 pay by credit card Credit card payment is a way for customers to use their credit cards to pay instantly to the other party's account through the network. After the payment is successful, the payment will immediately enter the account provided by the merchant. The credit card payment method is flexible and has a wide range of use.
    P01 paysafecard Online payments An online payment that does not require a bank account or a credit card, it is simple to use :)
    T01 Telephone payment How consumers use a telephone (fixed telephone, mobile phone, PHS) or other similar terminal device to complete payment
    L01 Bitcoin Payment Pay with virtual e-currency bitcoin
    L02 Boleto Payment The mainstream cash payment method in Brazil is regulated by the Brazilian government under the supervision of the Brazilian Central Bank. Customers can go to any Brazilian bank, ATM machine, Caipiao outlet or use online banking to authorize bank transfer
    L03 Dragonpay Payment Dragonpay is an online payment service provided by a Philippine company and is a safe and reliable online payment method.
    L04 Cherry Credits Payment Singapore's digital payment provider, a virtual credit card that allows people of all ages to make secure online payments. Users purchase a cherry card and recharge it to an account.
    L07
    L08
    L09
    L10
    L11
    L12
    L13
    L14
    L15
    L16
    L17
    L18
    L19
    L20
    L21
    L22
    L23
    L24
    L25
    L26
    L27
    L28
    L29
    L30
    L31
    L32
    M01
    M02
    M03