### Sample Response for Get BIN Info API Source: https://docs.payu.in/v2/reference/v2-get-bin-info-api This is a sample response structure from the PayU V2 Get BIN Info API, showing the details returned for a specific card BIN. ```php Array ( [status] => 1 [data] => Array ( [bins_data] => Array ( [issuing_bank] => HDFC [bin] => 512345 [category] => creditcard [card_type] => MAST [is_domestic] => 1 [is_atmpin_card] => 1 [is_otp_on_the_fly] => 1 [is_zero_redirect_supported] => 1 [is_si_supported] => 0 ) ) ) ``` -------------------------------- ### Sample Header Generation Code Source: https://docs.payu.in/v2/reference/v2_authentication_with_payu_apis A JavaScript example demonstrating how to generate the authentication header. ```javascript var merchant_key = 'smsplus'; var merchant_secret = 'izF09TlpX4ZOwmf9MvXijwYsBPUmxYHD'; // date var date = new Date(); // var date = "Wed, 28 Jun 2023 11:25:19 GMT"; date = date.toUTCString(); // authorization var authorization = getAuthHeader(date); console.log(authorization); function getAuthHeader(date) { var AUTH_TYPE = 'sha512'; var data = isEmpty(request['data']) ? "" : request['data']; var hash_string = data + '|' + date + '|' + merchant_secret; console.log("Hash String is ", hash_string); var hash = CryptoJS.SHA512(hash_string).toString(CryptoJS.enc.Hex); var authHeader = 'hmac username="' + merchant_key + '", ' + 'algorithm="' + AUTH_TYPE + '", headers="date", signature="' + hash + '"' return authHeader; } pm.environment.set('date', date); pm.environment.set('authorization', authorization); pm.environment.set('merchant_key', merchant_key); pm.environment.set('merchant_secret', merchant_secret); function isEmpty(obj) { for (var key in obj) { if (obj.hasOwnProperty(key)) return false; } return true; } ``` -------------------------------- ### Pre-authorization Non-Seamless Request Example Source: https://docs.payu.in/v2/reference/v2-payment-api-preauth-non-seamless This cURL example demonstrates how to construct a request for a pre-authorized, non-seamless transaction. Ensure the 'txnFlow' in 'additionalInfo' is set to 'nonseamless' and 'preAuthorize' is set to '1'. ```json { "accountId": "YOUR_ACCOUNT_ID", "referenceId": "YOUR_REFERENCE_ID", "amount": "10.00", "currency": "INR", "paymentSource": "WEB", "order": { "productInfo": "Product Name", "paymentChargeSpecification": { "price": "10.00" } }, "additionalInfo": { "txnFlow": "nonseamless", "preAuthorize": "1" }, "callBackActions": { "successAction": "YOUR_SUCCESS_URL", "failureAction": "YOUR_FAILURE_URL", "cancelAction": "YOUR_CANCEL_URL" }, "billingDetails": { "firstName": "Ashish", "phone": "9123456789", "email": "ashish@abc.com" } } ``` -------------------------------- ### Sample Request for v2 Get Payment Instrument API Source: https://docs.payu.in/v2/reference/v2-get-payment-instrument-api This cURL command demonstrates how to make a request to the v2 Get Payment Instrument API. Ensure you include the correct user credentials, authorization headers with a valid signature, and the date header. ```bash curl --location 'https://apitest.payu.in/storecard/instrument/v1?userCredentials=sms%3A123' \ --header 'Content-Type: application/json' \ --header 'authorization: hmac username="PRiQvJ", algorithm="sha512", headers="date", signature="30d8f518edda5b0962c35c0057024cabb6e7f19727488cb1874e75652bcea7499811dbf3ddac419c50c2fe56a8e032129bb0d6eaeaa3f971b3c2b5ccbfd12aa3"' \ --header 'date: Fri, 24 Apr 2026 07:05:59 GMT' \ --header 'Cookie: PHPSESSID=krida5voc39gqosfud8tt6n8as' ``` -------------------------------- ### Get Transaction Details Source: https://docs.payu.in/v2/reference/v2-get-transaction-details-api This API retrieves transaction details between a start date and end date. The response includes transaction status, amount, payment mode, customer details, and optional action details such as capture and refund. Results are returned in a paginated array format. ```APIDOC ## POST /v4/reporting/transactions ### Description Retrieves transaction details between a specified start and end date, with support for pagination. The response includes transaction status, amount, payment mode, customer details, and optional action details like capture and refund. ### Method POST ### Endpoint (Test) (Production) ### Request Headers - **date** (string) - Required - The current date and time in GMT format (e.g., Wed, 28 Jun 2023 11:25:19 GMT). - **authorization** (string) - Required - The HMAC signature generated using the specified algorithm (sha512). - **username** (string) - Required - The merchant's username. - **algorithm** (string) - Required - The hashing algorithm used (e.g., sha512). - **headers** (string) - Required - Specifies which headers were used in generating the hash (e.g., date). - **signature** (string) - Required - The HMAC signature. ### Hashing Algorithm `sha512("" + '|' + date + '|' + merchant_secret)` ### Request Example ```javascript var merchant_key = 'smsplus'; var merchant_secret = 'izF09TlpX4ZOwmf9MvXijwYsBPUmxYHD'; var date = new Date(); date = date.toUTCString(); function getAuthHeader(request) { var AUTH_TYPE = 'sha512'; var data = isEmpty(request['data']) ? "" : request['data']; var hash_string = data + '|' + date + '|' + merchant_secret; var hash = CryptoJS.SHA512(hash_string).toString(CryptoJS.enc.Hex); return `hmac username="${merchant_key}", algorithm="${AUTH_TYPE}", headers="date", signature="${hash}"`; } // Example usage: // var requestBody = { "data": "..." }; // Your request body data // var authHeader = getAuthHeader(requestBody); // console.log(authHeader); ``` ### Response #### Success Response (200) (Response structure not detailed in the source.) #### Response Example (Response example not detailed in the source.) ``` -------------------------------- ### Sample Header Code (JavaScript) Source: https://docs.payu.in/v2/docs/v2-non-seamless-api-integration-steps A JavaScript code example demonstrating how to construct the 'authorization' header, including setting merchant credentials, generating the date, and calculating the HMAC SHA512 signature. ```APIDOC ## Sample Header Code (JavaScript) ### Description This JavaScript snippet illustrates how to generate the `authorization` header, including setting up merchant details, formatting the date, and computing the HMAC-SHA512 hash. ### Code ```javascript var merchant_key = 'smsplus'; var merchant_secret = 'izF09TlpX4ZOwmf9MvXijwYsBPUmxYHD'; // Get current date in UTC string format var date = new Date(); date = date.toUTCString(); // Placeholder for request data. In a real scenario, this would be your request body. var request = { "data": "your_request_body_here" }; // Function to generate the authorization header function getAuthHeader(date, request, merchant_key, merchant_secret) { var AUTH_TYPE = 'sha512'; // Ensure data is a string, handle cases where request['data'] might be undefined or null var bodyData = request && request.data ? JSON.stringify(request.data) : ""; var hash_string = bodyData + '|' + date + '|' + merchant_secret; // Assuming CryptoJS is available in the environment for SHA512 hashing // You might need to include the CryptoJS library: var hash = CryptoJS.SHA512(hash_string).toString(CryptoJS.enc.Hex); return `hmac username="${merchant_key}", algorithm="${AUTH_TYPE}", headers="date", signature="${hash}"`; } // Generate the authorization header var authorization = getAuthHeader(date, request, merchant_key, merchant_secret); console.log("Date: " + date); console.log("Authorization: " + authorization); // Helper function to check if a value is empty (can be adapted based on needs) function isEmpty(value) { return value === null || value === undefined || value === ''; } ``` ``` -------------------------------- ### Get User Cards API Endpoint Source: https://docs.payu.in/v2/reference/v2_get_user_cards_api This section details the parameters required to call the Get User Cards API. ```APIDOC ## GET /v2/get_user_cards ### Description Retrieves a list of user cards associated with a merchant account. ### Method GET ### Endpoint /v2/get_user_cards ### Query Parameters - **userCredential** (String) - Mandatory - User authentication credential in the format `username:userid`. - **getSoftDeleted** (Integer) - Optional - Flag to include soft-deleted records in the response. Set to `1` to include, `0` to exclude. ### Header Parameters - **mid** (String) - Mandatory - Merchant ID provided by PayU. - **date** (String) - Mandatory - The current date and time in RFC 1123 format (e.g., `Wed, 28 Jun 2023 11:25:19 GMT`). - **authorization** (String) - Mandatory - The HMAC signature generated using SHA512. ### Request Example ```http GET /v2/get_user_cards?userCredential=testuser:testuser123 HTTP/1.1 Host: api.payu.in mid: YOUR_MERCHANT_ID date: Wed, 28 Jun 2023 11:25:19 GMT authorization: hmac username="smsplus", algorithm="sha512", headers="date", signature="YOUR_SIGNATURE" ``` ### Response #### Success Response (200) - **status** (Integer) - Indicates the status of the response. 0 for success. - **result** (Object) - Contains the user card data. - **user_cards** (Array) - List of user cards. - **card_token** (String) - Token representing the card. - **card_hash** (String) - Hashed representation of the card number. - **card_type** (String) - Type of the card (e.g., 'VI', 'MC'). - **card_exp_month** (String) - Expiry month of the card. - **card_exp_year** (String) - Expiry year of the card. - **card_first_six** (String) - First six digits of the card number. - **card_last_four** (String) - Last four digits of the card number. - **card_name** (String) - Name of the cardholder. - **card_status** (String) - Status of the card. - **card_added_on** (String) - Timestamp when the card was added. #### Response Example ```json { "status": 0, "result": { "user_cards": [ { "card_token": "tok_xxxxxxxxxxxxxx", "card_hash": "xxxxxxxxxxxxxx", "card_type": "VI", "card_exp_month": "12", "card_exp_year": "2025", "card_first_six": "411111", "card_last_four": "1111", "card_name": "John Doe", "card_status": "Active", "card_added_on": "2023-01-01 10:00:00" } ] } } ``` ``` -------------------------------- ### Get Payment Details Source: https://docs.payu.in/v2/reference/v2-get-payment-details-api This snippet shows how to make a POST request to the PayU V2 API to get payment details. ```APIDOC ## POST /storecard/card/v1/cryptogram ### Description This endpoint is used to retrieve payment details, likely for card storage or tokenization purposes. ### Method POST ### Endpoint https://apitest.payu.in/storecard/card/v1/cryptogram ### Query Parameters - **userCredential** (string) - Required - User credentials for authentication. - **cardToken** (string) - Required - The token associated with the card. - **amount** (string) - Required - The transaction amount. - **currency_type** (string) - Required - The currency of the transaction. - **tokenType** (string) - Required - The type of token. ### Headers - **Content-Type**: application/json - **mid**: Merchant ID - **date**: Date and time of the request in GMT format. - **Authorization**: HMAC signature for authentication. - **Cookie**: Session ID (e.g., PHPSESSID). ### Request Example ```bash curl --location --request POST 'https://apitest.payu.in/storecard/card/v1/cryptogram?userCredential=sms%3A123&cardToken=2d264984a4fa7253d4a4d9&amount=10¤cy_type=INR&tokenType=PAYU' \ --header 'Content-Type: application/json' \ --header 'mid: 117256' \ --header 'date: Fri, 24 Apr 2026 09:32:42 GMT' \ --header 'Authorization: hmac username="PRiQvJ", algorithm="sha512", headers="date", signature="f65970652dcd74b0cbd00361636fe04fc340274fa4f86984580032182b7c1a8911d9c18c637504c5809f630dde189349f3aa49572274fa9e909e3edc3a19996c"' \ --header 'Cookie: PHPSESSID=krida5voc39gqosfud8tt6n8as' \ --data '' ``` ### Response #### Success Response (200) - **message** (string) - A message indicating the status of the operation. - **status** (integer) - The status code of the response. - **result** (object) - An object containing the payment details. - **oneClickFlow** (string) - Indicates if one-click flow is enabled. - **oneClickStatus** (string) - The status of the one-click flow. - **cardType** (string) - The type of the card (e.g., VISA). - **trid** (string) - Transaction ID. - **networkToken** (object) - Details about the network token. - **tokenValue** (string) - The value of the network token. - **tokenExpiryMonth** (integer) - The expiry month of the network token. - **tokenExpiryYear** (integer) - The expiry year of the network token. - **cardMode** (string) - The mode of the card. - **par** (string) - Payment Account Reference. - **tokenReferenceId** (string) - Reference ID for the token. - **cardNo** (string) - Masked card number. - **oneClickCardAlias** (string) - Alias for the one-click card. - **cardToken** (string) - The card token. - **cardName** (string) - The name on the card. - **cryptogram** (string) - The cryptogram for the transaction. #### Response Example ```json { "message": "Instrument details", "status": 1, "result": { "oneClickFlow": "", "oneClickStatus": "", "cardType": "VISA", "trid": "400000340044", "networkToken": { "tokenValue": "4489682380114436", "tokenExpiryMonth": 12, "tokenExpiryYear": 2034 }, "cardMode": "", "par": "V0010013021320427651459792018", "tokenReferenceId": "d708fb5c7273580e21d91faa506b4301", "cardNo": "XXXXXXXXXXXX1258", "oneClickCardAlias": "", "cardToken": "2d1e569bf1f6b150a32f70", "cardName": "", "cryptogram": "BAAAAAAAtZF+jUIAmbHTgnIAAAg=" } } ``` ``` -------------------------------- ### Sample Payment Initiation Request (cURL) Source: https://docs.payu.in/v2/docs/v2-wallets-merchant-hostede-integration Use this cURL command to initiate a wallet payment through the PayU v2 API. Ensure all headers, including the authorization signature, are correctly generated. ```curl curl --location 'https://apitest.payu.in/v2/payments' \ --header 'date: Thu, 27 Mar 2025 10:12:27 GMT' \ --header 'authorization: hmac username="smsplus", algorithm="sha512", headers="date", signature=""' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "accountId": "smsplus", \ "referenceId": "b5f2d8785768087678fn4", \ "currency": "INR", \ "paymentSource": "WEB", \ "paymentMethod": { \ "name": "Wallet", \ "bankCode": "PAYTM" \ }, \ "order": { \ "productInfo": "qwertyuiopasdfghjkl", \ "userDefinedFields": { \ "udf1": "", \ "udf2": "" \ }, \ "paymentChargeSpecification": { \ "price": "10" \ } \ }, \ "callBackActions": { \ "successAction": "https://pp78admin.payu.in/test_response", \ "failureAction": "https://pp78admin.payu.in/test_response", \ "cancelAction": "https://pp78admin.payu.in/test_response" \ }, \ "billingDetails": { \ "firstName": "sartaj", \ "lastName": "", \ "phone": "9876543210", \ "email": "testv2@example.in", \ "city": "Bharatpur", \ "state": "Rajasthan", \ "country": "India", \ "zipCode": "321028" \ } \ }' ``` -------------------------------- ### Get Checkout Details Source: https://docs.payu.in/v2/reference/v2-get-checkout-details This snippet shows how to call the Get Checkout Details API using cURL to fetch available payment options. ```APIDOC ## GET /v3/checkout/details ### Description Retrieves available checkout options and details for a transaction based on provided criteria. ### Method POST ### Endpoint https://info.payu.in/v3/checkout/details ### Headers - Content-Type: application/json - date: {{date}} - Authorization: {{authorization}} ### Request Body - **requestId** (string) - Required - Unique identifier for the request. - **transactionDetails** (object) - Required - Details about the transaction. - **amount** (number) - Required - The transaction amount. - **useCase** (object) - Optional - Specifies the use case for the request. - **getExtendedPaymentDetails** (boolean) - Optional - Whether to retrieve extended payment details. - **checkCustomerEligibility** (boolean) - Optional - Whether to check customer eligibility. - **customerDetails** (object) - Optional - Details about the customer. - **mobile** (string) - Optional - The customer's mobile number. - **filters** (object) - Optional - Filters to apply to the checkout options. - **paymentOptions** (object) - Optional - Filters for specific payment options. - **emi** (object) - Optional - Filters for EMI options. - **dc** (string) - Optional - Comma-separated list of debit card bank codes (e.g., "SBIN,KKBK,ICIC"). ### Request Example ```json { "requestId": "12345678", "transactionDetails": { "amount": 12345.12 }, "useCase": { "getExtendedPaymentDetails": true, "checkCustomerEligibility": true }, "customerDetails": { "mobile": "9098765432" }, "filters": { "paymentOptions": { "emi": { "dc": "SBIN,KKBK,ICIC" } } } } ``` ### Response #### Success Response (200) - **status** (integer) - Indicates the success status of the operation (1 for success). - **message** (string) - A message describing the result of the operation. - **result** (object) - Contains the details of the checkout options. - **requestId** (string) - The request ID. - **paymentOptions** (object) - Available payment options. - **cards** (object) - Details for card payments (credit and debit). - **status** (boolean) - Indicates if card payments are available. - **credit** (object) - Details for credit card payments. - **status** (boolean) - Indicates if credit card payments are available. - **details** (array) - List of credit card details. - **bankCode** (string) - Bank code. - **bankName** (string) - Bank name. - **isDown** (boolean) - Indicates if the bank service is down. - **downSince** (string) - Timestamp when the service went down. - **expectedUpTime** (string) - Expected time for service restoration. - **downMessage** (string) - Message related to the service outage. - **debit** (object) - Details for debit card payments. - **status** (boolean) - Indicates if debit card payments are available. - **details** (array) - List of debit card details. - **bankCode** (string) - Bank code. - **bankName** (string) - Bank name. - **isDown** (boolean) - Indicates if the bank service is down. - **downSince** (string) - Timestamp when the service went down. - **expectedUpTime** (string) - Expected time for service restoration. - **downMessage** (string) - Message related to the service outage. - **netBanking** (object) - Details for net banking payments. - **status** (boolean) - Indicates if net banking is available. - **details** (array) - List of net banking details. - **bankCode** (string) - Bank code. - **bankName** (string) - Bank name. - **isDown** (boolean) - Indicates if the bank service is down. - **downSince** (string) - Timestamp when the service went down. - **expectedUpTime** (string) - Expected time for service restoration. - **downMessage** (string) - Message related to the service outage. - **emi** (object) - Details for EMI payments. - **status** (boolean) - Indicates if EMI payments are available. - **credit** (object) - Details for credit EMI options. - **status** (boolean) - Indicates if credit EMI is available. - **details** (array) - List of credit EMI details. - **bankCode** (string) - Bank code. - **bankName** (string) - Bank name. - **isDown** (boolean) - Indicates if the bank service is down. - **tenures** (array) - Available EMI tenures (e.g., [3, 6, 9, 12]). - **minAmount** (integer) - Minimum transaction amount for EMI. - **debit** (object) - Details for debit EMI options. - **status** (boolean) - Indicates if debit EMI is available. - **details** (array) - List of debit EMI details. - **bankCode** (string) - Bank code. - **bankName** (string) - Bank name. - **isDown** (boolean) - Indicates if the bank service is down. - **tenures** (array) - Available EMI tenures (e.g., [3, 6, 9]). - **minAmount** (integer) - Minimum transaction amount for EMI. - **upi** (object) - Details for UPI payments. - **status** (boolean) - Indicates if UPI is available. - **isDown** (boolean) - Indicates if the UPI service is down. - **wallet** (object) - Details for wallet payments. - **status** (boolean) - Indicates if wallet payments are available. - **details** (array) - List of wallet details. - **walletCode** (string) - Wallet code. - **walletName** (string) - Wallet name. - **isDown** (boolean) - Indicates if the wallet service is down. #### Error Response (Non-200 Status Codes) - **status** (integer) - Indicates the failure status of the operation (0 for failure). - **message** (string) - A message describing the error. - **error_code** (string) - A specific error code for the issue (e.g., "E1001"). ``` -------------------------------- ### Sample Payment Request (New Card) Source: https://docs.payu.in/v2/docs/v2-cards-merchant-hosted-integration Use this sample request to initiate a payment using a new credit card. Ensure all required fields, including card details and billing information, are correctly populated. ```json curl -X POST \ https://apitest.payu.in/v2/payments \ -H 'date: Mon, 05 Oct 2024 11:00:00 GMT' \ -H 'authorization: HMAC smsplus:4d1ea4e74243ea5b2b5b8b1d8a7b1a2e3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9' \ -H 'content-type: application/json' \ -d { "accountId": "smsplus", "referenceId": "b5f2d8785768087678fn4", "currency": "INR", "paymentSource": "WEB", "paymentMethod": { "name": "CreditCard", "bankCode": "CC", "paymentCard": { "cardNumber": "5004461234560000", "validThrough": "04/2025", "ownerName": "John Doe", "cvv": "123" } }, "order": { "productInfo": "Credit Card Test Product", "orderedItem": [ { "itemId": "ITEM001", "description": "Test Product for Credit Card", "quantity": 1 } ], "paymentChargeSpecification": { "price": 100.00 }, "userDefinedFields": { "udf1": "", "udf2": "", "udf3": "", "udf4": "", "udf5": "" } }, "additionalInfo": { "txnS2sFlow": "2", "createOrder": false, "storeCard": "1", "oneClickCheckout": "1", "preAuthorize": "0" }, "callBackActions": { "successAction": "https://example.com/success", "failureAction": "https://example.com/failure", "cancelAction": "https://example.com/cancel" }, "billingDetails": { "firstName": "John", "lastName": "Doe", "phone": "9876543210", "email": "john.doe@example.com", "address": { "address1": "123 Main Street", "city": "Mumbai", "state": "Maharashtra", "country": "India", "zipCode": "400001" } }, "authorization": { "eci": "05", "cavv": "AAABAWFlmQAAAABjRWWZEEFgFz", "threeDSTransID": "67b4c71f-4e6b-4f98-9f2a-1234567890ab", "threeDSenrolled": "Y", "threeDSstatus": "Success" }, "threeDS2RequestData": { "threeDSVersion": "2.2.0", "deviceChannel": "APP" } } ``` -------------------------------- ### Get Checkout Details Error Response Source: https://docs.payu.in/v2/reference/v2-get-checkout-details This is a sample error response from the Get Checkout Details API, indicating invalid request parameters. ```json { "status": 0, "message": "Invalid request parameters", "error_code": "E1001" } ``` -------------------------------- ### Initiate Payment Source: https://docs.payu.in/v2/reference/cards-classic-integration This snippet demonstrates how to initiate a payment using the PayU API with classic card integration. It includes the necessary headers and a sample request body. ```APIDOC ## POST /v2/payments ### Description Initiates a payment transaction using the classic integration method for credit card payments. ### Method POST ### Endpoint https://apitest.payu.in/v2/payments ### Request Body - **accountId** (string) - Required - Your PayU account ID. - **txnId** (string) - Required - Unique transaction ID. - **amount** (number) - Required - The transaction amount. - **paymentMethod** (object) - Required - Details about the payment method. - **name** (string) - Required - Name of the payment method (e.g., "CreditCard"). - **bankCode** (string) - Required - Bank code for the payment method (e.g., "CC"). - **paymentCard** (object) - Required - Details of the credit card. - **cardNumber** (string) - Required - The credit card number. - **validThrough** (string) - Required - The card's expiry date (MM/YYYY). - **ownerName** (string) - Required - The name of the cardholder. - **cvv** (string) - Required - The CVV of the card. - **order** (object) - Required - Order details. - **productInfo** (string) - Required - Information about the product. - **orderedItem** (array) - Required - List of ordered items. - **itemId** (string) - Required - Item ID. - **description** (string) - Required - Item description. - **quantity** (number) - Required - Quantity of the item. - **amount** (number) - Required - Amount per item. - **userDefinedFields** (object) - Optional - User-defined fields. - **paymentChargeSpecification** (object) - Required - Payment charge details. - **price** (number) - Required - The total price. - **netAmountDebit** (number) - Required - Net amount for debit. - **convenienceFee** (string) - Required - Convenience fee details. - **additionalInfo** (object) - Optional - Additional transaction information. - **txnS2sFlow** (string) - Optional - Transaction S2S flow indicator. - **authenticationFlow** (string) - Optional - Authentication flow type (e.g., "REDIRECT"). - **createOrder** (boolean) - Optional - Flag to create order. - **preAuthorize** (string) - Optional - Pre-authorization flag. - **callBackActions** (object) - Required - Actions to perform on callback. - **successAction** (string) - Required - URL for successful payment. - **failureAction** (string) - Required - URL for failed payment. - **billingDetails** (object) - Required - Billing information. - **firstName** (string) - Required - First name. - **lastName** (string) - Required - Last name. - **address1** (string) - Required - Address line 1. - **city** (string) - Required - City. - **state** (string) - Required - State. - **country** (string) - Required - Country. - **zipCode** (string) - Required - Zip code. - **phone** (string) - Required - Phone number. - **email** (string) - Required - Email address. ### Request Example ```json { "accountId": "UMXDPA", "txnId": "ZP6267f0d2996ce", "amount": 10, "paymentMethod": { "name": "CreditCard", "bankCode": "CC", "paymentCard": { "cardNumber": "5004461234560000", "validThrough": "04/2025", "ownerName": "John Doe", "cvv": "987" } }, "order": { "productInfo": "Classic Integration Payment", "orderedItem": [ { "itemId": "1", "description": "Product Description", "quantity": 1, "amount": 10.0 } ], "userDefinedFields": { "udf1": "", "udf2": "", "udf3": "", "udf4": "", "udf5": "", "udf6": "", "udf7": "", "udf8": "", "udf9": "", "udf10": "" }, "paymentChargeSpecification": { "price": 10, "netAmountDebit": 10, "convenienceFee": "CC:12,AMEX:19,SBIB:98,DINR:2,DC:25,NB:55" } }, "additionalInfo": { "txnS2sFlow": "4", "authenticationFlow": "REDIRECT", "createOrder": false, "preAuthorize": "1" }, "callBackActions": { "successAction": "https://yoursite.com/success", "failureAction": "https://yoursite.com/failure" }, "billingDetails": { "firstName": "John", "lastName": "Doe", "address1": "123 Main Street", "city": "Mumbai", "state": "Maharashtra", "country": "India", "zipCode": "400001", "phone": "9876543210", "email": "john.doe@example.com" } } ``` ### Headers - **date**: Required - Current date and time in GMT. - **authorization**: Required - HMAC authentication string. - **Content-Type**: Required - application/json ### Response (Success and error response details are not provided in the source text.) ``` -------------------------------- ### Get Checkout Details Success Response Source: https://docs.payu.in/v2/reference/v2-get-checkout-details This is a sample successful response from the Get Checkout Details API, detailing available payment options and their configurations. ```json { "status": 1, "message": "Success", "result": { "requestId": "12345678", "paymentOptions": { "cards": { "status": true, "credit": { "status": true, "details": [ { "bankCode": "HDFC", "bankName": "HDFC Bank", "isDown": false, "downSince": "", "expectedUpTime": "", "downMessage": "" } ] }, "debit": { "status": true, "details": [ { "bankCode": "SBIN", "bankName": "State Bank of India", "isDown": false, "downSince": "", "expectedUpTime": "", "downMessage": "" } ] } }, "netBanking": { "status": true, "details": [ { "bankCode": "HDFC", "bankName": "HDFC Bank", "isDown": false, "downSince": "", "expectedUpTime": "", "downMessage": "" } ] }, "emi": { "status": true, "credit": { "status": true, "details": [ { "bankCode": "ICIC", "bankName": "ICICI Bank", "isDown": false, "tenures": [3, 6, 9, 12], "minAmount": 3000 } ] }, "debit": { "status": true, "details": [ { "bankCode": "SBIN", "bankName": "State Bank of India", "isDown": false, "tenures": [3, 6, 9], "minAmount": 5000 } ] } }, "upi": { "status": true, "isDown": false }, "wallet": { "status": true, "details": [ { "walletCode": "PAYZ", "walletName": "Payzapp", "isDown": false } ] } } } } } ``` -------------------------------- ### Parsed Response Example Source: https://docs.payu.in/v2/reference/collect-payment-api-payu-hosted-v2-_payment This is an example of how a parsed response might look, typically containing transaction and payment gateway IDs, along with a message indicating the next steps. ```php Array ( [txnId] => b5f2d8785768087678fm9 [mihpayId] => 1999110000001769 [message] => Please call verify api to get the transaction status ) ```