Capture a Payment
Create a Payment using Razorpay Payments API.
authorized to captured. Attempting to capture a payment whose status is not authorized will produce an error.
- After the customer’s bank authorises the payment, you must verify if the authorised amount deducted from the customer’s account is the same as the amount paid by the customer on your website or app.
- You can configure automatic capture of payments on the Dashboard.
Path Parameters
Request Parameters
amount field, enter only the amount associated with the order that is stored in your database.Response Parameters
createdauthorizedcapturedrefundedfailed
cardnetbankingwalletemiupi
true: Payment made using international card.false: Payment not made using international card.
nullpartialfull
amount_refunded = 100, it is equal to ₹1.true: Payment has been captured.false: Payment has not been captured.
BAD_REQUEST_ERROR.Payment processing failed because of incorrect OTP.customer.payment_authentication.incorrect_otp.card.American ExpressDiners Club(Only available for private limited and registered businesses)MaestroMasterCardRuPayUnknownVisa
creditdebitprepaidunknown
true: Card can be used for EMI payments.false: Card cannot be used for EMI payments.
customerbusiness
method is upi.bank_accountcredit_cardwalletcredit_line
gauravkumar@exampleupi.intent: When a UPI app is selected and user is redirected to it.collect: The user enters their UPI ID and receives a notification from the UPI app. They open the app and complete the payment.in_appIn case of Turbo UPI Payments.
UTIB for Axis Bank.gauravkumar@exampleupi.payzapp.Errors
The API `<key/secret>
` provided is invalid.
The API `<key/secret> ` provided is invalid.
4xxThe API credentials passed in the API call differ from the ones generated on the Dashboard.Solution: The API keys must be active and entered correctly with no whitespace before or after.Your payment has been declined as the order is already paid. Please initiate the payment with a new order.
Your payment has been declined as the order is already paid. Please initiate the payment with a new order.
400This payment has already been captured.Solution: Ensure that the payment is in the authorized state to capture it successfully.The id provided does not exist
The id provided does not exist
400The payment_id provided is incorrect.Solution: Enter the correct payment_id.The requested URL was not found on the server.
The requested URL was not found on the server.
400The URL is incorrect.Solution: Use the correct URL.The amount must be an integer
The amount must be an integer
400The amount specified is incorrect.Solution: Enter the correct amount without any decimal points.Could not validate payment capture request due to: amount: cannot be blank.
Could not validate payment capture request due to: amount: cannot be blank.
400The amount field was omitted from the capture request body.Solution: Always include amount (in currency subunits) in the capture request body.Could not validate payment capture request due to: amount: required key is missing.
Could not validate payment capture request due to: amount: required key is missing.
400The capture request body is empty or missing the amount key.Solution: Send a JSON body containing both amount and currency.Capture request currency must be same as payment currency.
Capture request currency must be same as payment currency.
400The currency passed in the capture request does not match the currency of the underlying payment.Solution: Pass the same currency that was used when the payment was created. Capture currency cannot be changed.The payment has already been either captured or voided.
The payment has already been either captured or voided.
400A capture was attempted on a payment that has already moved out of the authorized state. It is either already captured or has been voided.Solution: Fetch the payment using GET /v1/payments/:id and check status. Only retry capture if the payment is still in authorized state.Payment amount is greater than the amount due for order.
Payment amount is greater than the amount due for order.
400The capture amount exceeds the order’s outstanding amount_due. This typically happens when partial payments have already been captured on the order.Solution: Capture an amount less than or equal to the order’s amount_due. Fetch the order to confirm the remaining due amount.Payment already done for this order.
Payment already done for this order.
400The order linked to this payment is already in the paid state. Another payment has already been captured against it.Solution: Create a new order for the next transaction. An order in the paid state cannot accept additional captures.Request failed because another payment operation is in progress.
Request failed because another payment operation is in progress.
400A concurrent operation (another capture or a refund) is already running for this payment.Solution: Wait a few seconds and retry. Fetch the payment to confirm its current state before retrying.The payment has already been processed.
The payment has already been processed.
400The payment has already moved to a final state (such as captured or refunded) and cannot be processed again.Solution: Use the Fetch Payment API to check the current status. No further capture is required.