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.

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.

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)?

1
  • Did you find any solution to this custom online payment integration?
    – MSQ
    Commented Jan 23, 2020 at 5:53

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.