# Integrate payment

## Payment integration management

* Payment channel refers to the object of payment per credential issued by a PG. The merchant can use the payment channel directly or assign it to one of its sub-merchants.&#x20;
* Live integration: Enter the credential of the PG you selected and contracted through the online payment application to create a payment channel and use it to call `imp.request_pay()` to request payment.&#x20;
* Test integration: You can use test credentials for all PGs except Naver Pay, Toss, and PayPal. Get test credentials for Naver Pay, Toss, and PayPal directly from the PG.
* From the payment integration page, you can add, view, and edit the above information for each merchant and its sub-merchants.

## Webhook management

Webhook is required when using a virtual account or subscription payment, but it is also strongly recommended for a stable payment service. To configure a webhook:

![](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2Fx9mGBHuRTKAwIXqtIMOs%2Fimage.png?alt=media\&token=64ca0bc5-c53e-4a21-a94c-3496c0a5c0b6)

* Webhook (notification) URL: Merchant server URL to receive webhook notification.
* Webhook test: Sends a test notification to the specified webhook URL.

## Integration test management&#x20;

![](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FLbg8lkZTWiRHyDpFrGXQ%2Fimage.png?alt=media\&token=4f909b14-407a-479d-a79d-240f5b61b3ff)

* In the integration test management, you can get the test Merchant ID and other credential information for each PG.&#x20;
* To test payment via a specific PG, call `imp.request_pay(pg = 'Test PG.Test Merchant ID')`.&#x20;
* To test PGs like PayPal and Naver Pay, you need to get the test Merchant ID directly from the PG. From the PG's test card, click `Edit information` and enter the test Merchant ID.

## Live integration management

![](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FzzDXDUj9OKGXsVQy7HGN%2Fimage.png?alt=media\&token=42d8aa2d-a7ca-4cef-9d9e-016d744ace0b)

![](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FV9ArEfSY2fTUI0G812MH%2Fimage.png?alt=media\&token=08b69698-f45b-480f-98d6-4fe362ae93c7)

* Each live integration channel card can be created based on the PG's payment type requested through the online payment application. This means that you can create a card for entering the Merchant ID and other credentials issued by the PG according to the module. On the card, click `Edit information` and enter and save the information, and then proceed with the payment using the payment channel information.&#x20;
* Even for the same PG, you can create different modules depending on the payment method or payment type by entering the Merchant ID and other credentials on each channel card.
  * Payment type: PG issues a separate Merchant ID for each payment type as follows:
    * Payment window method (general/simple/subscription payment)
    * API method (key-in/subscription payment).&#x20;
  * Payment method: PG issues a separate Merchant ID for each payment method.&#x20;
  * A merchant can also request multiple MIDs in the contract.

## Other settings&#x20;

![](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FXI7m6xxeQYGca9eQxYjk%2Fimage.png?alt=media\&token=022081a0-9711-4b77-b62e-1958ce193421)

* In the Other settings page, you can check the `Whitelist settings` and `My ID and API keys`.&#x20;
* Whitelist: In the i'mport Admin, you must set the security whitelist setting to a CIDR block instead of an individual IP. \
  For example, assume that you want to enter an IP of ￼1.1.1.￼. If you want to only allow this IP, enter ￼ [1.1.1.1/3](http://1.1.1.1/3)￼. If you want to allow the IP range from ￼1.1.1.￼ \~￼1.1.1.25￼, enter ￼[1.1.1.0/2](http://1.1.1.0/2)￼. For more detailed notation information, refer to [RFC4632](https://tools.ietf.org/html/rfc4632).

![](https://2814812280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTv8JEzyM5h4cYcL5StH%2Fuploads%2FVaJS6uq4Rzu4RLgy9ITt%2Fimage.png?alt=media\&token=64fc9e36-1e77-4c4f-9e9f-4866c01a5cfe)
