About Accepting Payments using CRED Pay on Standard Checkout

Let your customers make payments using CRED Pay on your website with Standard Checkout.


You can enable your customers to pay using a combination of CRED coins and credit cards saved on Cred, on Razorpay Standard Checkout.

Feature Request

  • This is an on-demand feature. Please raise a request with our to get this feature activated on your Razorpay account.
  • Watch this video to know how to raise a feature enablement request on the Razorpay Dashboard.
Feature Request GIF

To add CRED as a payment method on Web Standard Checkout, you need to:

  • Get the feature enabled for your Razorpay account by raising a request with Support.
  • Pass the app_offer parameter in Orders API.

You must create an order using Orders API. In the response, you obtain an order_id which you must pass to Checkout.

POST
/orders
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
-X POST https://api.razorpay.com/v1/orders \
-H "content-type: application/json" \
-d '{
"amount": 1000,
"currency": "INR",
"receipt": "receipt#1",
"app_offer": true
}'

amount

mandatory

integer The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be 29935.

currency

mandatory

string The currency in which the transaction should be made. See the

. Default is INR.

app_offer

optional

boolean Allow/do not allow customers from using CRED coins to make payments. This is used to prevent double discounting scenarios where customers have already availed discounts using voucher/coupon, and you do not want them to redeem Coins as well. Possible values:

  • true - Customer not allowed to use CRED coins to make payment.
  • false (default) - Customer can use CRED coins to make payment.

receipt

optional

string Your receipt id for this order should be passed here. Maximum length is 40 characters.

notes

optional

object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

Your integration is complete. Once the feature is enabled and the order is created, you can start accepting payments using the collect flow.

Prior to implementation of either flows, ensure you pass the app_offer parameter in Orders API.

You must create an order using Orders API. In the response, you obtain an order_id which you must pass to Checkout.

POST
/orders
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
-X POST https://api.razorpay.com/v1/orders \
-H "content-type: application/json" \
-d '{
"amount": 1000,
"currency": "INR",
"receipt": "receipt#1",
"app_offer": true
}'

amount

mandatory

integer The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be 29935.

currency

mandatory

string The currency in which the transaction should be made. See the

. Default is INR.

app_offer

optional

boolean Allow/do not allow customers from using CRED coins to make payments. This is used to prevent double discounting scenarios where customers have already availed discounts using voucher/coupon, and you do not want them to redeem Coins as well. Possible values:

  • true - Customer not allowed to use CRED coins to make payment.
  • false (default) - Customer can use CRED coins to make payment.

receipt

optional

string Your receipt id for this order should be passed here. Maximum length is 40 characters.

notes

optional

object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

Once the feature is enabled and the order is created, you must update your app's Build.Gradle file.

Feature Enablement

Due to the Android 11 version's package visibility changes, please add the CRED package ('com.dreamplug.androidapp') under the query tag in the AndroidManifest.xml file.

Update your application's build.gradle file by adding the following code:

implementation 'com.razorpay:checkout:1.6.2'

Your integration is complete. The intent flow will start working on your Android app.

Once the feature is enabled and the order is created, you can start accepting payments using the collect flow on your Android app. The SDK sends a push notification to the contact number passed in the create request.

Prior to implementation of either flows, ensure you pass the app_offer parameter in Orders API.

You must create an order using Orders API. In the response, you obtain an order_id which you must pass to Checkout.

POST
/orders
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
-X POST https://api.razorpay.com/v1/orders \
-H "content-type: application/json" \
-d '{
"amount": 1000,
"currency": "INR",
"receipt": "receipt#1",
"app_offer": true
}'

amount

mandatory

integer The transaction amount, expressed in the currency subunit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be 29935.

currency

mandatory

string The currency in which the transaction should be made. See the

. Default is INR.

app_offer

optional

boolean Allow/do not allow customers from using CRED coins to make payments. This is used to prevent double discounting scenarios where customers have already availed discounts using voucher/coupon, and you do not want them to redeem Coins as well. Possible values:

  • true - Customer not allowed to use CRED coins to make payment.
  • false (default) - Customer can use CRED coins to make payment.

receipt

optional

string Your receipt id for this order should be passed here. Maximum length is 40 characters.

notes

optional

object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

Once the feature is enabled and the order is created, you must:

  1. Update your app's info.plist file.
  2. Register your app for URI Scheme.
  3. Handle response from CRED app.

Your iOS app must seek permission from the device to open the UPI PSP app that the customer selects on Checkout. For this, you must make the following changes in your iOS app's info.plist file.

<key>LSApplicationQueriesSchemes</key>
<array>
<string>cred</string>
</array>

CRED returns the intent response in the below function that should be included in the AppDelegate.

application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:])

Once you receive the response from Cred, you must send it to Razorpay API.

RazorpayCheckout.publishUri(with: url.absoluteString)

Your integration is complete. The intent flow will start working on your iOS app.

Once the feature is enabled and the order is created, you can start accepting payments using the collect flow on your iOS app. The SDK sends a push notification to the contact number passed in the create request.

Webhooks help a web application send information to another application in real-time when a specific event happens.

Example: If you have subscribed to the order.paid webhook event, you will receive a notification every time a user pays you for an order.

Given below are the sample payloads for payment.captured and payment.authorized applicable for CRED:


Is this integration guide useful?