---
title: GPN Integration & Testing
slug: en/gpn-integration-and-testing
description: Information about integration and testing on the GPN payment method with the NICEPAY system
image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/Y1bW2FmDexDVdv2VYfZFo_microsoftteams-image.png
icon: {"faIcon":"fa-solid fa-book"}
docTags: 
createdAt: 2022-11-11T03:01:53.000Z
---

# Integration Steps and API Used&#x20;

***

1. Perform API Order Registration integration.
   - Direct: [Registration - API GPN](docId\:MNe1ueuUkUHrfR_QsOTB2).
   - Redirect: [GPN - API Checkout](docId\:axKSlKQc4cPNYn8fMled2).
2. Perform API payment Charge integration.
   - Direct: [Payment - API GPN](docId\:l40iNETYxq4iE2GOmsDtU).
   - Redirect: [Payment - API Checkout](docId\:o-4MmsbwXtZIb0ydniohw).
3. Receive NICEPAY callback and push notification.
4. Perform API Status Inquiry integration.
   - Direct: [Status Inquiry - API GPN](docId\:uh_CIpwWjJwzG03Pc4_El).
   - Redirect: [Status Inquiry - API Checkout](docId\:RhH7PmISd6IHN99yWVJHm).
5. Optional: perform API Cancel integration to cancel the transaction.
   - Direct: [Cancel - API GPN](docId\:ynhwqFIVqQcOe_kVy1BYg).
   - Redirect: [Cancel - API Checkout](docId\:CmiiEW1Oy21QP7qDEcUl-).



# GPN Testing Guide&#x20;

***

| **Test Step**                                                                                                                                                                                                                                                                                                                  | **Rules and Condition**                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1. Use real card or dummy card start from `45xxxx` or `54xxxxx`.
2.  Input your card information to the Merchant's side under “*Credit Card/Debit Card*” option.
   - Input 16 digit card number.
   - Input expiry date (`MM/YY`).
   - Input CVV.
3. Collect information and proceed transaction and transaction successful. | GPN payment method code: `09`<br /><br />Payment type:<br />* Full Payment: one-time payment.
* Recurring Payment: recurring payment with payment token. |



# Failed Transaction Possible Reason

***

1. GPN card isn't active or already expired.
2. GPN card number is invalid.
3. GPN card expiry date is invalid.
4. CVV on the card is invalid.
5. Not supported by Issuer network.
6. Already reach daily transaction limit of GPN card.



# Integration Checklist & Test Case

***

- [ ] Implement inquiry status after receiving the callback.
- [ ] Implement inquiry status after receiving the notification inside `dbProcessUrl`.
- [ ] Review payment log.
- [ ] Review firewall setting (eg. cloudflare for `dbprocessUrl` setting).
- [ ] Check `merchantToken` implementation.
- [ ] Execute test scenarios in Development Environment.
- [ ] Execute test scenarios in Production Environment.&#x20;
  [Get Sample Scenario](https://docs.google.com/spreadsheets/d/e/2PACX-1vQIaIMCM0vZ3L1cA-JkW3YxyIpjsB966fg1wTeT8qpFDowEvulIEWOoY6I4uJPL3A/pub?output=xlsx)
- [ ] Review Error Handling (Timeout, Failed, Negative Case).



# Best Practice

***

- For Merchant testing can set automatic `recurrOpt` parameter on API Cancel ([Recurring Type Code](docId\:gp0Wbo2RKTPwZrdJdzl2y)).
- API Cancel on Credit Card support to fall or half cancel ([Cancel Type Code](docId\:Ly9cZdRBjTw3RJv3l7r6v)).
- When notification is received on your `dbProcessUrl`, NICEPAY strongly recommend Merchant to verify the notification using the Inquiry API.
- `Notification Handling` is helpful to minimalize Fraud actions, NICEPAY strongly recommends Merchant to verify the `Notification Handling`.



# See also

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
Visit the [GPN Payment Flow](docId\:eJkukDPozrvtTbSViVZ3I) page to find out the system process during payment with the GPN.
:::

:::VerticalSplitItem
Visit the [GPN Payment Method Type](docId\:IX9qENKSWcp6lQUDauAwm) page to find out payment type when using GPN card.
:::
::::

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
\{Visit} the [GPN Glossary](docId\:IS1KZRyuhVd7e4uaAMb1a) page to find out the particular term used on GPN.
:::

:::VerticalSplitItem
Visit the [GPN FAQ](docId\:CBNUdgIfLPaJjiDLFDkDR) page if you want to find out frequently asked questions related to GPN.
:::
::::

