Get started

                        API Endpoint

                        https://api.starspaceshop.com/rapidpay_api/
                    

Welcome to the Rapidpays API! Our API can let you access to Rapidpays API endpoint to sending bill to your customer in order to make payment.

Our API is organized around REST. JSON will be returned in all responses from the API, including errors. The API will be accepted form-data with POST method.

To use this API, you need an API key. Please contact us at [email protected] to get your own API key.

create a bill

                        
                            # Here is a curl example
                            curl \
                            -X POST http://api.starspaceshop.com/rapidpay_api/create_bill/ \
                            -F 'secret_key=your_api_key' \
                            -F 'customer_code=P0001' \
                            -F 'amount=100' \
                            -F 'return_url=your_return_url' \
                            -F 'callback_url=your_callback_url' \
                            -F 'bank_key=your_bank_key' \
                            -F 'remark=Rapidpays testing API' \
                        
                    

                        
                            Result example :

                            result: [
                                {
                                    "customer_code": "P0001",
                                    "transaction_id": "TT_1",
                                    "transaction_date": "2021-09-29 14:46:23",
                                    "payment_link": "https://bill.rapidpays.com?id=TT_1&s=43ef77ba0ad2bd2de8ee2eb76aa6dd472a398616",
                                    "status": "SUCCESS",
                                    "message": "bill created successful."
                                }
                                ]
                            }
                        
                    

QUERY PARAMETERS

Field Type Description
secret_key String Your API key.
customer_code String Your customer code. This customer code have to generate by merchant side and pass to us. It's use to recognize which transaction from which customer.
amount Double(10,2) Your transaction amount.
return_url String Return url is bring the customer to which merchant page when customer done make transaction.
callback_url String Callback url is to let merchant know the status of transaction.
bank_key String Your bank key, if you have more than one bank, you can choose which bank you want the transaction transfer to.
remark String (Optional) You can put your remark here.
bank_code String (Optional) You can direct put the bank code here to bring the customer direct to specific bank page. Please refer to Payment Bank

RESPONSE PARAMETERS

Field Type Description
customer_code String This customer code is generated by merchant and merchant have to save down the code for customer next time transaction.
transaction_id String This is your transaction ID to verify or check the transaction status.
transaction_date Datetime Your transaction amount.
payment_link String This is payment link that you have to redirect customer go to.
status String This is the status for the API call, mostly will have SUCCESS or ERROR
message String Here will print out the error or success message when you call the API.

check a bill

                        
                            # Here is a curl example
                            curl \
                            -X POST http://api.starspaceshop.com/rapidpay_api/check_bill \
                            -F 'transaction_id=TT_1' \
                        
                    

                        
                            Result example :

                            result: [
                                {
                                    "status": "SUCCESS",
                                    "transaction_id": "TT_1",
                                    "customer_code": "P0001",
                                    "amount": "100.00",
                                    "transaction_date": "2021-09-29 14:46:23",
                                    "bank_to": "afe4c43a096e23f69ade664002c364595fc5b5ba",
                                    "bank_time": null,
                                    "reference_number": null,
                                    "remark": "testing purpose only",
                                    "return_url": "https://www.rapidpays.com",
                                    "callback_url": "https://www.rapidpays.com",
                                    "state": "PENDING"
                                }
                                ]
                            }
                        
                    

QUERY PARAMETERS

Field Type Description
transaction_id String Your transaction id.

RESPONSE PARAMETERS

Field Type Description
bank_time Datetime The transaction complete datetime
reference_number String Bank to bank reference number
state ENUM(PENDING, SUCCESS, FAILED) This is the status for transaction.

add bank

                        
                            # Here is a curl example
                            curl \
                            -X POST http://api.starspaceshop.com/rapidpay_api/add_bank/ \
                            -F 'secret_key=your_api_key' \
                            -F 'bank_holder_name=testing' \
                            -F 'bank_account=1234567888' \
                            -F 'bank_code=MayBank' \
                            -F 'tran_limit=0' \
                            -F 'tran_count=0' \
                        
                    

Every add bank action will be temporary in PENDING status, it have to wait our staff to verify and approve.


                        
                            Result example :

                            result: [
                                {
                                    "bank_code": "MayBank",
                                    "bank_holder_name": "testing",
                                    "bank_account": "1234567888",
                                    "type": "NORMAL",
                                    "tran_limit": "0",
                                    "tran_count": "0",
                                    "isActive": "Y",
                                    "state": "PENDING",
                                    "status": "SUCCESS",
                                    "message": "Bank has been added successful, please wait for verification.",
                                    "bank_key": "44e79aa1ec87be10c8546d1388a716d52b114379"
                                }
                                ]
                            }
                        
                    

QUERY PARAMETERS

Field Type Description
secret_key String Your API key.
bank_holder_name String Your bank holder name
bank_account String Your bank account
bank_code String Please refer to Bank Code Table.
tran_limit Double(10,2) Transaction Limit is to control your bank daily transaction, by default is 0 (unlimited), you can self change the limit like daily receive total transaction amount with 1,000 then Rapidpays will check either Transaction Limit or Transaction Count reach the limit first.
tran_count Integer Transaction Count is to check the count of daily transaction, by default is 0 (unlimited), you can change the count with 100 which mean Rapidpays will check either Transaction Limit or Transaction Count reach the limit.

RESPONSE PARAMETERS

Field Type Description
bank_code String Please refer to Bank Code Table
bank_holder_name String Your bank holder name
bank_account String Your bank account
state String This is your bank status, have to wait until our verification finish.
bank_key String Your bank key

add emergency bank

                        
                            # Here is a curl example
                            curl \
                            -X POST http://api.starspaceshop.com/rapidpay_api/add_emergency_bank/ \
                            -F 'secret_key=your_api_key' \
                            -F 'bank_holder_name=testing' \
                            -F 'bank_account=2032000000' \
                            -F 'bank_code=HlbBank' \
                        
                    

You only allow to add ONE emergency bank in your merchant. Emergency bank will only allow 500 transaction limit OR 50 transaction count.


                        
                            Result example :

                            result: [
                                {
                                    "bank_code": "HlbBank",
                                    "bank_holder_name": "testing",
                                    "bank_account": "2032000000",
                                    "type": "EMERGENCY",
                                    "TranLimit": "500",
                                    "TranCount": "50",
                                    "isActive": "ACTIVE",
                                    "state": "ACTIVE",
                                    "status": "SUCCESS",
                                    "message": "Emergency bank has been successfully inserted.",
                                    "bank_key": "18420fb07957fb3817fba357f534ed320e0d03f9"
                                }
                                ]
                            }
                        
                    

QUERY PARAMETERS

Field Type Description
secret_key String Your API key.
bank_holder_name String Your bank holder name
bank_account String Your bank account.
bank_code String Please refer to Bank Code Table

update bank

                        
                            # Here is a curl example
                            curl \
                            -X POST http://api.starspaceshop.com/rapidpay_api/update_bank/ \
                            -F 'secret_key=your_api_key' \
                            -F 'bank_key=your_bank_key' \
                            -F 'isActive=ACTIVE' \
                            -F 'tran_limit=10000' \
                            -F 'tran_count=100' \
                            
                        
                    

                        
                            Result example :
                            result: [
                                {
                                  "status": "SUCCESS",
                                  "message": "Bank update successfully"
                                }
                                ]
                            }
                        
                    

QUERY PARAMETERS

Field Type Description
secret_key String Your API key.
bank_key String Your bank key
isActive ENUM(ACTIVE, INACTIVE) (OPTIONAL) If you want to temporary stop the bank to receive payment, you can update your bank to INACTIVE.
tran_limit double(10,2) (OPTIONAL) Update your bank transaction limit
tran_count integer (OPTIONAL) Update your transaction count.

Bank Code Table

Bank Code
PUBLIC BANK PbeBank
MAYBANK MayBank
CIMB BANK CimbBank
RHB BANK RhbBank
BANK RAKYAT BankRakyat
BANK ISLAM BankIslam
AM BANK AmBank
HONG LEONG BANK HlbBank
BANK SIMPANAN NASIONAL (BSN) BSN
ALLIANCE BANK AllianceBank
AFFIN BANK AffinBank
HSBC BANK HSBCBank
AGRO BANK AgroBank
STANDARD CHARTERED BANK SCBank
MUAMALAT BANK MuamalatBank
UOB BANK UOBBank
OCBC BANK OCBCBank
AL-RAJHI BANK ARBank
CITI BANK CitiBank
TOUCH'N GO Tng
KASIKORN BANK (KBANK) KBank
KRUNG THAI BANK (KTB) KrungThaiBank
MAYBANK QRPAY MayBankQR
SCB BANK SCBBank
KRUNGSRI BANK (BAY) KrungsriBank
BANGKOK BANK BangkokBank
DUITNOW QR / E-WALLET PAYMENT DuitNowQR
MANDIRI BANK MandiriBank
CIMB NIAGA CimbNiagaBank
BANK CENTRAL ASIA (BCA) BCA
BANK RAKYAT INDONESIA (BRI) BRI
BANK NEGARA INDONESIA (BNI) BNI
BANK DANAMON DanamonBank
PERMATA BANK PermataBank
PROMPTPAY PromptPay
QRIS Qris
BANK FOR AGRICULTURE AND AGRICULTURAL COOPERATIVES (BAAC) BAACBank
QR PH QRPh
GCASH Gcash
BANK OF THE PHILIPPINE ISLANDS (BPI) BPI
CDM CDM
UNIONBANK OF THE PHILIPPINES UnionBankPH
RIZAL COMMERCIAL BANKING CORPORATION (RCBC) RCBCBank
METROPOLITAN BANK & TRUST COMPANY (METROBANK) MetroBank

Payment Table

Bank Code
PUBLIC BANK PbeBank
MAYBANK MayBank
CIMB BANK CimbBank
RHB BANK RhbBank
BANK ISLAM BankIslam
AM BANK AmBank
HONG LEONG BANK HlbBank
BANK SIMPANAN NASIONAL (BSN) BSN
ALLIANCE BANK AllianceBank
AFFIN BANK AffinBank
KASIKORN BANK (KBANK) KBank
MAYBANK QRPAY MayBankQR
SCB BANK SCBBank
KRUNGSRI BANK (BAY) KrungsriBank
BANGKOK BANK BangkokBank
DUITNOW QR / E-WALLET PAYMENT DuitNowQR
CIMB NIAGA CimbNiagaBank
PERMATA BANK PermataBank
PROMPTPAY PromptPay
QRIS Qris