Hi @ritikranjan12, if you’re trying to create a payment request you need to look at Get Required Fields for Payment Method to see what to include for the required fields.
If you want to just use the payment method type, this would need to be tokenized for a customer and then you can include the card ID.
Here’s what your request should look like
Request
{
"amount": 101,
"currency": "INR",
"payment_method": {
"type": "in_rupay_debit_card",
"fields": {
"number": "4111111111111111",
"expiration_month": "12",
"expiration_year": "23",
"name": "John Doe",
"cvv": "345"
},
"metadata": {
"merchant_defined": true
}
},
"capture": true
}
Response
{
"status": {
"error_code": "",
"status": "SUCCESS",
"message": "",
"response_code": "",
"operation_id": "34660636-9842-45f9-983a-895ed3bde92a"
},
"data": {
"id": "payment_be6ebf0d94ad13c87c12348bea96cdab",
"amount": 101,
"original_amount": 101,
"is_partial": false,
"currency_code": "INR",
"country_code": "in",
"status": "CLO",
"description": "",
"merchant_reference_id": "",
"customer_token": "cus_7580469a79f773751a49a8e11013098f",
"payment_method": "card_c5acbc0404089a7faf113a44e906edf6",
"payment_method_data": {
"id": "card_c5acbc0404089a7faf113a44e906edf6",
"type": "in_rupay_debit_card",
"category": "card",
"metadata": {
"merchant_defined": true
},
"image": "",
"webhook_url": "",
"supporting_documentation": "",
"next_action": "not_applicable",
"name": "John Doe",
"last4": "1111",
"acs_check": "unchecked",
"cvv_check": "unchecked",
"bin_details": {
"type": null,
"brand": null,
"level": null,
"country": null,
"bin_number": "411111"
},
"expiration_year": "23",
"expiration_month": "12",
"fingerprint_token": "ocfp_2a694038316f52122bbbb3ae926cfda9"
},
"auth_code": null,
"expiration": 1662745417,
"captured": true,
"refunded": false,
"refunded_amount": 0,
"receipt_email": "",
"redirect_url": "",
"complete_payment_url": "",
"error_payment_url": "",
"receipt_number": "",
"flow_type": "",
"address": null,
"statement_descriptor": "Test Business",
"transaction_id": "",
"created_at": 1662140617,
"metadata": {},
"failure_code": "",
"failure_message": "",
"paid": true,
"paid_at": 1662140618,
"dispute": null,
"refunds": null,
"order": null,
"outcome": null,
"visual_codes": {},
"textual_codes": {},
"instructions": [
{
"name": "instructions",
"steps": [
{
"step1": "Enter card details."
},
{
"step2": "Goto 3DS page and enter OTP."
},
{
"step3": "Complete payment."
}
]
}
],
"ewallet_id": "ewallet_db4ad4a76278f94c4a83dd9b28b483ed",
"ewallets": [
{
"ewallet_id": "ewallet_db4ad4a76278f94c4a83dd9b28b483ed",
"amount": 101,
"percent": 100,
"refunded_amount": 0
}
],
"payment_method_options": {},
"payment_method_type": "in_rupay_debit_card",
"payment_method_type_category": "card",
"fx_rate": 1,
"merchant_requested_currency": null,
"merchant_requested_amount": null,
"fixed_side": "",
"payment_fees": null,
"invoice": "",
"escrow": null,
"group_payment": "",
"cancel_reason": null,
"initiation_type": "customer_present",
"mid": "",
"next_action": "not_applicable",
"error_code": "",
"remitter_information": {}
}
}