Cost+Docs

Testing Your Integration

Set up your test environment and use test credentials

Before going live, use a Cost+ sandbox website to verify your integration works correctly. There is no separate sandbox URL — you use the same production API endpoint (https://api.costplus.online/v1) with an API key from a sandbox website.

Getting Your Test API Key

  1. Log in to the Merchant Portal
  2. Navigate to Websites
  3. Create a new website and select Sandbox as the type, or select an existing sandbox website
  4. Click on Integration to find your API key
  5. Use this API key in your integration — all transactions will be simulated

Sandbox vs production mode is determined entirely by the website type in the Merchant Portal, not by the API URL. A sandbox website's API key processes simulated transactions; a production website's API key processes real payments. Both use the same API endpoint.

Test Card Numbers

Use the card numbers below to simulate different payment scenarios. Do not use real card numbers in test mode.

Card NumberCVVBrandResult
4111111111111111anyVisaSuccess
5544330000000037anyMastercardSuccess
4462030000000000anyVisaSuccess
4111111111111105anyVisaDo Not Honor
4111111111111143anyVisaStolen Card
4111111111111151anyVisaInsufficient Funds

Use any future expiry date and any 3-digit CVC.

Test card numbers only work in sandbox mode. Submitting them to a production website's API key will result in a declined transaction.

Error Codes

When a transaction fails, the API returns one of the following error codes in the transaction's reason field:

Error CodeDescription
ERROR_CARD_AUTHENTICATION_FAILURE3DS authentication not completed in time; payment cancelled
ERROR_CARD_CVV_NOT_VALIDCVV correctly formatted but not valid
ERROR_CARD_INFORMATION_NOT_VALIDCard info correctly formatted but not valid
ERROR_CARD_NOT_SUPPORTED_FOR_ECOMMERCETransaction not supported for eCommerce
ERROR_CARD_NOT_VALIDCard ID is not valid
ERROR_CARD_TYPE_DISABLEDCard type is disabled
ERROR_TRANSACTION_FAILEDCard transaction failed
ERROR_TRANSACTION_REJECTED_BY_CARD_PROCESSORRejected by processor (includes Visa/MC industry numeric code)
ERROR_TRANSACTION_TYPE_NOT_ALLOWED_BY_SELLERTransaction type not allowed by seller
ERROR_TRANSACTION_TYPE_NOT_SUPPORTEDNot supported by card network
INVALID_CARD_CVVCVV not recognized
INVALID_CARD_NUMBERCard number not recognized

Common API Validation Errors

These errors are returned as 400 Bad Request when the API request itself is invalid:

ErrorDescription
Unknown payment methodYou supplied an incorrect payment method name
No permissions for payment methodYour API key (project) doesn't have permissions for the specified payment method
Payment method not enabledThe payment method has not been enabled for your API key (project)
Payment method not supportedYour API key (project) does not have the correct status to use the specified payment method

If you receive "Payment method not enabled" or "No permissions", check the payment method configuration in the Merchant Portal under your website settings.

On this page