Our Flutter SDK supports Android SDK version 19 and above and iOS minimum deployment target of 11 and above. Open your project’s pubspec.yaml and add the following under dependencies: flutter_cashfree_pg_sdk: 2.2.5+43
The first step in the Telr Payment Gateway integration is to create an Order. You need to do this before any payment can be processed. You can add an endpoint to your server which creates this order and is used for communication with your frontend.
API Request for Creating an Order
Here’s a sample request for creating an order using your desired backend language. Telr offers backend SDKs to simplify the integration process.
Web Checkout is a streamlined payment solution that integrates Telr’s payment gateway into your iOS app through our SDK. This implementation uses a WebView to provide a secure, feature-rich payment experience.
Your customers are presented with a familiar web interface where they can enter their payment details and complete their transaction seamlessly. All payment logic, UI components, and security measures are managed by our SDK, eliminating the need for complex custom implementation.
To complete the payment, we can follow the following steps:
Create a CFSession object.
Create a Web Checkout Payment object.
Set payment callback.
Initiate the payment using the payment object created
This object contains essential information about the order, including the payment session ID (payment_session_id) and order ID (order_id) obtained from Step 1. It also specifies the environment (sandbox or production).
Copy
try { var session = CFSessionBuilder().setEnvironment(environment).setOrderId(orderId).setPaymentSessionId(paymentSessionId).build(); return session;} on CFException catch (e) { print(e.message);}
Once the payment is completed, you need to confirm whether the payment was successful by checking the order status. Once the payment finishes, the user will be redirected back to your activity.
Ensure you check the order status from your server endpoint.
To verify an order you can call our /pg/orders endpoint from your backend. You can also use our SDK to achieve the same.
To confirm the error returned in your application, you can view the error codes that are exposed by the SDK.
The following are some of the error codes that are exposed by the SDK:
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