Skip to content

Logo

Razorpay

Advanced Payment Solutions for India's finest disruptors

Supports in this guide: Payments, Payouts

Provider website: razorpay.com


What you need to do for start processing transactions (brief summary)

  1. Get your credentials (from Razorpay)
  2. Connect in Dashboard
  3. Send an API request

Prerequisites: get from Razorpay

Send a connection request at razorpay.com/support or contact your Razorpay manager directly to get your account verified and receive the following credentials.

  • Account number -> Corefy field account_number.
  • Key ID -> Corefy field key_id.
  • Key secret -> Corefy field key_secret.
  • Payout callback secret (optional, but required for Payouts callbacks to work) -> Corefy field payout_callback_secret -> used to verify the signature of Razorpay's payout callbacks; without it, incoming payout callbacks are rejected.

One Provider account is used for both Payments and Payouts. INR only.


Payments processing (connect Provider account, create payment-invoice)

Connect Provider account in Corefy Dashboard

Step 1 - Open connection form

Open Razorpay in the provider directory and press Connect at Razorpay Provider Overview page in the New connection section.

Step 2 - Fill in fields and select settings

  • Account number
  • Key ID
  • Key secret
  • Payout callback secret (optional)
  • Test Mode -> (enable if you are using sandbox credentials)

Success

You have connected Razorpay Provider account!


First request to Corefy API (MIN)

What it does: creates a payment-invoice and redirects the customer to Razorpay's hosted checkout. Both UPI and netbanking (bank transfer) are supported on this same connection, selected via service.

Payment - MIN

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "b68ec685-d354-4ee5-90dd-2de22bd3fc0a",
      "service": "upi_inr_hpp",
      "currency": "INR",
      "amount": 100
    }
  }
}

Payment - MAX

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "2d537454-a7af-4701-af7a-43287cfcfd43",
      "service": "bank_transfer_aggregated_inr_hpp",
      "currency": "INR",
      "amount": 100,
      "customer": {
        "reference_id": "8d0f8a65-a934-4863-8b16-345c96457184",
        "email": "test@test.com",
        "phone": "11123456789"
      }
    }
  }
}

Important

  • customer.email and customer.phone are prefilled on Razorpay's hosted checkout page, if provided.
  • No Constants are configured for Payments - if a customer field is missing, it's simply not sent.
  • Your own merchant company name (from your Corefy merchant profile) is sent to Razorpay as the business name shown on the checkout page.

Extended request (MAX)

Why add extra fields (typical reasons): - Provide additional customer details for compliance/reconciliation - Positively influence conversion rate - Include optional fields required by your specific flow


Refunds

Razorpay does not support refunds for Payments.


Payouts processing (connect Provider account, create payout-invoice)

Connect Provider account in Corefy Dashboard

Uses the same Provider account connected above - no separate connection step.

First request to Corefy API (MIN)

What it does: creates a payout-invoice and sends funds to a UPI VPA (virtual payment address).

Payout - MIN

POST /api/payout-invoices

{
  "data": {
    "type": "payout-invoice",
    "attributes": {
      "reference_id": "1712663375",
      "service": "upi_inr",
      "currency": "INR",
      "amount": 10,
      "fields": {
        "vpa": "gauravkumar@exampleupi"
      }
    }
  }
}

Important

fields.vpa is required.

Payout - MAX

POST /api/payout-invoices

{
  "data": {
    "type": "payout-invoice",
    "attributes": {
      "reference_id": "1712663376",
      "service": "upi_inr",
      "currency": "INR",
      "amount": 10,
      "customer": {
        "reference_id": "232323******7517",
        "name": "Gaurav Kumar",
        "email": "amit.upmanu@gmail.com",
        "phone": "7738718874"
      },
      "fields": {
        "vpa": "gauravkumar@exampleupi"
      }
    }
  }
}

Important

customer.reference_id is forwarded to Razorpay as the recipient contact's own reference ID, separate from your own payout reference_id.


Extended request (MAX)

Why add extra fields (typical reasons): - Provide additional customer details for compliance/reconciliation - Positively influence conversion rate - Include optional fields required by your specific flow


Options

  • enable_successful_finalization -> optional, boolean - by default, a payout that Razorpay reports as successful is still held as pending by Corefy (since Razorpay's payouts can still be reversed afterward); enabling this option finalizes it as successful immediately instead.

Constants (fallback fields)

Constants are static values that Corefy can send to the provider instead of dynamic data from your API request, when those fields are missing in the request.

Priority (predictable rule): 1. If a value is present in the request -> Corefy uses the request value 2. Else if the constant is set -> Corefy uses the constant 3. Else -> provider may reject the request or apply its defaults (depends on provider)

Currently available constants (constant -> Corefy API field)

  • NAME -> customer.name
  • EMAIL -> customer.email
  • PHONE -> customer.phone
  • REFERENCE_ID -> customer.reference_id

Available routes and currencies are auto-discovered live from your Razorpay account.


Additional info

  1. Active reconciliation is available - both Payments and Payouts support an active status request in addition to the asynchronous callback.
  2. No recurring - this connector does not support saving/charging a token through Corefy.

FAQ / Troubleshooting

  • Invalid credentials / auth error -> verify Account number, Key ID and Key secret for the selected environment (test_mode)
  • Payout callbacks are rejected -> set payout_callback_secret - without it, incoming payout callbacks fail signature verification
  • Successful payout stays pending -> this is expected unless enable_successful_finalization is enabled
  • Currency or service is not supported -> confirm allowed currencies/features in your Razorpay account and in Corefy - only INR is available
  • Refund fails -> Razorpay does not support refunds through Corefy

Question

Still looking for help connecting your Razorpay account? Please contact our support team!