GrabPay
Overview
GrabPay is a payment method which allows to process payments by using GrabPay e-wallet. Purchases can be processed by using Payment Page and Gate, payouts by using Gate and Dashboard.
General information
Payment method type | digital wallet payments |
---|---|
Payment instruments | digital wallets |
Countries and regions | PH |
Payment currencies | PHP |
Currency conversion | on the ecommpay side |
Purchases | + |
Payouts | + |
Stored credentials payments | – |
Full refunds | + |
Partial refunds | + |
Chargebacks | – |
Notes | full and partial refunds are available only directly from the provider service |
Onboarding and access fee | refer to your ecommpay key account manager |
Interaction diagram
Payment processing by using the GrabPay payment method requires merchant's web service, one of ecommpay interfaces, and the ecommpay payment platform, as well as GrabPay technical facilities.
Operations support
Interfaces | Amounts, PHP | Times** | ||||||
---|---|---|---|---|---|---|---|---|
Payment Page | CMS Plug-ins | Gate | Dashboard | minimum | maximum | basic | threshold | |
Purchases | + | – | + | – | 20.00 | 20,000.00 | 30 minutes | 1 day |
Payouts | – | – | + | + | 1.00 | 50,000.00 | 24 hours | 48 hours |
Full refunds | * | – | * | – | * | * | * | * |
Partial refunds | * | – | * | – | * | * | * | * |
* To request a full or partial refund, customer needs to submit the online refund form.
** The basic and threshold times are defined as follows:
- The basic time is the average estimated time between the moment a payment is initiated in the payment platform to the moment the payment result is sent to the initiator. The basic time evaluation is made on the assumption of normal operation of all technical facilities and communication channels and typical customer behaviour (if any input from customer is required). Use the basic time to estimate when to react to the absence of payment result notifications or when to check payment status.
- The threshold time is the maximum possible time between the moment a payment is initiated in the payment platform to the moment the initiator receives the callback with the payment result. A payment is automatically declined, if its waiting time exceeds the threshold time. For individual setting of the threshold time limit, contact ecommpay technical support.
Processing scenarios
In the GrabPay method, to perform a purchase operation, you need to redirect customer to the GrabPay service, while to initiate a payout, you need to receive a request from a customer via your web service.
Figure: Purchase by using Payment Page
Figure: Purchase by using Gate
Figure: Payout by using Gate
The sections that follow provide detailed information about what you need to perform payments and how you can analyse the information on payments and operations.
Purchases by using Payment Page
General information
In the GrabPay method, when processing a purchase by using Payment Page, the merchant web service should send a request with all the required parameters and signature to the ecommpay URL and get the callback with the payment result from the payment platform. When opening Payment Page, you can have Payment Page opened with the GrabPay method selected. For more information about preselecting payment methods, see in Preselecting payment methods. The full sequence and particularities of the purchase process are provided below.
Figure: Purchase by using Payment Page
- A customer initiates a purchase on the merchant's web service.
- The web service sends the request for Payment Page opening to the specified ecommpay URL.
- The request for opening is redirected to the payment platform.
- The payment platform performs the initial request processing that involves validation of the required parameters and signature.
- Requested Payment Page is generated into the ecommpay payment platform as specified in the project settings and the request parameters.
- Payment Page is displayed to the customer.
- The customer selects the GrabPay method.
- The payment platform receives the purchase request for payment processing from Payment Page.
- The payment platform performs the internal purchase request processing and sends it to the GrabPay service.
- The purchase request is processed on the GrabPay service side.
- The GrabPay service generates the data for redirecting the customer to its website form and sends it to the payment platform.
- The payment platform sends the customer redirection data to Payment Page.
- The customer is redirected to the GrabPay website.
- The customer completes all the payment steps required.
- The payment is processed on the GrabPay side.
- The information on the payment result is sent from the GrabPay side to the specified customer email address.
- The customer is redirected to Payment Page.
- The GrabPay service sends the result notification to the payment platform.
- The payment platform sends a callback with the payment result to the web service.
- The payment platform sends the result to Payment Page.
- A page with the payment result information is displayed to the customer on Payment Page.
The sections that follow discuss in more details the request format and the Payment Page parameters to use in the GrabPay payment method and provide the information on the format of callbacks with payment results. For the general information on how to use the API, see Payment Page API Description.
Request format
There are several things you need to consider when using the GrabPay method:
- You must provide values for the basic minimum of parameters. Listed below are the parameters that are mandatory for any payment method:
- customer_id—the unique ID of the customer within your project
- project_id—the project ID obtained from ecommpay
- payment_id—payment ID unique within the project
- payment_currency—payment currency in ISO-4217 alpha-3 format
- payment_amount—payment amount in minor units
- It is recommended to specify the e-mail address of the customer in the customer_email additional parameters. If the request is missing the parameter, on Payment Page the additional field is displayed to the customer to input missing data. If the parameter is specified in the request, n Payment Page the additional pre-filled field is displayed to the customer. The field contains the value specified in the request, the customer can verify or change the email.
- If you need to have payment form displayed with the GrabPay method selected, set the force_payment_method parameter to
grabpay-wallet
. - If required, you can also add any other additional parameters Payment Page supports.
- After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign a payment request, see Signature generation and verification.
Thus, a correct payment request in the GrabPay method must include project, customer and payment IDs, the currency and the amount of a payment, customer email address and signature as shown in the following example:
{ payment_id: 'ECT_TEST_1547', payment_amount: 1000, payment_currency: 'PHP', project_id: 210, customer_id: '123', customer_email: 'test@example.com', signature: "kUi2x9dKHAVNU0FYldJrxh4yo+K...tT4DqtVUkDJrOcZzUCwX6R\/ekpZhkIQg==" }
For information about all parameters available in the GrabPay method, see Parameters for opening payment form.
Callback format
The GrabPay method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.
The following is the example of a callback with an information about successful 10.00 PHP
purchase in the 239
project.
Figure: Example of a successful purchase callback
{ "project_id": 239, "payment": { "id": "EPfa87-bcfd", "type": "purchase", "status": "success", "date": "2020-03-06T14:11:00+0000", "method": "Grabpay wallet", "sum": { "amount": 1000, "currency": "PHP" }, "description": "" }, "operation": { "id": 464, "type": "sale", "status": "success", "date": "2020-03-06T14:11:00+0000", "created_date": "2020-03-06T14:10:34+0000", "request_id": "f6ab99eb0940e43a774b969cb74a88ef08eec6c8951-00000001", "sum_initial": { "amount": 1000, "currency": "PHP" }, "sum_converted": { "amount": 1000, "currency": "PHP" }, "code": "0", "message": "Success", "provider": { "id": 1369, "payment_id": "7QKID3P3", "auth_code": "", "date": "2020-03-06T14:10:54+0000" } }, "signature": "YZKXHr2ZdK3tPqiMzPpSJZ...+WGku5dANQAVWPteHKmwzMQ+mvGoA==" } }
The following is the example of a callback for a purchase declined due to amount or frequency limitation.
Figure: Example of a declined purchase callback
{ "project_id": 239, "payment": { "id": "EPfa87-bcfc", "type": "purchase", "status": "decline", "date": "2020-03-07T14:11:00+0000", "method": "Grabpay wallet", "sum": { "amount": 200000000, "currency": "PHP" }, "description": "" }, "operation": { "id": 465, "type": "sale", "status": "decline", "date": "2020-03-07T14:11:00+0000", "created_date": "2020-03-06T14:10:34+0000", "request_id": "f6ab99eb0940e43a774b969cb74a88ef08eec6c8951-00000002", "sum_initial": { "amount": 200000000, "currency": "PHP" }, "sum_converted": { "amount": 200000000, "currency": "PHP" }, "code": "20101", "message": "Decline due to amount or frequency limit", "provider": { "id": 1369, "payment_id": "7QKID3P3", "auth_code": "", "date": "2020-03-06T14:10:54+0000" } }, "signature": "YZKXHr2ZdK3tPqiMzPpSJZ...+WGku5dANQAVWPteHKmwzMQ+mvGob==" } }
Related topics
The following topics might be useful when implementing payments by using Payment Page:
Purchases by using Gate
General information
In the GrabPay method, when processing a purchase by using Gate, the merchant web service is required to do the following:
- Send a request with all the required parameters and signature to the ecommpay URL.
- Perform the redirection of a customer to the GrabPay service.
- Get the callback with the payment result from the payment platform.
The following diagram provides the detailed picture of the payment processing procedure.
Figure: Purchase by using Gate
- A customer initiates a purchase through GrabPay on the merchant's web service side.
- The web service sends the request for processing the purchase by using Gate to the specified ecommpay URL.
- The payment platform receives the request for processing the purchase from Gate.
- The payment platform performs the initial request processing that includes validation of the required parameters and signature.
- The payment platform sends the response with request receipt confirmation and correctness check result to the web service. For more information, see Response format.
- The payment platform performs the internal payment request processing and redirects the request to the GrabPay service.
- The request is processed on the GrabPay side.
- The GrabPay service sends the data for redirecting the customer to the GrabPay service to the payment platform.
- The payment platform sends the callback with the redirection data in the redirect_data object to the web service.
- The customer is redirected from the web service to the GrabPay service.
- The customer completes all the payment steps required.
- The payment is processed on the GrabPay side.
- The information on the payment result is sent from the GrabPay side to the specified customer email address.
- The customer is redirected to the merchant's web service.
- The GrabPay service sends the payment result notification to the payment platform.
- The payment platform sends a callback to the web service.
- The customer receives the payment result on the web service.
The sections that follow discuss in more details the request format and the Gate parameters to use in the GrabPay payment method and provide the information on the format of callbacks with purchase results.
Request format
There are several things you must consider when using purchase requests in the GrabPay method:- You send purchase requests by sending the
v2/payment/wallet/grabpay/sale
request by using the POST HTTP method . This is an e-wallet payments request group: /v2/payment/wallet/{payment_method}/sale. - The following objects and parameters must be specified in any request:
- Object general—general request identification information:
- project_id—the project ID obtained from ecommpay
- payment_id—payment ID unique within the project
- signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification.
- Object payment—payment information:
- amount—purchase amount in minor units
- currency—purchase currency in ISO-4217 alpha-3 format
- Object customer—customer information:
- id—the unique ID of the customer within your project
- email—email address
- ip_address—IP address
- Object return_url—contains the URLs to which customer is redirected while or after payment processing:
- success—URL to return customer to the web service after a successful payment.
- Object general—general request identification information:
- If required, you can also add any other additional parameters Gate supports.
- After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign a payment request, see Signature generation and verification.
Thus, a correct payment request in the GrabPay method must include project, customer and payment IDs, signature, currency and amount of the purchase, customer information and URL for redirection, as shown in the following example:
Figure: Example of a purchase request
{ "general": { "project_id": 580, "payment_id": "test_grabpay_sale", "signature": "pgwRHcfv2OTsdILn33R5Nr/ymu08nMx/9FSeIqYHTTd6YhIiLWw==" }, "payment": { "amount": 1000, "currency": "PHP" }, "customer": { "id": "123", "email": "test_customer@example.com", "ip_address": "1.1.1.1" }, "return_url": { "success": "http://example.com/success" } }
Formats of the customer redirection data
To redirect a customer from the web service to the GrabPay site, you must receive a callback from the payment platform containing the URL for redirection in the redirect_data.url parameter and data to be sent in the request body in the redirect_data.body parameter, and use these parameters when opening the HTML page using the method specified in the redirect_data.method parameter.
The following is the callback fragment containing the redirection information.
"redirect_data": {
"body": {},
"method": "GET",
"url": "https://test.ph/Pay.aspx?tokenid=3f511c2d&procid=BITC"
}
Callback format
The GrabPay method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.
The following is the example of a callback with an information about successful 10.00 PHP
purchase in the 239
project.
Figure: Example of a successful purchase callback
{ "project_id": 239, "payment": { "id": "EPfa87-bcfd", "type": "purchase", "status": "success", "date": "2020-03-06T14:11:00+0000", "method": "Grabpay wallet", "sum": { "amount": 1000, "currency": "PHP" }, "description": "" }, "operation": { "id": 464, "type": "sale", "status": "success", "date": "2020-03-06T14:11:00+0000", "created_date": "2020-03-06T14:10:34+0000", "request_id": "f6ab99eb0940e43a774b969cb74a88ef08eec6c8951-00000001", "sum_initial": { "amount": 1000, "currency": "PHP" }, "sum_converted": { "amount": 1000, "currency": "PHP" }, "code": "0", "message": "Success", "provider": { "id": 1369, "payment_id": "7QKID3P3", "auth_code": "", "date": "2020-03-06T14:10:54+0000" } }, "signature": "YZKXHr2ZdK3tPqiMzPpSJZ...+WGku5dANQAVWPteHKmwzMQ+mvGoA==" } }
The following is the example of a callback for a purchase declined due to amount or frequency limitation.
Figure: Example of a declined purchase callback
{ "project_id": 239, "payment": { "id": "EPfa87-bcfc", "type": "purchase", "status": "decline", "date": "2020-03-07T14:11:00+0000", "method": "Grabpay wallet", "sum": { "amount": 200000000, "currency": "PHP" }, "description": "" }, "operation": { "id": 465, "type": "sale", "status": "decline", "date": "2020-03-07T14:11:00+0000", "created_date": "2020-03-06T14:10:34+0000", "request_id": "f6ab99eb0940e43a774b969cb74a88ef08eec6c8951-00000002", "sum_initial": { "amount": 200000000, "currency": "PHP" }, "sum_converted": { "amount": 200000000, "currency": "PHP" }, "code": "20101", "message": "Decline due to amount or frequency limit", "provider": { "id": 1369, "payment_id": "7QKID3P3", "auth_code": "", "date": "2020-03-06T14:10:54+0000" } }, "signature": "YZKXHr2ZdK3tPqiMzPpSJZ...+WGku5dANQAVWPteHKmwzMQ+mvGob==" } }
Related topics
The following topics might be useful when implementing payments through Gate:
Payouts by using Gate
General information
To perform a payout by using the GrabPay method, merchant's web service sends a request with all the required parameters and signature to ecommpay URL, and receives a callback with the payment result. The full sequence of the payout process is provided below.
Figure: Payout sequence by using Gate
- A customer orders a payout through the GrabPay system.
- Merchant's web service sends the payout request for processing the payout by using Gate to the appropriate ecommpay URL.
- Gate redirects the request to the ecommpay payment platform.
- The payment platform performs all the necessary check and processes the request.
- The reply with the request processing results is sent to the merchant's web service. For more information, see Response format.
- The payment platform redirects the payout request to the GrabPay service.
- The payout is processed on the GrabPay side.
- The GrabPay service sends the result notification to the payment platform.
- The payment platform sends a callback with the payment result to the web service.
- The customer receives the payout result from the web service.
The sections that follow discuss in more details the request format and the Gate parameters to use in the GrabPay payment method and provide the information on the format of callbacks with payout results.
Request format
There are several things you must consider when using payout requests in the GrabPay method:- You perform payouts by sending the request to
/v2/payment/wallet/grabpay/payout
by using POST (HTTP) method. This request belongs to e-wallets request group: /v2/payment/wallet/{payment_method}/payout - The following objects and parameters must be specified in any request:
- Object general—general payout information:
- project_id—project identifier
- payment_id—unique payout identifier
- signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification.
- Object payment—payout information:
- amount—payout amount in minor units
- currency—payout currency in ISO-4217 alpha-3 format
- Object customer—customer information:
- id—identifier, unique within the project
- ip_address—IP address
- Object account—customer account information:
- number—account identifier, must consist of 11 digits starting with
09
- customer_name—full customer name
- number—account identifier, must consist of 11 digits starting with
- Object general—general payout information:
- If required, you can also add any other additional parameters that are supported by Gate .
Thus, a correct payout request in the GrabPay method must include project and payment IDs, signature, full customer data, currency, amount and currency of the payout, as shown in the following example:
Figure: Payout request example
{ "general": { "project_id": 603, "payment_id": "1000003", "signature": "PJkV8ej/UG0Di8hTng6JvC7vQsaC6tajQVVLhNN5e7cV...==" }, "customer": { "id": "111232323", "ip_address": "1.1.1.1" }, "payment": { "amount": 1000, "currency": "PHP" }, "account": { "number": "09123456789", "customer_name": "John Doe" } }
Callback format
In the GrabPay method, the callbacks that deliver payout results use the standard format described in Callbacks.
The following is the example of a callback with the information about successful 10.00 PHP
payout made for the customer in the 445
project.
Figure: Example of a successful payout callback
{ "project_id": 445, "payment": { "id": "10615_110613_51729356", "type": "payout", "status": "success", "date": "2021-06-15T08:06:25+0000", "method": "Grabpay wallet", "sum": { "amount": 1000, "currency": "PHP" }, "description": "payout" }, "account": { "number": "123123" }, "customer": { "id": "1234", "phone": "09123456789" }, "operation": { "id": 592, "type": "payout", "status": "success", "date": "2021-06-15T08:06:25+0000", "created_date": "2021-06-15T08:06:14+0000", "request_id": "bdec3c53155f87d1f59c0e16043cf7c9a-00000001", "sum_initial": { "amount": 1000, "currency": "PHP" }, "sum_converted": { "amount": 1000, "currency": "PHP" }, "code": "0", "message": "Success", "provider": { "id": 1994, "payment_id": "RS2PHYOBG5", "auth_code": "", "endpoint_id": "GRPY", "date": "2021-06-15T00:06:24+0000" } }, "signature": "xndoWc28knuz24ZeVBdQadwSRXgPYIDqN/M3ZOEYI7A==" }
The following is the example of a callback for a payout rejected due to amount or frequency limitation.
Figure: Example of a declined payout callback
{ "project_id": 445, "payment": { "id": "10615_110613_51729357", "type": "payout", "status": "decline", "date": "2021-06-15T08:07:25+0000", "method": "Grabpay wallet", "sum": { "amount": 1000, "currency": "PHP" }, "description": "payout" }, "account": { "number": "123123" }, "customer": { "id": "1234", "phone": "09123456789" }, "operation": { "id": 592, "type": "payout", "status": "decline", "date": "2021-06-15T08:06:25+0000", "created_date": "2021-06-15T08:06:14+0000", "request_id": "bdec3c53155f87d1f59c0e16043cf7c9a-00000002", "sum_initial": { "amount": 1000, "currency": "PHP" }, "sum_converted": { "amount": 1000, "currency": "PHP" }, "code": "20000", "message": "General decline", "provider": { "id": 1994, "payment_id": "RS2PHYOBG6", "auth_code": "", "endpoint_id": "GRPY", "date": "2021-06-15T00:06:24+0000" } }, "signature": "xndoWc28knuz24ZeVBdQadwSRXgPYIDqN/M3ZOEYI6A==" }
Related topics
The following topics might be useful when implementing payments by using Gate:
Payouts by using Dashboard
When working with Dashboard, you can process single and mass payouts by using the GrabPay method.
- To process a single payout, open the payout form, specify all required parameters (including the payment method), send a request and verify that the payout has been processed.
-
To process a mass payout, prepare and upload a file with information about all target payouts, send a batch request, and verify that the payouts have been processed.
Use a CSV file structured according to the requirements presented in the Mass payments data section. The payout parameters must comply with the requirements (you do not have to generate a signature because it is specified by Dashboard).
More information about processing payouts by using Dashboard is presented in a separate section.
Analysis of payments results
As with other payment methods ecommpay offers, when using the GrabPay method, you have several options to analyse the information about payments and operations performed by using the method—alone or in conjunction with other methods.
You can load and analyse all the necessary information in Dashboard, for instance you can use the analytic panels on the Analytics tab to this end.
Also, you can export the information for further analysis by using third party analytical tools. The following options are available:
- Dashboard allows you to download reports in CSV and XLS formats—by using the tools on the Payments tab. You can perform export as a one-time download to your local computer or have payment data regularly exported and delivered to email addresses you specify.
- Data API allows you to have payment information exported in JSON format and delivered to a URL you specify. The payment information is exported by using the /operations/get queries.
If you have any further questions regarding payment data analysis, contact ecommpay technical support.