2

I am trying to place an order using magento 2 rest api through credit card. I am calling the below api POST rest/V1/guest-carts/{cartId}/payment-information(for guests) and rest/V1/carts/mine/payment-information using token(for customers). The payload request is

 "paymentMethod": {
 "method": "custom_pay",
 "additional_data":{ 
 "cc_cid":"000"
 "cc_type":"VI",
 "cc_exp_year":"2017",
 "cc_exp_month":"2",
 "cc_number":"xxxxxxxxxxxxxxxx"
 }
 }

It throws a generic error saying, error processing the payment. Please try to place an order again. Can anyone please suggest how to process an order using magento rest api through credit cards. Thank you.

asked Nov 7, 2016 at 8:55

2 Answers 2

4

Please try the below code.

"paymentMethod": {
 "method": "custom_pay",
 "additional_information": {
 "cc_cid": "000",
 "cc_type": "VI",
 "cc_exp_year": "2017",
 "cc_exp_month": "2",
 "cc_number": "xxxxxxxxxxxxxxxx"
 }
}

I hope it will be help you.

answered Mar 6, 2017 at 12:32
1

Anyone know how to go about determining the structure of the json to use for a different payment method (like authorize.net for example)?

answered Nov 22, 2019 at 13:47
1
  • Did you find any solution to this custom online payment integration? Commented Jan 23, 2020 at 5:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.