Promptpay
Overview
Promptpay is a payment method which allows customers to make purchases in Thailand by scanning standardized QR codes with the mobile banking applications of the Thailand banks. Purchases can be processed by using Payment Page and Gate, and in both cases two channels can be used—purchase processing via channel 1 involves redirection of the customer to the provider service, and purchase processing via channel 2 is performed without redirection of the customer. For more information about the applicable processing way, refer to your Monetix key account manager. Download the logo in vector format here. |
Payment method type | Payments by using QR code |
---|---|
Countries and regions | Thailand |
Payment currencies | THB |
Currency conversion | |
Purchases | |
Payouts | |
COF payments | |
Full refunds | |
Partial refunds | |
Chargebacks | |
Notes |
|
Onboarding and access fee | Refer to your Monetix key account manager |
Interaction diagram
Payment processing by using the Promptpay payment method requires merchant's web service, one of Monetix interfaces, and the Monetix payment platform, as well as provider technical facilities.
Operations support
Interfaces | Amounts, THB * | Times | |||||
---|---|---|---|---|---|---|---|
Payment Page | Gate | Dashboard | minimum | maximum | basic | threshold | |
Purchases | * | * | within 20 minutes | *** |
* For the information about the amount limits, contact your Monetix key account manager.
You can check the payment amount limits in your project by using Dashboard. To check your payment amount limits, go to Dashboard, select the Projects section and click the Payment methods tab.
Processing scenarios
Purchase processing by using the Promptpay method can be performed with or without redirection of the customer to the provider service.
The following sections provide detailed information about what you need to do to perform payments and how you can analyze the information on payments and operations.
Purchase by using Payment Page. Channel 1: with redirection of the customer
General information
In the Promptpay 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 Monetix 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 Promptpay 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.
- A customer initiates a purchase on the merchant's web service.
- The web service sends the request for Payment Page opening to the specified Monetix 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 Monetix payment platform as specified in the project settings and the request parameters.
- Payment Page is displayed to the customer.
- The customer selects the Promptpay method.
- The payment platform receives the purchase request for payment processing from Payment Page.
- The payment platform performs the internal purchase request processing.
- The payment platform sends the customer redirection data to Payment Page.
- The customer is redirected to the provider website.
- The customer completes all the payment steps required.
- The payment is processed on the provider side.
- The customer is redirected to Payment Page.
- The provider 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 Promptpay 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 Promptpay method:
- You must provide values for the basic minimum of parameters. Listed below are the parameters that are required for any payment method:
- project_id—project ID you obtained from Monetix
- payment_id—payment ID unique within the project
- customer_id—the unique ID of the customer within your project
- customer_email—customer email
- customer_first_name—customer first name
- customer_last_name—customer last name
- payment_currency—payment currency in ISO-4217 alpha-3 format
- payment_amount—payment amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
- The currency of payment can only be THB.
- If you need to have payment form displayed with the Promptpay method selected, set the force_payment_method parameter to
promptpay
. - 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.
Here is an example of data from a request for Payment Page opening:
EPayWidget.run( { project_id: 1234, payment_id: 'payment_47', customer_id: 'customer_123', customer_first_name: 'John', customer_last_name: 'Doe', customer_email: 'johndoe@example.com', payment_currency: 'THB', payment_amount: 1000, signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO\/RLUkDJrOcZzUCwX6R\/ekpZhkIQg==" } )
For information about all parameters available in the Promptpay method, see Payment Page invocation parameters.
Callback format
The Promptpay method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks in Payment Page.
The following is the example of a callback with an information about successful 1000.00 THB
purchase made by the 123
customer in the 382
project.
{ "project_id": 382, "payment": { "type": "purchase", "sum": { "amount": 100000, "currency": "THB" }, "status": "success", "method": "promptpay", "id": "cfaf576641101077ec3440ffaf476a9d", "date": "2020-09-07T12:44:54+0000" }, "customer": { "id": "123" }, "operation": { "type": "sale", "sum_initial": { "currency": "THB", "amount": 100000 }, "sum_converted": { "currency": "THB", "amount": 100000 }, "status": "success", "request_id": "057cdba3b2b54b994a5f9c3c4080ff...fdec3b0b0be6b-00089013", "provider": { "payment_id": "079253339", "id": 3351, "date": "2020-09-07T04:44:52+0000" }, "message": "Success", "id": 89012010009801, "date": "2020-09-07T12:44:54+0000", "created_date": "2020-09-07T12:42:17+0000", "code": "0" }, "signature": "mwiKFBdPKMUEmDieNYeJ...w0R0GGfIBVExvubTbimclPgfx2/CY8Yq+g==" } }
The following is the example of a callback for a declined purchase.
{ "project_id": 383, "payment": { "type": "purchase", "sum": { "amount": 185384, "currency": "THB" }, "status": "decline", "method": "promptpay", "id": "bde45cdea1ac5c4a75e2d04689a06ad4", "date": "2020-09-07T11:01:34+0000" }, "customer": { "id": "456" }, "operation": { "type": "sale", "sum_initial": { "currency": "THB", "amount": 185384 }, "sum_converted": { "currency": "THB", "amount": 185384 }, "status": "decline", "request_id": "c7d5631fdd81a4394e85d82...eb70af0e207f1a133-00085510", "provider": { "payment_id": "079243093", "id": 3351, "date": "2020-09-07T03:01:32+0000" }, "message": "General decline", "id": 85509010009741, "date": "2020-09-07T11:01:34+0000", "created_date": "2020-09-07T10:09:31+0000", "code": "20000" }, "signature": "FEPNq/ijls1WTCdNdz8FD1bM6kWe04AO...Lri/KEHcn/ihMSmzv/cNmQ==" } }
Related topics
The following topics might be useful when implementing payments by using Payment Page:
Purchase by using Payment Page. Channel 2: without redirection of the customer
General information
To process a purchase through Payment Page by using the Promptpay method, the merchant web service needs to send a request with all the required parameters and signature to the Monetix URL and receive a callback with the payment result from the payment platform. The Promptpay method can also be set as preselected payment method when Payment Page opens. For more information about preselecting payment methods, see the Preselecting payment methods section. The full sequence and special aspects of the purchase processing are provided below.
- Customer initiates a purchase in merchant's web service.
- The web service sends the request for opening Payment Page to the specified Monetix URL.
- The request for opening Payment Page is sent to the payment platform.
- The payment platform performs initial request processing which includes validation of the required parameters and signature.
- In the Monetix payment platform Payment Page is generated based on the project settings and parameters specified in the request.
- Payment Page is displayed to the customer.
- The customer selects the Promptpay method.
- The request for processing the payment is sent from Payment Page to the payment platform.
- The payment platform processes the request.
- The data for displaying the payment instructions to the customer is sent from the payment platform to Payment Page.
- The payment instructions are displayed to the customer.
- The customer completes all required payment steps.
- The payment is processed on the side of the provider service.
- The provider service sends a notification about the result to the payment platform.
- The payment platform sends the callback with the payment result to the web service.
- The payment platform sends the notification about the result to Payment Page.
- Information about the payment result is displayed to the customer on Payment Page.
The following sections provide the detailed information about the request format and the Payment Page parameters to use in the Promptpay 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 Promptpay method:
- You must provide values for the basic minimum of parameters. Listed below are the parameters that are required for any payment method:
- project_id—project ID you obtained from Monetix
- payment_id—payment ID unique within the project
- customer_id—the unique ID of the customer within your project
- customer_email—customer email
- customer_first_name—customer first name
- customer_last_name—customer last name
- payment_currency—payment currency in ISO-4217 alpha-3 format
- payment_amount—payment amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
- The currency of payment can only be THB.
- If you need the payment form to open with the Payment Page method as preselected payment method, set the force_payment_method parameter to
promptpay
. - If required, you can also add any other additional parameters Payment Page supports. All parameters available for payment processing by using the Promptpay method are provided in the Payment Page invocation parameters section.
- 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.
Here is an example of data from a request for Payment Page opening:
EPayWidget.run( { project_id: 1234, payment_id: 'payment_47', customer_id: 'customer_123', customer_first_name: 'John', customer_last_name: 'Doe', customer_email: 'johndoe@example.com', payment_currency: 'THB', payment_amount: 1000, signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO\/RLUkDJrOcZzUCwX6R\/ekpZhkIQg==" } )
Callback format
The Promptpay method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks in Payment Page.
The following is the example of a callback with an information about successful 1000.00 THB
purchase made by the 123
customer in the 456
project.
{ "project_id": 456, "payment": { "id": "125", "type": "purchase", "status": "success", "date": "2021-02-15T10:34:21+0000", "method": "promptpay", "sum": { "amount": 100000, "currency": "THB" }, "description": "" }, "customer": { "id": "123" }, "operation": { "id": 76, "type": "sale", "status": "success", "date": "2021-02-15T10:34:21+0000", "created_date": "2021-02-15T10:33:59+0000", "request_id": "a8ee115e2c7f2f9cd69a743f...c161bf1fcde0-00000001", "sum_initial": { "amount": 100000, "currency": "THB" }, "sum_converted": { "amount": 100000, "currency": "THB" }, "code": "0", "message": "Success", "provider": { "id": 4821, "payment_id": "0123456789", "auth_code": "", "date": "2021-02-15T10:34:13+0000" } }, "signature": "+II2IHZ3IjQcqVsIZ9oYb...atXOn2Czyo7L8g9NN1+WVtR+MGQ==" } }
The following is the example of a callback for a declined purchase.
{ "project_id": 321, "payment": { "id": "ABC456", "type": "purchase", "status": "decline", "date": "2021-03-11T14:01:41+0000", "method": "promptpay", "sum": { "amount": 100000, "currency": "THB" }, "description": "" }, "operation": { "id": 123456789, "type": "sale", "status": "decline", "date": "2021-03-11T14:01:41+0000", "created_date": "2021-03-11T07:07:18+0000", "request_id": "09916aa29732a5e59890c409adaa1fd671...ca33-00088600", "sum_initial": { "amount": 100000, "currency": "THB" }, "sum_converted": { "amount": 100000, "currency": "THB" }, "code": "20000", "message": "General decline", "provider": { "id": 4821, "payment_id": "", "auth_code": "" } }, "signature": "Lk+5aUd6Hp3lR6ZRPXXA0vJ78tdwOrY80kTp...2f1ilyK1bkNrYw==" } }
Related topics
The following topics might be useful when implementing payments by using Payment Page:
Purchase by using Gate. Channel 1: with redirection of the customer
General information
In the Promptpay 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 Monetix URL.
- Perform the redirection of a customer to the provider service.
- Get the callback with the payment result from the payment platform.
The following diagram provides the detailed picture of the payment processing procedure.
- A customer initiates a purchase through provider on the merchant's web service side.
- The web service sends the request for processing the purchase by using Gate to the specified Monetix 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 structure.
- The payment platform performs the internal purchase request processing.
- 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 provider service.
- The customer completes all the payment steps required.
- The payment is processed on the provider side.
- The customer is redirected to the merchant's web service.
- The provider 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 Promptpay 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 Promptpay method:- You send purchase requests by sending the request to
/v2/payment/banks/promptpay/sale
by using the POST (HTTP) method. This request belongs to the following request group /v2/payment/banks/{payment_method}/sale. - The following objects and parameters must be specified in any request:
- general—object with general request identification information:
- project_id—the project ID you obtained from Monetix
- 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.
- customer—object with customer information:
- id—the unique ID of the customer within your project
- ip_address—IP address of the customer's device
- email—customer email
- first_name—customer first name
- last_name—customer last name
- payment—object with purchase information:
- amount—purchase amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
- currency—code of purchase currency in the ISO-4217 alpha-3 format
- return_url—object with the information where to redirect the customer to when the payment is completed:
- success—the URL to redirect the customer to after the payment is successfully completed.
- general—object with general request identification information:
- The following parameters with the return URLs are optional, but we strongly advise you to specify them in the request to provide your customer a better user experience.
- return_url—object with the information where to redirect the customer to when the payment is completed or prematurely terminated by the customer:
- decline—the URL to redirect the customer to after the payment is declined.
- return—the URL to redirect the customer to when they prematurely terminate the payment. This URL is also used if the decline parameter is not specified in the request.
- return_url—object with the information where to redirect the customer to when the payment is completed or prematurely terminated by the customer:
- The currency of purchase can only be THB.
- If required, you can also add any other additional parameters Gate supports.
Here is an example of data from a purchase request in the Promptpay method.
{ "general": { "project_id": 1234, "payment_id": "payment_47", "signature": "PJkV8ej\/UG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA==" }, "customer": { "id": "customer_123", "ip_address": "198.51.100.47", "first_name": "John", "last_name": "Doe", "email": "johndoe@example.com" }, "payment": { "amount": 10000, "currency": "THB" }, "return_url": { "success": "https://example.com/success/", "decline": "https://example.com/decline/", "return": "https://example.com/return/" } }
Format of customer redirection data
After receiving and processing your purchase request, the payment platform sends a callback to your web service containing the data to redirect the customer to the provider service.
To redirect the customer, use the values of the following parameters in the redirect_data object:
- url—the URL to redirect the customer to
- body—the data to be sent in the request body
- method—the HTTP method to get an HTML page of the website (for example, POST or GET)
- encrypted—this is the service parameter. Ignore the data it contains.
Here is an example of a piece of callback containing the data to redirect the customer.
"redirect_data": { "method": "POST", "body": { "example_parameter_1": "value_1", "example_parameter_2": "value_2" }, "encrypted": [], "url": "https://example.com/redirect" }
Callback format
The Promptpay method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks in Gate.
The following is the example of a callback with an information about successful 1000.00 THB
purchase made by the 123
customer in the 382
project.
{ "project_id": 382, "payment": { "type": "purchase", "sum": { "amount": 100000, "currency": "THB" }, "status": "success", "method": "promptpay", "id": "cfaf576641101077ec3440ffaf476a9d", "date": "2020-09-07T12:44:54+0000" }, "customer": { "id": "123" }, "operation": { "type": "sale", "sum_initial": { "currency": "THB", "amount": 100000 }, "sum_converted": { "currency": "THB", "amount": 100000 }, "status": "success", "request_id": "057cdba3b2b54b994a5f9c3c4080ff...fdec3b0b0be6b-00089013", "provider": { "payment_id": "079253339", "id": 3351, "date": "2020-09-07T04:44:52+0000" }, "message": "Success", "id": 89012010009801, "date": "2020-09-07T12:44:54+0000", "created_date": "2020-09-07T12:42:17+0000", "code": "0" }, "signature": "mwiKFBdPKMUEmDieNYeJ...w0R0GGfIBVExvubTbimclPgfx2/CY8Yq+g==" } }
The following is the example of a callback for a declined purchase.
{ "project_id": 383, "payment": { "type": "purchase", "sum": { "amount": 185384, "currency": "THB" }, "status": "decline", "method": "promptpay", "id": "bde45cdea1ac5c4a75e2d04689a06ad4", "date": "2020-09-07T11:01:34+0000" }, "customer": { "id": "456" }, "operation": { "type": "sale", "sum_initial": { "currency": "THB", "amount": 185384 }, "sum_converted": { "currency": "THB", "amount": 185384 }, "status": "decline", "request_id": "c7d5631fdd81a4394e85d82...eb70af0e207f1a133-00085510", "provider": { "payment_id": "079243093", "id": 3351, "date": "2020-09-07T03:01:32+0000" }, "message": "General decline", "id": 85509010009741, "date": "2020-09-07T11:01:34+0000", "created_date": "2020-09-07T10:09:31+0000", "code": "20000" }, "signature": "FEPNq/ijls1WTCdNdz8FD1bM6kWe04AO...Lri/KEHcn/ihMSmzv/cNmQ==" } }
Related topics
The following topics might be useful when implementing payments through Gate:
Purchase by using Gate. Channel 2: without redirection of the customer
General information
In the Promptpay methods, 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 Monetix URL.
- Display the payment instructions to the customer.
- Get the callback with the payment result from the payment platform.
The following diagram provides the detailed picture of the payment processing procedure.
- A customer initiates a purchase through Promptpay on the merchant's web service side.
- The web service sends the request for processing the purchase by using Gate to the specified Monetix 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 structure.
- The payment platform performs the internal payment request processing.
- The payment platform sends the callback with the payment instructions data to the web service.
- The payment instructions are displayed to the customer.
- The customer completes all the payment steps required.
- The payment is processed on the provider service side.
- The provider 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 Promptpay 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 Promptpay method:- You send purchase requests by sending the request to
/v2/payment/banks/promptpay/sale
by using the POST (HTTP) method. This request belongs to the following request group /v2/payment/banks/{payment_method}/sale. - The following objects and parameters must be specified in any request:
- general—object with general request identification information:
- project_id—the project ID you obtained from Monetix
- 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.
- customer—object with customer information:
- id—the unique ID of the customer within your project
- ip_address—IP address of the customer's device
- email—customer email
- first_name—customer first name
- last_name—customer last name
- payment—object with purchase information:
- amount—purchase amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
- currency—code of purchase currency in the ISO-4217 alpha-3 format
- general—object with general request identification information:
- The currency of purchase can only be THB.
- If required, you can also add any other additional parameters Gate supports.
Here is an example of data from a purchase request in the Promptpay method.
{ "general": { "project_id": 1234, "payment_id": "payment_47", "signature": "PJkV8ej\/UG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA==" }, "customer": { "id": "customer_123", "ip_address": "198.51.100.47", "first_name": "John", "last_name": "Doe", "email": "johndoe@example.com" }, "payment": { "amount": 10000, "currency": "THB" } }
Formats of data for displaying the payment instructions
To display the payment instructions to the customer, you must receive and process a callback from the payment platform containing the payment data in the in the display_data array and display the customer the payment instructions to the customer.
The array display_data contains the following parameters:
- type—data type (the value is always
qr_img
) - title—title of the data which needs to be displayed to the customer (the value is always
QR code
) - data—string which contains the coded image of the QR code. The QR code is generated in compliance with the ISO 18004:2006 standard.
The following is the callback fragment containing the payment data.
"display_data": [
{
"type": "qr_img",
"title": "QR code",
"data": "0001101021230620016A000000677010112011505...764540510.005802TH6304XXXX"
}
]
Callback format
The Promptpay method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks in Gate.
The following is the example of a callback with an information about successful 1000.00 THB
purchase made by the 123
customer in the 456
project.
{ "project_id": 456, "payment": { "id": "125", "type": "purchase", "status": "success", "date": "2021-02-15T10:34:21+0000", "method": "promptpay", "sum": { "amount": 100000, "currency": "THB" }, "description": "" }, "customer": { "id": "123" }, "operation": { "id": 76, "type": "sale", "status": "success", "date": "2021-02-15T10:34:21+0000", "created_date": "2021-02-15T10:33:59+0000", "request_id": "a8ee115e2c7f2f9cd69a743f...c161bf1fcde0-00000001", "sum_initial": { "amount": 100000, "currency": "THB" }, "sum_converted": { "amount": 100000, "currency": "THB" }, "code": "0", "message": "Success", "provider": { "id": 4821, "payment_id": "0123456789", "auth_code": "", "date": "2021-02-15T10:34:13+0000" } }, "signature": "+II2IHZ3IjQcqVsIZ9oYb...atXOn2Czyo7L8g9NN1+WVtR+MGQ==" } }
The following is the example of a callback for a declined purchase.
{ "project_id": 321, "payment": { "id": "ABC456", "type": "purchase", "status": "decline", "date": "2021-03-11T14:01:41+0000", "method": "promptpay", "sum": { "amount": 100000, "currency": "THB" }, "description": "" }, "operation": { "id": 123456789, "type": "sale", "status": "decline", "date": "2021-03-11T14:01:41+0000", "created_date": "2021-03-11T07:07:18+0000", "request_id": "09916aa29732a5e59890c409adaa1fd671...ca33-00088600", "sum_initial": { "amount": 100000, "currency": "THB" }, "sum_converted": { "amount": 100000, "currency": "THB" }, "code": "20000", "message": "General decline", "provider": { "id": 4821, "payment_id": "", "auth_code": "" } }, "signature": "Lk+5aUd6Hp3lR6ZRPXXA0vJ78tdwOrY80kTp...2f1ilyK1bkNrYw==" } }
Related topics
The following topics might be useful when implementing payments through Gate:
Testing
General information
You can perform test purchases with the Promptpay payment method by using Payment Page and Gate.
To perform test purchases, you'll need the test project ID and the secret key to it. To get them, please contact the technical support team at support@monetix.pro and then contact your Monetix key account manager to set up a test environment to work with the Promptpay payment method.
When performing test payments, keep in mind that:
- your requests must contain the test project ID
- the payment currency that you send in requests can be only THB
- random values may be used as the payment ID and in the parameters with customer information
- the interface of the test checkout page may be different from the production one.
Test payments statuses
To receive one of the following statuses in the callback with the test purchase result, use a particular value for the purchase amount in the request:
40000
and40400
—to receive a callback with the decline status90000
—to receive a callback with the success status and a purchase amount different from the amount in the request- any other value—to receive a callback with the success status
Testing purchase by using Payment Page
To perform a test purchase by using Payment Page:
- Send a request for purchase through Payment Page to the payment platform.
- Choose a payment method on the test checkout page. If you've passed the force_payment_method parameter with the
promptpay
value in the request, you won't have to choose the payment method. - Specify a random first name and last name in the data entry fields. The payment instructions will be displayed to you after.
- Accept a callback with information about the test purchase result.
- Wait a few seconds until the result of the test purchase is displayed to you on the test checkout page.
See the detailed information about purchase processing through Payment Page in the Promptpay payment method in the Purchase by using Payment Page section.
Testing purchase by using Gate
To perform a test purchase by using Gate:
- Send a request for performing a test purchase to the payment platform.
- Accept a callback with the data for displaying payment instructions. Your system will display the payment instructions to you after.
- Accept a callback with information about the test payment result.
- Wait a few seconds until your system shows you the result of the test purchase.
See the detailed information about purchase processing through Gate in the Promptpay payment method in the Purchase by using Gate section.
Analysis of payments results
As with other payment methods Monetix offers, when using this method, you have several options to analyze the information about payments and operations.
You can load and analyze all the necessary information in Dashboard (dash-light.trxhost.com
), for instance you can use the analytic panels in the Analytics section for this purpose.
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 format by using the tools in the Reports section. You can perform export as a one-time or regular download of data to your local computer.
- 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 means of sending requests to the /operations/get endpoint.
If you have any further questions regarding payment data analysis, contact Monetix technical support.