Add payment option

Add a new payment option. The only payment methods are supported: PayPal standard, offline, Authorize.net, MultiSafePay, Cayan.

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

Request

FieldTypeDescription
enabledbooleanIf true, enables payment method for customers at checkout. false otherwise. If not passed, default is true
checkoutTitlestringPayment option title at checkout
checkoutTitleTranslated<Translations>Available translations for payment option title.
checkoutDescriptionstringPayment option description at checkout
paymentProcessorIdstringSupported values "paypalStandard", "authorizeNetCC", "multiSafepay", "cayan" or "offline"
payPalEmailstringPayPal email address. Required only if paymentProcessorId value is paypalStandard
paymentMethodSettings<PaymentMethodSettings>Settings for the added payment method. Required only if paymentProcessorId value is one of the following: "authorizeNetCC", "multiSafepay" or "cayan"
paymentSurcharges<PaymentSurcharges>Payment method fee added to the order as a set amount or as a percentage of the order total
instructionsForCustomer<InstructionsForCustomer>Text instructions for customers

PaymentMethodSettings

Required fields depend on the paymentProcessorId value

Authorize.net
FieldTypeDescription
apiLoginIdstringAPI Login ID
transactionKeystringTransaction Key
signatureKeystringSignature key of 128 characters
MultiSafePay
FieldTypeDescription
accountIdstringAccount ID
siteIdstringSite ID
siteSecurityCodestringSite security code
Cayan
FieldTypeDescription
namestringSite ID
keystringKey
siteIdstringSite ID
webApiKeystringWeb API key

PaymentSurcharges

FieldTypeDescription
typestringSupported values: ABSOLUTE, PERCENT
valuenumberSurcharge value

InstructionsForCustomer

FieldTypeDescription
instructionsTitlestringInstruction title
instructionsstringText of the instructions
instructionsTranslated<Translations>Available translations for instructions.

Translations

FieldTypeDescription
<ISO_LANG_CODE>stringTranslations for each available language. If no other translations are provided, the default language translations is returned. See available languages in store language settings

Response

Response example (JSON)

{
    "id": "1794210895-1490949002653"
}

A JSON object of type 'CreateStatus' with the following fields:

CreateStatus

FieldTypeDescription
idstringID of the created payment option

Errors

In case of error, Ecwid responds with an error HTTP status code and, optionally, JSON-formatted body containing error description

HTTP codes

HTTP StatusDescriptionCode (optional)
400Request parameters are malformed
400The only payment providers addable via API at this time are: paypalStandard, offline, authorizeNetCC, multiSafepay, cayan
400Payment option title cannot be emptyPAYMENT_OPTION_TITLE_REQUIRED
400Payment gateway ID cannot be emptyPAYMENT_CARRIER_NAME_REQUIRED
400Payment gateway ID is not known to the system yetPAYMENT_GATEWAY_NAME_UNKNOWN
400paymentMethodSettings cannot be null for AuthorizeNetCCPAYMENT_GATEWAY_MISSING_SETTINGS
400paymentMethodSettings cannot be null for CayanPAYMENT_GATEWAY_MISSING_SETTINGS
400paymentMethodSettings cannot be null for MultiSafePayPAYMENT_GATEWAY_MISSING_SETTINGS
400The gateway {name of the payment provider} is lacking settings with names (list of missing settings) in 'paymentMethodSettings'PAYMENT_GATEWAY_MISSING_SETTINGS
400The gateway {name of the payment provider} does not allow settings with names (list of interested settings) in 'paymentMethodSettings'PAYMENT_GATEWAY_MISSING_SETTINGS
400The gateway {name of the payment provider} does not allow settings to be empty or more than 200 characters long, fix these settings:(list of interested settings) in 'paymentMethodSettings'PAYMENT_GATEWAY_SETTING_VALUE_LENGTH_OUT_OF_BOUNDARIES
400paymentMethodSettings -> signatureKey must be of 128 charactersPAYMENT_GATEWAY_MALFORMED_SETTINGS_SIGNATURE_KEY_TOO_LONG
400Language management is not active for the current ownerMULTILINGUAL_STORE_FEATURE_NOT_ACTIVE
400Can not set translation for [list of invalid languages] lang(s). These languages are not supportedUNRECOGNISED_LANGUAGES
402The functionality/method is not available on the merchant plan
403Access token doesn't have update_store_profile scope
404There is no default language availableNO_DEFAULT_LANGUAGE_FOUND
404Payment gateway ${paymentProcessorId} is not found
415Unsupported content-type: expected application/json or text/json

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
errorCodestringError code, optional
Language
Click Try It! to start a request and see the response here!