Accept Payments using Cred on S2S Integration

Let your customers make payments using CRED on your website or app with S2S Integration.


You can enable your customers to pay using a combination of Cred coins and credit cards saved on Cred, on S2S Integration.

Feature Enablement

This is an on-demand feature which is not available by default. Raise a request with our

to get this enabled on your Razorpay account.

To add CRED Pay as a payment method, you need to:

  • Pass the app_offer parameter in Orders API.
  • Pass the method and provider parameters in Create Payments 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 sub-unit, 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/disallow 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”.

curl -X POST https://api.razorpay.com/v1/payments/create/json \
-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]
-H 'content-type: application/json'
-d '{
"amount": 1000,
"currency": "INR",
"contact": 9900988990,
"email": "gaurav.kumar@example.com",
"order_id": "order_4xbQrmEoA5WJ0G",
"method": "app",
"provider": "cred",
"app_present": "false"
}'

Along with the other Create Payment API request parameters, you must pass:

method

mandatory

string The method used to make the payment. Here, it must be app.

provider

mandatory if method=app

string Name of the PSP app. Here, it must be cred.

app_present

mandatory if app=cred

boolean Sets the payment flow as collect. Possible values:

  • true: Opens CRED app on customer's device.
  • false (default): Sends a push notification to customer's device.

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?