Add a new payment option. The only payment methods are supported: PayPal standard, offline, Authorize.net, MultiSafePay, Cayan.
Headers
Name
Type
Description
Authorization
string
oAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.
Request
Field
Type
Description
enabled
boolean
If true, enables payment method for customers at checkout. false otherwise. If not passed, default is true
checkoutTitle
string
Payment option title at checkout
checkoutTitleTranslated
<Translations>
Available translations for payment option title.
checkoutDescription
string
Payment option description at checkout
paymentProcessorId
string
Supported values "paypalStandard", "authorizeNetCC", "multiSafepay", "cayan" or "offline"
payPalEmail
string
PayPal 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
Field
Type
Description
apiLoginId
string
API Login ID
transactionKey
string
Transaction Key
signatureKey
string
Signature key of 128 characters
MultiSafePay
Field
Type
Description
accountId
string
Account ID
siteId
string
Site ID
siteSecurityCode
string
Site security code
Cayan
Field
Type
Description
name
string
Site ID
key
string
Key
siteId
string
Site ID
webApiKey
string
Web API key
PaymentSurcharges
Field
Type
Description
type
string
Supported values: ABSOLUTE, PERCENT
value
number
Surcharge value
InstructionsForCustomer
Field
Type
Description
instructionsTitle
string
Instruction title
instructions
string
Text of the instructions
instructionsTranslated
<Translations>
Available translations for instructions.
Translations
Field
Type
Description
<ISO_LANG_CODE>
string
Translations 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
Field
Type
Description
id
string
ID 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 Status
Description
Code (optional)
400
Request parameters are malformed
400
The only payment providers addable via API at this time are: paypalStandard, offline, authorizeNetCC, multiSafepay, cayan
400
Payment option title cannot be empty
PAYMENT_OPTION_TITLE_REQUIRED
400
Payment gateway ID cannot be empty
PAYMENT_CARRIER_NAME_REQUIRED
400
Payment gateway ID is not known to the system yet
PAYMENT_GATEWAY_NAME_UNKNOWN
400
paymentMethodSettings cannot be null for AuthorizeNetCC
PAYMENT_GATEWAY_MISSING_SETTINGS
400
paymentMethodSettings cannot be null for Cayan
PAYMENT_GATEWAY_MISSING_SETTINGS
400
paymentMethodSettings cannot be null for MultiSafePay
PAYMENT_GATEWAY_MISSING_SETTINGS
400
The gateway {name of the payment provider} is lacking settings with names (list of missing settings) in 'paymentMethodSettings'
PAYMENT_GATEWAY_MISSING_SETTINGS
400
The gateway {name of the payment provider} does not allow settings with names (list of interested settings) in 'paymentMethodSettings'
PAYMENT_GATEWAY_MISSING_SETTINGS
400
The 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'