This section describes the parameters required to collect payments using the Sodexo card with Merchant Hosted Checkout integration (using _payment API) with a sample request and response.
Before you use the _payment API to collect a payment, it is recommended to use the Fetch Balance API (check_balance API) to check the Sodexo card balance and display it on the checkout page for the customer.
Before you begin:
Register for a account with PayU before you start integration. For more information, refer to Register for a Merchant Account.
The following describes the characteristics and workflow involved using Merchant Hosted Checkout with Sodexo:
- The existing _payment API used to initiate payments for online transactions will be used to initiate seamless payments for Sodexo payment option.
- For Sodexo payment option mode or PG is MC and Ibibo_code or bankcodeis SODEXO.
- In case customer provides the consent to save the card details with merchant on their check-out page:
- Merchant should pass save_sodexo_card parameter value as 1 when initiating the transaction using _payment API.
- After the transaction is processed and successful, for saved card transactions, Sodexo will share the sourceId with PayU and PayU will share this sourceId with merchant in the field3 parameter.
Note: Merchant is not allowed to store the complete card number or card expiry or card CVV details entered by the customer, even if customer provides permission to store the card.
- Merchant can also initiate transaction using source ID for repeat transactions where customer has provided permission to save the card during the first transaction. In this case, merchant should pass sourceId value in source_id parameter in the _payment API at the time of transaction initiation.
- In case source_id parameter is passed, PayU will directly initiate the transaction using this sourceId.
- Merchants are recommended to use the check_balance API for checking the Sodexo card balance. This will provide better experience to customers as available balance can be displayed up-front to customer and can have better SRT as scenarios where balance is less than transaction amount can be stopped at the checkout page itself.
Customers will select the Sodexo payment option on your website and enter the Sodexo card details and the amount will be based on the goods or services added to the cart.
Post the following additional parameters for the Sodexo integration. For the complete list of parameters posted using Merchant Hosted integration, refer to Collect Payments API under API Reference.
Sodexo card number. PayU recommends the following best practices:
- When you collect the customer's credit card details, you can validate the card number using the LUHN algorithm. For more information, refer to Card Number Formats.
- While validating the card number entered by the customer, if the card number is invalid, PayU recommends you display an error message and re-enter the card number..
|ccname mandatory||Ashish Kumar|
For months 1-9, this parameter must be appended with 0 – like 01, 02…09. For months 10-12, this parameter must not be appended – It should be 10,11 and 12 respectively.
|This parameter is used to specify the flag to save the Sodexo card along with the payment. Specify any of the following values:|
- 0 - Do not save the Sodexo card.
- 1 - Save the Sodexo card details.
0 - Do not check the Sodexo card balance before making the payment transaction.
1 - Check the Sodexo card balance and then post the payment transaction if the card has sufficient balance.
Note: This parameter must be used only for saved cards along with source_id parameter.
PayU marks the transaction status based on the response received from the bank. PayU communicates the success URL to you if the payment is successful. Verify the authenticity of the hash value before accepting or rejecting the invoice order. For the list of parameters in the response body for the PayU Hosted integration, refer to Collect Payment API - Merchant Hosted Checkout under API Reference.
curl -X POST "https://test.payu.in/_payment-H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d”key=JP***g&txnid=bvRCCBO4YiGGHE&amount=10.00&firstname=Ashish&[email protected]&phone=9876543210&productinfo=iPhone&pg=MC&bankcode=SODEXO&surl=https://apiplayground-response.herokuapp.com/&furl=https://apiplayground-response.herokuapp.com/&ccnum=637513XXXXXX9318 &ccexpmon=05&ccexpyr=2022&ccvv=123&ccname=Ashish&hash=ad36b3253313753088c662053b043fbe6d7a10112b31fbf20c4b0945b6a70c3a12239c5330ec2d0a0956bcd28a689f08c94fbb9cc2c5e06bb08dc81968672f64”
Array ( [mihpayid] => 403993715524069222 [mode] => MC [status] => success [unmappedstatus] => captured [key] => JF***g [txnid] => EaE4ZO3vU4iPsp [amount] => 10.00 [cardCategory] => domestic [discount] => 0.00 [net_amount_debit] => 10 [addedon] => 2022-10-08 19:37:19 [productinfo] => iPhone [firstname] => Ashish [lastname] => [address1] => [address2] => [city] => [state] => [country] => [zipcode] => [email] => [email protected] [phone] => 9876543210 [udf1] => [udf2] => [udf3] => [udf4] => [udf5] => [udf6] => [udf7] => [udf8] => [udf9] => [udf10] => [hash] => ed99957adb08fea56c907b88e8d158a79c3562c67f96c298461509826f77a7ae9e88b2a176b3234c25f50bcd451271728719656f3bb59c13a52bebabc468615a [field1] => 0608273386032718000015 [field2] => 986987 [field3] => 10.00 [field4] => 403993715524069222 [field5] => 100 [field6] => 02 [field7] => AUTHPOSITIVE [field8] => [field9] => Transaction is Successful [payment_source] => payu [PG_TYPE] => MC-PG [bank_ref_num] => 0608273386032718000015 [bankcode] => SODEXO [error] => E000 [error_Message] => No Error [name_on_card] => Ashish [cardnum] => 637513XXXXXX3104 [cardhash] => This field is no longer supported in postback params. )
Verify the transaction details using the Verification APIs. For more information, refer to Verify Payment API under API Reference.
The transaction ID that you posted in Step 1 with PayU must be used here.
Updated about 8 hours ago