Virtual Card's module API

Last updated: June 1st, 2020

Service Methods

The GPS PAY API services provide only such types of transactions to be implemented for 3rd Party Companies (Merchants) on their Side (Web Site or APP’s) for their customer to running transaction out of BGIpay Web Site System. 3rd Party Companies (Merchants) must Supply the IP addresses from where will send the API Request.
Service URL:
Development:
https://test.bgpay.me/APIMerchantServices/”servicemethodrequest”
Live:
https://gpspay.io/APIMerchantServices/”servicemethodrequest”

ALL THE CODE EXAMPLES WHERE DOING ON DEVELOPMENT ENVIROMENT!

Useful Tip:

You can use this online HTML entity encoder/decoder to generate your code examples.

Virtual_Card/Issue
This Method is used to issue a Virtual Card to the customer.
<!HTTP CODE EXAMPLE REQUEST>
GET /APIMerchantServices/virtual_card/issue?ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&ReqCHolderID=155&ReqPassword=0408 HTTP/1.1
Host: test.bgpay.me 
                                                                                        
                                        
<!cURL CODE EXAMPLE REQUEST>
curl --location --request GET 'https://test.bgpay.me/APIMerchantServices/virtual_card/issue?
ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&ReqCHolderID=155&ReqPassword=0408' \

                                    
<!JSON CODE EXAMPLE RESPONSE>
{
    "ErrorCode": 0,
    "cardNumber": 5183750203813082,
    "expMonth": 09,
    "expYear": 2021,
    "cvv": 186,
    "AuthNo": "047578"
}
                                                                                    
                                    
Virtual_Card/Fund
This Method is used to load funds to customer's virtual card.
<!HTTP CODE EXAMPLE REQUEST>
GET /APIMerchantServices/virtual_card/fund?ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&
ReqMMerchantID=239&ReqVirtualCardNo=5183750203813082&ReqAmount=1 HTTP/1.1
Host: test.bgpay.me                                      
                                                                                        
                                        
<!cURL CODE EXAMPLE REQUEST>
curl --location --request GET 'https://test.bgpay.me/APIMerchantServices/virtual_card/fund?ReqMerchantID=154&
ReqToken=i0mQHBMqDxa0UNgx&ReqMMerchantID=239&ReqVirtualCardNo=5183750203813082&ReqAmount=1' \


                                    
<!JSON CODE EXAMPLE RESPONSE>
{
    "ErrorCode": 0,
    "Balance": "$5.00",
    "AuthNo": "125478"
}
                                                                                    
                                    
Virtual_Card/Cards
This Method is used to GET registered Customer's Virtual Cards.
<!HTTP CODE EXAMPLE REQUEST>
GET /APIMerchantServices/virtual_card/cards?ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&ReqCHolderID=155 HTTP/1.1
Host: test.bgpay.me                                                                      
                                                                                        
                                        
<!cURL CODE EXAMPLE REQUEST>
curl --location --request GET 'https://test.bgpay.me/APIMerchantServices/virtual_card/cards?
ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&ReqCHolderID=155' \

                                    
<!JSON CODE EXAMPLE RESPONSE>
{
    "Cards": [
        {
            "CardNo": "****9360",
            "HolderName": "jose suarez"
        },
        {
            "CardNo": "****3549",
            "HolderName": "jose suarez"
        },
        {
            "CardNo": "****3556",
            "HolderName": "jose suarez"
        }
    ]
}
                                                                                    
                                    
Virtual_Card/Balance
This Method is used to request Virtual Card balance.
<!HTTP CODE EXAMPLE REQUEST>
GET /APIMerchantServices/virtual_card/balance?ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&
ReqVirtualCardNo=5183750203813082 HTTP/1.1
Host: test.bgpay.me                                                                      
                                                                                        
                                        
<!cURL CODE EXAMPLE REQUEST>
curl --location --request GET 'https://test.bgpay.me/APIMerchantServices/virtual_card/balance?
ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&ReqVirtualCardNo=5183750203813082' \

                                    
<!JSON CODE EXAMPLE RESPONSE>
{
    "ErrorCode": 0,
    "Balance": "$5.00"
}
                                                                                    
                                    
Virtual_Card/Load
This Method is used to load funds from Customer Account to customer's virtual card.
<!HTTP CODE EXAMPLE REQUEST>
GET /APIMobile/virtual_card/load?ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx
&ReqCHolderID=369&ReqPassword=0408&ReqVirtualCardNumber=5183752231672274&ReqAmount=25 HTTP/1.1
Host: test.bgpay.me                                     
                                                                                        
                                        
<!cURL CODE EXAMPLE REQUEST>
curl --location --request GET 'https://test.bgpay.me/APIMobile/virtual_card/load?ReqMerchantID=154
&ReqToken=i0mQHBMqDxa0UNgx&ReqCHolderID=369&ReqPassword=0408&ReqVirtualCardNumber=5183752231672274&ReqAmount=25' \


                                    
<!JSON CODE EXAMPLE RESPONSE>
{
    "ErrorCode": 0,
    "Amount": 22.95,
    "Fee": 2.95,
    "AuthNo": "004604"
}
                                                                                    
                                    
Virtual_Card/Trans
This Method is used to request Virtual Card transactions.
<!HTTP CODE EXAMPLE REQUEST>
GET /APIMerchantServices/virtual_card/trans?ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&
ReqVirtualCardNo=5183750203813082&ReqEndDate=3/15/2021 HTTP/1.1
Host: test.bgpay.me
                 
                                        
<!cURL CODE EXAMPLE REQUEST>
curl --location --request GET 'https://test.bgpay.me/APIMerchantServices/virtual_card/trans?
ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&ReqVirtualCardNo=5183750203813082&ReqEndDate=3/15/2021' \

                                    
<!JSON CODE EXAMPLE RESPONSE>
{
    "status": 0,
    "Transacciones": [
        {
            "status": 0,
            "Transacciones": [
            {
                "ID": 1,
                "Description": "Purchase (Chip)",
                "Reference": "015813095623",
                "Amt": -3.02,
                "Inserted": "03/09/2021  9: 54: 57 AM",
                "Merchant": "MIRIAM J RIVAS P Y O C   CCS NOROESTE VE",
                "authno": "245885"
            },
            {
                "ID": 2,
                "Description": "Purchase (Chip)",
                "Reference": "015813452955",
                "Amt": -2.75,
                "Inserted": "03/09/2021  9: 50: 08 AM",
                "Merchant": "IVAN DARIO FLORES DUQU   CCS NOROESTE VE",
                "authno": "243045"
            },
            {
                "ID": 3,
                "Description": "Purchase (Chip)",
                "Reference": "015814361288",
                "Amt": -1.76,
                "Inserted": "03/08/2021  9: 32: 21 AM",
                "Merchant": "INVERSIONES M.M. 2005, C.DISTRITO CAPIVE",
                "authno": "232872"
            },
            {
                "ID": 4,
                "Description": "Purchase (Chip)",
                "Reference": "015813437533",
                "Amt": -2.52,
                "Inserted": "03/06/2021  9: 20: 27 AM",
                "Merchant": "INVERSIONES CESAMIRR C   CCS NOROESTE VE",
                "authno": "226286"
            },
            {
                "ID": 5,
                "Description": "Purchase (Chip)",
                "Reference": "015813362271",
                "Amt": -8.7,
                "Inserted": "06/06/2020  9: 14: 48 AM",
                "Merchant": "INVERSIONES MIL OJOS     CARACAS      VE",
                "authno": "223406"
            },
            {
                "ID": 6,
                "Description": "Purchase (Chip)",
                "Reference": "015813352022",
                "Amt": -8.7,
                "Inserted": "03/06/2021  9: 13: 48 AM",
                "Merchant": "INVERSIONES MIL OJOS     CARACAS      VE",
                "authno": "222898"
            },
            {
                "ID": 7,
                "Description": "Purchase (Chip)",
                "Reference": "015812133794",
                "Amt": -25.84,
                "Inserted": "06/06/2020  8: 50: 58 AM",
                "Merchant": "REPRESENTACIONES MUNDO URCARACAS      VE",
                "authno": "211591"
            },
            {
                "ID": 8,
                "Description": "Purchase (Chip)",
                "Reference": "015812827831",
                "Amt": -4.16,
                "Inserted": "03/06/2021  8: 08: 33 AM",
                "Merchant": "DISTRIPLATANO C.A.       CARACAS      VE",
                "authno": "191302"
            },
            {
                "ID": 9,
                "Description": "Value Load",
                "Reference": "CC00959F1D61",
                "Amt": 50,
                "Inserted": "03/06/2021  2: 50: 51 PM",
                "Merchant": "SWIFTPREPAIDGENA2ACOUNTER",
                "authno": "334660"
            },
            {
                "ID": 10,
                "Description": "Value Load",
                "Reference": "CC009C3C0E89",
                "Amt": 50,
                "Inserted": "03/03/2021  2: 50: 50 PM",
                "Merchant": "SWIFTPREPAIDGENA2ACOUNTER",
                "AuthNo": "110642"
            }
            ]
        }
    ]
}
                                                                                    
                                    
Virtual_Card/Purchase
This Method is used to get paid with Virtual Card on Merchants .
<!HTTP CODE EXAMPLE REQUEST>
GET /APIMerchantServices/virtual_card/purchase?ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&
ReqMMerchantID=154&ReqVirtualCardNo=4842246580949652&ReqAmount=1 HTTP/1.1
Host: test.bgpay.me                                                                                                                
                                                                                        
                                        
<!cURL CODE EXAMPLE REQUEST>
curl --location --request GET 'https://test.bgpay.me/APIMerchantServices/virtual_card/purchase?
ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&ReqMMerchantID=154&ReqVirtualCardNo=4842246580949652&ReqAmount=1' \

                                    
<!JSON CODE EXAMPLE RESPONSE>
{
    "ErrorCode": 0,
    "Balance": "$6.67",
    "AuthNo": "146927"
}
                                            
                                    
Virtual_Card/Transfer
This Method is used to transfer money from one Virtual Card to an other Virtual Card.
<!HTTP CODE EXAMPLE REQUEST>
GET /APIMerchantServices/virtual_card/transfer?ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&ReqVirtualCardNo=4842246580676065&
ReqVirtualCardNoTo=4842246580949652&ReqAmount=1 HTTP/1.1
Host: test.bgpay.me                                                                                                                                                           
                                                                                        
                                        
<!cURL CODE EXAMPLE REQUEST>
curl --location --request GET 'https://test.bgpay.me/APIMerchantServices/virtual_card/transfer?
ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx&ReqVirtualCardNo=4842246580676065&ReqVirtualCardNoTo=4842246580949652&ReqAmount=1' \

                                    
<!JSON CODE EXAMPLE RESPONSE>
{
    "ErrorCode": 0,
    "Sender": "Jose",
    "Receiver": "Pedro",
    "AuthNo": "006993"
}
                                                                                    
                                    
Virtual_Card/MerBalance
This Method is used to get the Virtual Card Wallet Balance.
<!HTTP CODE EXAMPLE REQUEST>
GET /APIMerchantServices/virtual_card/MerBalance?ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx HTTP/1.1
Host: test.bgpay.me                                                                                                                                     
                                                                                        
                                        
<!cURL CODE EXAMPLE REQUEST>
curl --location --request GET 'https://test.bgpay.me/APIMerchantServices/virtual_card/MerBalance?ReqMerchantID=154&ReqToken=i0mQHBMqDxa0UNgx' \

                                    
<!JSON CODE EXAMPLE RESPONSE>
{
    "ErrorCode": 0,
    "Balance":"$10.91"
}
                                                                                    
                                    

Tables

The information about the Parameters in the Methods Request are showing in the Tables below.

SWIFT OUTPUT PARAMETERS
# Field Name DataType Size Description
1 Description A/N 30 Description of transaction, ties back to the requestcode
2 Reference A/N 40 Retrieval reference number associated to transaction
3 Amt money 8 amount of transaction; This is a signed field (i.e. negative values have a negative sign) If value return = 0, transaction has no impact to purse
4 Inserted datetime 8 date/time it was inserted to FIS data base
2 Merchant A/N 300 For non-POS transactions, will reflect the source description used for the transaction (ex: Manual Batch Loader, Direct Access Settlement, A2A User Source Description, etc.)
3 AuthCode A/N 6 Autorization code for POS purchase...0 is a decline or not authorized transaction
Request Parameters
# Parameter Name Type Description
1 ReqMerchantID Numeric The “MerchantID” is the primary account identifier
2 ReqToken String The token that is provided by BestGlobalPayments to the merchant for merchant identification.
3 CFirstName String Customer’s First name
4 CLastName String Customer’s Last name
5 PhoneNumber String Customer's cellular phone number (Numbers only)
6 CProvinceID String Customer’s Province or State Address
7 CCountryID String The Id of the country (USA, GTM, VEN, etc)
8 CCityID String Customer’s City Address.
9 CAddress String Customer’s Postal Address.
10 CSIN String The ID number as it appears on the customer identification (ONLY 9 DIGITS)
11 ReqCHolderID String The Account/card Holder ID Number
12 ReqPassword String Customer’s PIN Password
13 ZipCode String Customer’s ZIP Postal Code Address
14 ReqAmount String Amount to load account/card
15 CardTypeID String VVC (Visa Card) or VMC (MasterCard
16 ReqStrTotal String Amount to transfer to other Account/Card
17 ReqVirtualCardNo String A string of up to 16 digits Virtual Card Number
18 ReqEndDate String A string representing the end date to pull the card’s transactions in the following format MM/DD/YYYY. The system will return all transactions that happen within the previous 31 days from this end date.
19 ReqMMerchantID String The MerchantID of the Entity receiving Virtual Cards payments
20 ReqVirtualCardNoTo String A string of up to 16 digits Virtual Card Number to transfer money