When I call a payment api to authorize a payment, I am getting a decline with the following reason.
Sandbox returns merchant_category_code error for payment api call
The sandbox is a great place to test out your Magento store before you launch it on the live server. You can try various products and test the checkout flow to make sure everything works as expected. The sandbox provides a secure environment that is isolated from the live environment and any changes you make on the sandbox will not affect the live store.
If you want to make a test purchase on the sandbox, you can easily do that by following the steps below.
Login to the sandbox
To login to the sandbox, go to https://sandbox.paypal.com/ and log in to your account.
Log in to your sandbox account
Log in to your sandbox account and create a new transaction.
Add items to cart
After logging in to your sandbox account, you will be able to add products to your cart.
Click on the ‘Add to Cart’ button and complete the checkout process.
Confirm your order
After adding products to your cart, you will be redirected to the ‘Checkout’ page where you can confirm your order.
After confirming your order, you will be redirected to the ‘Completed Orders’ page.
If you are a beginner in Magento and don’t know how to make a test purchase on the sandbox, then I suggest you to follow the steps above to get started.
Maybe my issue description was not clear. I am not using Magento. I am using rest api (https://developer.cybersource.com/api-reference-assets/index.html#payments_payments_process-a-paymen...) to sandbox server (apitest.cybersource.com) to authorize a payment.