How to Go Live

Steps to Go Live

For Java SDK Version <= 1.0.1, the imports should be:
from phonepe.sdk.pg.payments

For Java SDK Version > 1.0.1, the imports should be:
from phonepe.sdk.pg.payments.v1

To create an instance of the PhonePeClient class, you need to provide the following parameters:

import com.phonepe.sdk.pg.Env;
import com.phonepe.sdk.pg.payments.v1.PhonePePaymentClient;

String merchantId = "<PROD_MERCHANT_ID>"; #Should be replaced with Production MID (String)
String saltKey = "<PROD_SALT_KEY>"; #Should be replaced with Production Salt Key (String)
Integer saltIndex = PROD_SALT_INDEX; #Should be replaced with Production Salt Key Index (Numeric)
Env env = Env.PROD; #Should be replaced with Env.PROD when you go live

boolean shouldPublishEvents = true;
PhonePePaymentClient phonepeClient = new PhonePePaymentClient(merchantId, saltKey, saltIndex, env, shouldPublishEvents)