Learn more about the android sdk integration in your app
order_id
and payment_session_id
that you need for subsequent steps.
You can view all the complete api request and response for /orders
here.
Web Checkout
UPI Intent Checkout
CFSession
object.CFTheme
object.CFWebCheckoutPayment/CFUPIIntentCheckoutPayment
object.payment_session_id
) and order ID (order_id
) obtained from Step 1. It also specifies the environment (sandbox or production).
Web Checkout
UPI Intent Checkout
Web Checkout
doPayment()
to open the Cashfree web checkout screen. This will present the user with the payment options and handle the payment process.UPI Intent Checkout
CFCheckoutResponseCallback
to receive callbacks from the SDK once the payment journey ends.
This interface consists of 2 methods:
doPayment()
to open the Cashfree checkout screen. This will present the user with the payment options and handle the payment process.
Web Checkout
UPI Intent Checkout
Web Checkout Sample code
UPI Intent Checkout Sample code
CFCheckoutResponseCallback
interface.
/pg/orders
endpoint from your backend. You can also use our SDK to achieve the same.
Error Codes
ERROR CODES | MESSAGE |
---|---|
MISSING_CALLBACK | The callback is missing in the request. |
ORDER_ID_MISSING | The “order_id” is missing in the request. |
CARD_EMI_TENURE_MISSING | The “emi_tenure” is missing or invalid (It has to be greater than 0). |
INVALID_UPI_APP_ID_SENT | The id sent is invalid. The value has to be one of the following: “tez://”,“phonepe://”,“paytm://”,“bhim://. Please refer the note in CFUPI class for more details |
INVALID_PAYMENT_OBJECT_SENT | The payment object that is set does not match any payment mode. Please set the correct payment mode and try again. |
WALLET_OBJECT_MISSING | The CFWallet object is missing in the request |
NETBANKING_OBJECT_MISSING | The CFNetbanking object is missing in the request. |
UPI_OBJECT_MISSING | The CFUPI object is missing in the request. |
CARD_OBJECT_MISSING | The CFCard object is missing in the request. |
INVALID_WEB_DATA | The url seems to be corrupt. Please reinstantiate the order. |
SESSION_OBJECT_MISSING | The “session” is missing in the request |
PAYMENT_OBJECT_MISSING | The “payment” is missing in the request |
ENVIRONMENT_MISSING | The “environment” is missing in the request. |
ORDER_TOKEN_MISSING | The “order_token” is missing in the request. |
CHANNEL_MISSING | The “channel” is missing in the request. |
CARD_NUMBER_MISSING | The “card_number” is missing in the request. |
CARD_EXPIRY_MONTH_MISSING | The “card_expiry_mm” is missing in the request. |
CARD_EXPIRY_YEAR_MISSING | The “card_expiry_yy” is missing in the request. |
CARD_CVV_MISSING | The “card_cvv” is missing in the request. |
UPI_ID_MISSING | The “upi_id” is missing in the request |
WALLET_CHANNEL_MISSING | The “channel” is missing in the wallet payment request |
WALLET_PHONE_MISSING | The “phone number” is missing in the wallet payment request |
NB_BANK_CODE_MISSING | The “bank_code” is missing in the request |
WRONG_CALLING_CONTEXT | Calling context must be activity or fragment |
NO_UPI_APP_AVAILABLE | You don’t have any UPI apps installed or ready for payment. |
NO_EMI_PLAN_AVAILABLE | This account does not have EMI plans configured, or the order amount is less than 2499 |
(Optional) Custom Initialisation of the SDK
Add the following to your values.xml file
<bool name="cashfree_pg_core_auto_initialize_enabled">false</bool>
Initialize the SDK yourself before attempting payment
(Optional) Enable logging to debugging issues
values.xml
file.<integer name="cashfree_pg_logging_level">3</integer>
Following are the Logging levels.(Optional) Disable Quick Checkout in Payment Page
<bool name="cf_quick_checkout_enabled">false</bool>
(Optional) Disable Encrypted SharedPreference