Additional fields
Overview
This object is returned directly or within a successful response from the following API requests:
Retrieve an additional field Retrieve assigned additional fields Retrieve all additional fields
Additional fields object
Parameters | Object |
---|---|
Label |
String |
|
Field text. |
Code |
String |
|
Field identifier. Alpha-numeric chars, underscores and dashes. |
Type |
String |
|
Field type:
|
ApplyTo |
Sting |
|
|
Values |
Array of values |
|
Custom values you control. |
ValidationRule |
String |
|
The validation rule restricting the type of information shoppers can enter in the additional field during the purchase process. |
Translations |
Array of objects |
|
Details below. |
Label |
String |
|
Field text translated in the language of the Translations object. |
Values |
Object |
|
Custom values you control translated in the language of the Translations object. |
Language |
String |
|
ISO language code. (ISO 639-1 two-letter code). |
Shipping price
Overview
The object below is returned directly or within a successful response from the following API requests:
Retrieve shipping price
Shipping price object
Parameters | Type/Description | ||
---|---|---|---|
Shipping prices available |
Array of objects Details below |
||
Name | String | ||
Name of the shipping method available for the cart configuration. | |||
Code | String | ||
System-generated identified assigned to the shipping method. | |||
TrackingURL | String | ||
Tracking URL defined at shipping method leve. | |||
Currency | String | ||
Currency in which shipping prices are expressed. | |||
PriceDetails | Object | ||
Details below. | |||
Net | Object | ||
Shipping price for a NET price configuration. | |||
TotalAmount | Int | ||
Total shipping price charged from customers for a cart configuration. | |||
BasePrice | Int | ||
Shipping method base price amount. | |||
OverweightAmount | Int | ||
Overweight amount applied to the purchase. | |||
CountrySurcharge | Int | ||
Surcharge applied based on customer delivery country. | |||
WeightSurcharge | Int | ||
Surcharged applied based on total order weight. | |||
OrderSurcharge | Int | ||
Surcharged applied based on total order amount. | |||
Gross | Object | ||
Shipping price for a GROSS price configuration. | |||
TotalAmount | Int | ||
Total shipping price charged from customers for a cart configuration. | |||
BasePrice | Int | ||
Shipping method base price amount. | |||
OverweightAmount | Int | ||
Overweight amount applied to the purchase. | |||
CountrySurcharge | Int | ||
Surcharge applied based on customer delivery country. | |||
WeightSurcharge | Int | ||
Surcharged applied based on total order weight. | |||
OrderSurcharge | Int | ||
Surcharged applied based on total order amount. |
Manual renewal reminder
Overview
Use the variables in the list below to customize the Manual renewal reminder shopper email according to your needs. Check the 'Mandatory' column to see the variables that are required in your customized version of the e-mail.
Variable name | Description | Test value | Mandatory |
---|---|---|---|
ADDITIONAL_PRODUCT_INFO | Additional product-level fulfillment information set in the Avangate Control Panel | 0 | No |
ALLOW_MYACCOUNT_PROMO | Include or exclude myAccount information in the email body | 0 | No |
AUTO_RENEWAL | Indicates whether or not the shopper has enabled automatic renewal on the subscription | 1 | No |
AUTO_RENEWAL_DAYS_LEFT | Indicates the number of days left until date of first attempt for automatic renewal | 0 | No |
AVANGATE_COMPANY_NAME | Avangate company name | Avangate | No |
AVANGATE_SUPPORT_EMAIL | Avangate support email address | support@avangate.com | No |
AVANGATE_SUPPORT_PHONE | Avangate support phone | 0 | No |
AVANGATE_SUPPORT_PHONE_US | Avangate US hotline number | 0 | No |
AVANGATE_WEBSITE | Avangate website | http://www.avangate.com | Yes |
BASE_URL | Merchant's full host | 0 | No |
BUSINESS_COMPANY | Avangate company name | Avangate | No |
BUSINESS_HOTLINE | Avangate support phone | 0 | No |
BUSINESS_HOTLINEUS | Avangate US hotline number | 0 | No |
BUSINESS_SUPEMAIL | Avangate support email address | support@avangate.com | No |
BUY_NOW_LINK | Short version of renewal buy link (prefilled with shopper information) | https://secure.avangate.com/order/ch..._ID=xxxxxxxxxx | No |
BUY_NOW_LINK_RAW | Renewal link prefilled with shopper information (long version) | 0 | No |
CANCEL_RENEWAL_LINK | Shopper unsubscribe link | 0 | No |
CARD_EXPIRED | Indicates whether the payment card associated to the subscription will expire during the current billing cycle | 0 | No |
COMMERCIALNAME | Merchant's commercial name | Software Company Name | No |
COUNTRY | Shopper's country used on the billing information | USA | No |
COUPON_DISCOUNT | Indicates the value of the discount (either the percentage or the fixed amount) | 40 | No |
COUPON_DISCOUNT_CURRENCY | Indicates the 3-letter code for the currency in which the discount was set | 0 | No |
COUPON_DISCOUNT_TYPE | Indicates whether the discount is PERCENT or FIXED | PERCENT | No |
CURRENCY | Order billing currency | USD | No |
DISPLAY_MY_ACCOUNT_INFO | Include or exclude myAccount information in the email body | 1 | No |
Shopper email address used on the delivery information. If no delivery information is available. the billing information is used. | example@customer-email.com | No | |
ENCRYPTED_MERCHANT_CODE | Encrypted merchant code | 0 | No |
EXPIRATIONDATE | Subscription expiration date | 42292 | No |
EXPIRED | Indicates whether the subscription is active or past due/expired. Possible values: TRUE (for active subscriptions). | 0 | No |
EXTERNAL_CUSTOMER_REFERENCE | Unique customer identifier assigned to each customer by a vendor's system. This identifier allows the vendor support team to quickly retrieve customer details, transaction history, and account information. | Alphanumeric string | No |
FIRSTNAME | Shopper's first name used on the billing information | John | No |
FIRST_NAME_BILLING | Shopper's first name used on the billing information | John | No |
HOTLINE_NUMBERS | Array of attributes for Avangate hotline numbers | 0 | No |
HOTLINE_NUMBERS.NG_PHONE[index1].HotlineName | Countries where Avangate support information is available. | 0 | No |
IS_IMPORTED_SUBSCRIPTION | Indicates whether the subscription has been imported into Avangate system. | 0 | No |
IS_SUBSCRIPTION_EXPIRED | Indicates whether the subscription is active or not. | 0 | No |
IS_SUBSCRIPTION_EXPIRED_OR_PASTDUE | Indicates whether the subscription is active or past due/expired. Possible values: TRUE (for active subscriptions), FALSE (for past due/expired subscriptions). | 0 | No |
LASTNAME | Shopper's last name used on the billing information | Doe | No |
LAST_NAME_BILLING | Shopper's last name used on the billing information | Doe | No |
LICENCECODE | Subscription reference number | 0 | No |
MERCHANT_COMMERCIAL_NAME | Merchant's commercial name | Some company | No |
MERCHANT_SUPPORT_EMAIL | Merchant support email address | support@some-company.com | No |
MERCHANT_SUPPORT_PHONE | Merchant support phone number | 788112233 | No |
MOREINFO | Additional product-level fulfillment information set in the Avangate Control Panel | 0 | No |
MYACCOUNT_URL | URL for myAccount. To the BASE_URL we add /myaccount/ | https://secure.avangate.com/myaccoun...m&k=xxxxxxxxxx | No |
MYACCOUNT_URL_UPDATE_CC | URL for updating credit card information in myAccount | 0 | No |
MY_ACCOUNT_LOGIN_EMAIL | Email address used by shopper to login/signup to myAccount | client@shopper.com | No |
MY_ACCOUNT_LOGIN_URL | Avangate myAccount login/sign-up URL | https://secure.avangate.com/myaccoun...m&k=xxxxxxxxxx | Yes |
MY_ACCOUNT_URL | URL for myAccount. To the BASE_URL we add /myaccount/ | https://secure.avangate.com/myaccoun...m&k=xxxxxxxxxx | No |
MY_ACCOUNT_URL_UPDATE_CC | URL for updating credit card information in myAccount | 0 | No |
NUMBER_OF_DAYS_UNTIL_EXPIRATION | Number of days left until subscription expiration | 5 | No |
OLD_PRODUCT_ADDITIONAL_INFO | Additional fulfillment information set in the Avangate Control Panel on a product level | 0 | No |
OLD_PRODUCT_NAME | Name of the old product (that will be renewed to a different version as per settings in your Control Panel). | Old product name | No |
OLD_PRODUCT_GROUP_CODE | The Product Group Code of the product currently on the subscription. | No | |
OLD_PRODUCT_GROUP_NAME |
The Product Group Name of the product currently on the subscription.
|
No | |
ORDER_DATE | Order placement date | 40544 | No |
ORDER_DATE_STANDARD_FORMAT | Standard format used for the order placement date | 42292 | No |
ORDER_NUMBER | Indicates the reference number of the initial order that generated the subscription. | [9xxxxx] | No |
ORDER_STATUS | Order status | 0 | No |
ORIGINAL_ORDER_REFERENCE_NUMBER | Indicates the reference number of the initial order that generated the licence | [9xxxxx] | No |
PRODUCTID | Product ID number | 0 | No |
PRODUCT_EXTRA | 0 | 0 | No |
PRODUCT_NAME | The name of the renewal product | Software Product Name | No |
PRODUCT_NAME_OLD | Name of the old product (that will be renewed to a different version as per settings in your Control Panel). | Software Product Name Old | No |
RENEWAL_BUY_NOW_LINK | Short version of renewal buy link (prefilled with shopper information). | https://secure.avangate.com/order/ch..._ID=xxxxxxxxxx | Yes |
RENEWAL_COUPON | Shows the coupon code of the discount (if the product has a renewal promotion assigned). | 1 | No |
RENEWAL_INTERVAL | Indicates the length of a billing cycle in number of days/months (as defined for the renewed product). | 6 | No |
RENEWAL_INTERVAL_METRIC | Indicates whether the renewal interval is defined in months or days. | 0 | No |
RENEWAL_PRICE | The next renewal price of the renewal product. | 29.95 | No |
RENEWAL_PRODUCT_NAME | The name of the renewal product. | Product name | Yes |
RENEWAL_PRODUCT_RENEWAL_PRICE | The next renewal price of the renewal product. | 19.95 | Yes |
RENEWAL_PRODUCT_RENEWAL_PRICE_OLD | The catalog next renewal price (before discount). | 30.99 | No |
RENEWAL_PRODUCT_GROUP_CODE | The Product Group Code of the product that the subscription will be renewing. | No | |
RENEWAL_PRODUCT_GROUP_NAME | The Product Group Name of the product that the subscription will be renewing. | No | |
RENEWAL_PROMOTION_DATA | Information related to the renewal promotion assigned to the product | 0 | No |
RENEWAL_PROMOTION_DATA.Currency | Currency of the renewal promotion | USD | No |
RENEWAL_PROMOTION_DATA.Discount | Discount value applied to renewals | 30 | No |
RENEWAL_PROMOTION_DATA.DiscountType | Type of renewal discount (percentage or fixed) | PERCENT | No |
RETRYLINK | Payment retry link | 0 | No |
RETRY_LINK | Payment retry link | 0 | No |
SHOPPER_COMPANY_BILLING | Shopper's company name used on the billing information. | User company | No |
SHOPPER_EMAIL_ADDRESS_BILLING | Shopper's email address used on the billing information. | client@shopper.com | No |
STARTDATE | Indicates the date when the subscription was purchased. | 40544 | No |
SUBSCRIPTION_AUTO_RENEWAL | Indicates whether or not the shopper has enabled automatic renewal on the subscription | 1 | No |
SUBSCRIPTION_EXPIRATION_DATE | Indicates the date when the subscription expires | 42292 | No |
SUBSCRIPTION_PURCHASE_DATE | Indicates the date when the subscription was purchased | 40544 | No |
SUBSCRIPTION_REFERENCE_NUMBER | Subscription reference number | 0 | No |
TECHEMAIL | Merchant support email address | support@software-company-website.com | No |
TECHPHONE | Merchant support phone number | 888-xxx-xxxx | No |
UNSUBSCRIBE_LINK | Shopper unsubscribe link | 0 | No |
UPLOADLINK | File upload link | 0 | No |
UPLOAD_LINK | File upload link | 0 | No |
USER_EMAIL | Email address used by shopper to login/signup to myAccount | 0 | No |
Copy payment info
Overview
Copy card-on-file data available in the 2Checkout system from a source subscription to an imported target subscription. 2Checkout uses the existing payment information to charge customers as a part of the recurring billing (renewal) process.
Use the copyPaymentInfo method.
Requirements
The imported target subscription and the source subscription must belong to the same customer. The 2Checkout system checks to make sure that the 2Checkout Customer Reference (internal identifier) coincides for the customer accounts associated to the target and source subscriptions.
Availability
Please contact 2Checkout directly if you wish to take advantage of this feature.
How does this method work?
- Customer A purchases Subscription A using a VISA credit card and you import Subscription B for the same customer with no data or with an AMEX card.
- When 2Checkout renews Subscription A, it charges Customer A using the VISA, while using the AMEX (if the data was provided) for Subscription B charges.
- When you copy the payment data from Subscription A to Subscription B, the 2Checkout system uses the VISA credit card to renew both subscriptions according with their respective recurring billing cycles. 2Checkout charges customers during the recurring billing process for the imported target subscription using the payment method they used to purchase the source subscription.
Parameters
Parameters | Type/Description |
---|---|
sessionID |
Required (string) |
|
Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes. |
TargetSubscriptionReference |
Required (string) |
The 2Checkout Subscription Reference of the imported target subscription, to which 2Checkout copies the payment on file data associated with the source subscription. |
|
SubscriptionReference |
Required (string) |
|
The 2Checkout Subscription Reference of the source subscription whose attached payment on file data 2Checkout copies to the target subscription. |
Response
Parameter | Type/Description |
---|---|
Boolean |
true or false depending on whether or not the operation succeeded. |
Request
<?php
require ('PATH_TO_AUTH');
$TargetSubscription = 'FFAE3C9429';
$SourceSubscription = '9F4154733C';
try {
$payInfo = $client->copyPaymentInfo($sessionID, $TargetSubscription, $SourceSubscription);
}
catch (SoapFault $e) {
echo "payInfo: " . $e->getMessage();
exit;
}
var_dump("payInfo", $payInfo);
Order search options
Overview
Use the orderSearchOptions object to configure your search order options via SOAP API 6.0.
Object parameters
Parameter name | Type | Required/Optional | Description |
---|---|---|---|
ApproveStatus |
String |
Optional |
The desired approved status. Available values: WAITING, OK, FRAUD, INVALIDDATA. |
Newer |
String |
Optional |
Needed timestamp. If not provided, will return by default the data for the last 7 days. |
Status |
String |
Optional |
Order status. Some of the available options are COMPLETE, PENDING, CANCELED, REFUND. |
StartDate |
String |
Optional |
Start date in format Y-m-d. Will overwrite Newer if provided. |
EndDate |
String |
Optional |
End date in format Y-m-d. |
PartnerOrders |
Boolean |
Optional |
Decide if it will also include partner orders. |
ExternalRefNo |
String |
Optional |
The external reference number of the order. |
IncludeTestOrders | String | Optional |
Should test orders be included in the result: Values:
|
Pagination |
Object |
Optional |
Existing shipping class object with the structure detailed below. |
Limit |
Int | Optional | The number of results to be returned. |
Page |
Int | Optional | The page number. |
Order object
Overview
Use this object to create new orders and collect payments from shoppers.
Supported payment methods
- Credit/Debit cards: Visa, Visa Electron, MasterCard, Maestro, Amex, Discover, Dankort, Carte Bancaire, JCB. 2Checkout supports local Brazilian cards.
- PayPal and PayPal Express
- Purchase Order
- Wire
- Check
- WeChat Pay
- iDEAL
- Previous order references - In addition to the payment methods enumerated above, 2Checkout also supports 1-click purchase flows in which you use valid previous order references belonging to returning customers to pay for new orders with their previously used cards and PayPal accounts.
Object parameters
Parameters | Type/Description | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
RefNo | Optional (string) | |||||||||||
Unique, system-generated, order reference number.
Do not include it when placing new orders or send it as NULL. |
||||||||||||
Currency | Optional (string) | |||||||||||
The currency ISO code for the payment - ISO 4217. Example: “usd.” | ||||||||||||
Country | Optional (string) | |||||||||||
Shopper country. ISO 3166 two-letter code. Example: “us.” | ||||||||||||
Language | Optional (string) | |||||||||||
ISO 639-1 two-letter code. Language used for the purchase process. Example: “en.” | ||||||||||||
ExternalReference | Optional (string) | |||||||||||
Set external reference identifiers for orders. Enables you to replicate the functionality of the REF parameter included into Buy Links. Maximum 100 characters. If there is a need for longer references, you can apply an md5 hash for any string value, resulting in a 32 characters string. You can verify the hash after the order notification, on the client side. | ||||||||||||
Source | Optional (string) | |||||||||||
The link source for the sales. Enables you to replicate the functionality of the SRC (separate link identifier) parameter when included into Buy Links. Use the SRC parameter to track sale sources.
Maximum length 255 characters. |
||||||||||||
Affiliate | Object/Optional | |||||||||||
AffiliateCode | String/Required | |||||||||||
The affiliate unique code (as returned by the affiliates API methods). | ||||||||||||
AffiliateSource | String/Optional | |||||||||||
The affiliate source. | ||||||||||||
CustomerReference | Optional (Int) | |||||||||||
System-generated 2Checkout customer reference. Aggregate subscriptions under the same Customer account by adding the AV_CUSTOMERID (case sensitive) parameter to buy links. The 2Checkout system generates default customer numerical (integer) IDs (AV_CUSTOMERID) automatically for all orders containing products that feature subscriptions. | ||||||||||||
MachineId | Optional (string) | |||||||||||
Unique, system generated code for each unique customer, identifying returning customers. | ||||||||||||
Items | Required (array of objects) | |||||||||||
Details below. | ||||||||||||
OrderItem | Object | |||||||||||
Details below. | ||||||||||||
Code | Required (string) | |||||||||||
Unique product identifier your control. Max length 256 characters. | ||||||||||||
Quantity | Required (integer) | |||||||||||
Number of units | ||||||||||||
PriceOptions | Optional (array of strings) | |||||||||||
Array of price option codes. | ||||||||||||
SKU | Optional (string) | |||||||||||
SKU identifier. | ||||||||||||
Price | Object - Can be NULL | |||||||||||
OrderPrice | Object - Can be NULL | |||||||||||
Currency | Optional (string) | |||||||||||
The currency ISO code for the payment - ISO 4217. Example: usd. | ||||||||||||
NetPrice | Optional (double) | |||||||||||
Order value excluding sales tax/VAT expressed in the payment currency. | ||||||||||||
GrossPrice | Optional (double) | |||||||||||
Total order value, including sales tax/VAT expressed in the payment currency. GrossPricedoes not reflect any discounts. | ||||||||||||
NetDiscountedPrice | Optional (double) | |||||||||||
The NetPrice order value excluding sales tax/VAT, from which 2Checkout deducts discounts. NetDiscountedPrice is expressed in the payment currency. | ||||||||||||
GrossDiscountedPrice |
Optional (double) | |||||||||||
Total costs shoppers incur, expressed in the payment currency. This value includes sales tax/VAT, 2Checkout and affiliate commissions, but 2Checkout deducts the value of any discounts.
For example:
AffiliateCommission: 94.05 |
||||||||||||
Discount |
Optional (double) | |||||||||||
Value of the discounts for an order expressed in the payment currency. | ||||||||||||
VAT
|
Optional (double) | |||||||||||
Value of sales tax/VAT expressed in the payment currency. | ||||||||||||
AffiliateCommission |
Optional (double) | |||||||||||
Value of the affiliate commission for the order calculated from the NetDiscountedPriceexpressed in the payment currency. Or NULL. 2Checkout does not take into account shipping costs when calculating affiliate commissions. | ||||||||||||
UnitNetPrice | Optional (double) | |||||||||||
The value per product unit, excluding sales tax/VAT expressed in the payment currency. | ||||||||||||
UnitGrossPrice | Optional (double) | |||||||||||
Total value per product unit, including sales tax/VAT expressed in the payment currency. UnitGrossPrice does not reflect any discounts. | ||||||||||||
UnitVAT | Optional (double) | |||||||||||
Sales tax/VAT per product unit expressed in the payment currency. | ||||||||||||
UnitDiscount | Optional (double) | |||||||||||
Value of the discount per product unit expressed in the payment currency. | ||||||||||||
UnitNetDiscountedPrice | Optional (double) | |||||||||||
The value per product unit, expressed in the payment currency, excluding sales tax/VAT, from which 2Checkout deducts the unit discount. | ||||||||||||
UnitGrossDiscountedPrice | Optional (double) | |||||||||||
Total costs shoppers incur per product unit, expressed in the payment currency. This value includes sales tax/VAT, 2Checkout and affiliate commissions, but 2Checkout deducts the value of any discounts. | ||||||||||||
UnitAffiliateCommission | Optional (double) | |||||||||||
Value of the affiliate commission per product unit calculated expressed in the payment currency.
2Checkout deducts discounts from the costs incurred by shoppers before calculating affiliate commissions.
2Checkout does not take into account shipping costs when calculating affiliate commissions.
NULL when 2Checkout does not apply an affiliate commission. |
||||||||||||
CrossSell | Object – Can be NULL | |||||||||||
Details below. | ||||||||||||
ParentCode | Optional (string) | |||||||||||
The product code of the master product you set to trigger the campaign. | ||||||||||||
CampaignCode | Optional (string) | |||||||||||
Unique, system-generated identifier for cross-sell campaigns. | ||||||||||||
Trial | Optional (Object) – Can be NULL | |||||||||||
Details below. | ||||||||||||
Period | Optional (integer) | |||||||||||
The length of the trial subscription lifetime in days. | ||||||||||||
Price | Optional (double) | |||||||||||
Total trial price in the payment currency before 2Checkout deducts any taxes, discounts, etc. | ||||||||||||
AdditionalFields | Optional (array of objects) – Can be NULL | |||||||||||
AdditionalFieldSet | Optional (Object) – Can be NULL | |||||||||||
Code | Optional (string) | |||||||||||
The alpha-numeric characters, underscores and dashes that are set as the field identifier. | ||||||||||||
Value | Optional (string) | |||||||||||
Selected field value. | ||||||||||||
SubscriptionStartDate | Optional (string) | |||||||||||
Specify the date time stamp when the subscription becomes active. Format 2016-07-02 22:22:22 (YYYY-MM-DD HH:mm:ss). Available for JSON-RPC and REST. Send empty or NULL to activate subscriptions on the same date when customers purchase them. You can exclude HH:mm:ss when sending the date and include only YYYY-MM-DD. In this case, 2Checkout uses 00:00:01. Default time zone GMT+02:00. |
||||||||||||
Promotion | Optional (Object) | |||||||||||
Details below. | ||||||||||||
Name | Optional (string) | |||||||||||
Promotion name. | ||||||||||||
Description | Optional (string) | |||||||||||
Promotion description. | ||||||||||||
StartDate | Optional (string) | |||||||||||
The date when you set the promotion to start. NULL for promotions that start immediately after you create them. | ||||||||||||
EndDate | Optional (string) | |||||||||||
The date when you set the promotion to end. NULL for promotions you want active indefinitely. | ||||||||||||
MaximumOrdersNumber | Optional (integer) | |||||||||||
2Checkout only applies the promotion to a maximum number of orders you define.
Can be NULL if you want the promotion to apply to an unlimited number of orders. |
||||||||||||
MaximumQuantity | Optional (integer) | |||||||||||
Discount only applies to a maximum number of units purchased through a single order, smaller than the quantity you defined. Shoppers purchase any extra units at full price. Can be NULL if you want the promotion to apply to an unlimited number units. | ||||||||||||
InstantDiscount | Optional (boolean) | |||||||||||
The instant discount option auto-applies the discount for ALL selected products, without the need for shoppers to enter a discount coupon. | ||||||||||||
Coupon | Optional (string) | |||||||||||
Promotion coupon/voucher. | ||||||||||||
DiscountLabel | Optional (string) | |||||||||||
Discounts can be set as a percentage from the product price or as a fixed amount in the chosen currency. | ||||||||||||
Enabled | Optional (string) | |||||||||||
true or false, depending on whether a promotion is active or disabled. | ||||||||||||
Type | Optional (string) | |||||||||||
|
||||||||||||
BillingDetails | Required (Object) | |||||||||||
Details below. | ||||||||||||
Person | Object | |||||||||||
Details below. | ||||||||||||
FirstName | Required (string) | |||||||||||
Shopper name. | ||||||||||||
LastName | Required (string) | |||||||||||
Shopper surname. | ||||||||||||
CountryCode | Optional (string) | |||||||||||
Shopper country. ISO 3166 two-letter code. | ||||||||||||
State |
Optional (string) – Required for US, Brazil, India and Romania The state in the shopper's country. Mandatory when you set the Billing Country to US, Brazil, India and Romania. Use case insensitive utf8 strings for the full name, or just the two letter code. |
|||||||||||
City | Optional (string) | |||||||||||
Shopper city. | ||||||||||||
Address1 | Optional (string) | |||||||||||
Shopper address. | ||||||||||||
Address2 | Optional (string) | |||||||||||
Shopper address. | ||||||||||||
Zip | Optional (string) | |||||||||||
ZIP/ Postal code. | ||||||||||||
Optional (string) | ||||||||||||
Shopper email address. | ||||||||||||
Phone | Optional (string) | |||||||||||
Shopper phone number. Mandatory when you set Brazil as the Billing Country. Can be NULL. | ||||||||||||
Company | Optional (string) | |||||||||||
Company name. Can be null for end users. When present, you also need to provide the FiscalCode. | ||||||||||||
TaxExemptionId | Optional (string) | |||||||||||
Tax Exempt Certification id used to deduct taxes for US orders Example: 1b80eecc349v |
||||||||||||
FiscalCode | Optional (string) – Required for Brazil | |||||||||||
• For companies, it needs to be the VAT ID. 2Checkout will validate the value provided and throw an error if the VAT ID is invalid/incorrect when calling setPaymentDetails. When present, you also need to provide the Company name. • Mandatory when you set Brazil as the Billing Country. For Brazilian customers it represents the Fiscal Code (CPF/CNPJ). • Mandatory when you set India as Billing Country, and purchase is made by a Company. • Can be NULL for end users. |
||||||||||||
DeliveryDetails | Required (Object) | |||||||||||
Details below. | ||||||||||||
Person | Object | |||||||||||
Details below. | ||||||||||||
FirstName | Required (string) | |||||||||||
Shopper name from the delivery details. | ||||||||||||
LastName | Required (string) | |||||||||||
Shopper surname from the delivery details. | ||||||||||||
CountryCode | Optional (string) | |||||||||||
Shopper country. ISO 3166 two-letter code from the delivery details. | ||||||||||||
State | Optional (string) – Required for US, Brazil and Romania | |||||||||||
The state in the shopper's country from the delivery details. Mandatory when you set the Billing Country to US, Brazil and Romania. Use case insensitive utf8 strings for the full name, or just the two letter code. | ||||||||||||
City | Optional (string) | |||||||||||
Shopper city from the delivery details. | ||||||||||||
Address1 | Optional (string) | |||||||||||
Shopper address from the delivery details. | ||||||||||||
Address2 | Optional (string) | |||||||||||
Shopper address from the delivery details. | ||||||||||||
Zip | Optional (string) | |||||||||||
ZIP/ Postal code from the delivery details. | ||||||||||||
Optional (string) | ||||||||||||
Shopper email address from the delivery details. | ||||||||||||
Phone | Optional (string) | |||||||||||
Shopper phone number from the delivery details. Mandatory when you set Brazil as the Billing Country. Can be NULL. | ||||||||||||
Company | Optional (string) | |||||||||||
Company name from the delivery details. Can be null for end users. When present, you also need to provide the FiscalCode. | ||||||||||||
PaymentDetails | Required (Object) | |||||||||||
Adapt this object to the desired payment method. | ||||||||||||
Type | Required (string) | |||||||||||
The payment method:
|
||||||||||||
Currency | Optional (string) | |||||||||||
The currency ISO code for the payment - ISO 4217. Example: “usd.” | ||||||||||||
PaymentMethod | Optional (object) | |||||||||||
Object structure and parameters differ according to payment method selected and API method (placing orders (POST) vs. retrieving order data (GET)).
NULL for 0 value orders for which you’re not requiring customers to enter payment details. |
||||||||||||
RecurringEnabled | Optional (boolean) | |||||||||||
true – shopper checks the auto-renewal checkbox and 2Checkout charges subscription renewals using a recurring billing process. false – shopper doesn’t check the auto-renewal checkbox. |
||||||||||||
CardPayment | Optional (object) | |||||||||||
Details below. | ||||||||||||
CardNumber | Optional (string) | |||||||||||
The credit/debit card number. | ||||||||||||
CardType | Optional (string) | |||||||||||
visa, visaelectron, mastercard, maestro, amex, discover, dankort, cartebleue, jcb, hipercard, elo | ||||||||||||
ExpirationYear | Optional (string) | |||||||||||
The year in which the card expires. | ||||||||||||
ExpirationMonth | Optional (string) | |||||||||||
The month in which the card expires. | ||||||||||||
HolderName | Optional (string) | |||||||||||
Card holder name. | ||||||||||||
CCID | Optional (string) | |||||||||||
Credit Card Identification - an extra ID printed on the card, usually a 3-4 digit number, the CVC2/CVV2. | ||||||||||||
HolderNameTime | Optional (float) | |||||||||||
The interval of time in seconds in which shoppers enter their name in the HolderName field. An abnormally short interval is usually a red flag for fraud attempts. Can be NULL, but not a negative number. |
||||||||||||
CardNumberTime | Optional (float) | |||||||||||
The interval of time in seconds in which shopper enter their card number in the CardNumber field. An abnormally short interval is usually a red flag for fraud attempts. Can be NULL, but not a negative number. |
||||||||||||
InstallmentsNumber | Optional (Int) | |||||||||||
Number of installments. Available only when customers un Brazil pay with Visa or MasterCard using Brazilian Real as the order currency. Use 1 or exclude the parameter for full payments. | ||||||||||||
PayPalExpress | Optional (object) | |||||||||||
Details below. | ||||||||||||
Optional (string) | ||||||||||||
Email address customers use for their PayPal account. | ||||||||||||
ReturnURL | Optional (string) | |||||||||||
The PayPal Express Checkout redirect URL returned by calling the getPayPalExpressCheckoutRedirectURL method. The return URL is the page on your website to which PayPal redirects your buyer's browser after the buyer logs into PayPal and approves the payment. Typically, this is a secure page (https://...) on your site. | ||||||||||||
CancelURL | Optional (string) | |||||||||||
The cancel URL is the page on your website to which PayPal redirects your buyer's browser if the buyer does not approve the payment. Typically, this is the secure page (https://...) on your site from which you redirected the buyer to PayPal. | ||||||||||||
PreviousOrder | Optional (Object) | |||||||||||
Details below. | ||||||||||||
RefNo | Optional (string) | |||||||||||
Order reference a previous purchase which reached the Approved/Complete status. You can use order for which customers paid with credit/debit cards or with PayPal. The status of order should be AUTHRECEIVED or COMPLETE.
Check the validity of references with the isValidOrderReference method.
The 2Checkout system blocks you from using references for fraudulent or potentially fraudulent orders. |
||||||||||||
PurchaseOrderPaymentDetails | Optional (Object) | |||||||||||
Details below. | ||||||||||||
InternalPONumber | Optional (string) | |||||||||||
Identifier that business customers use internally in their organization to track and manage Purchase Orders (PO). Can be NULL. | ||||||||||||
AutoApprove | Optional (boolean) | |||||||||||
TRUE - requires activation of the PO AutoApprove package (If the package is inactive 2Checkout returns an error). Please contact 2Checkout. When AutoApprove is TRUE, 2Checkout no longer requires that business customers upload a PO document. As such, PO orders are automatically approved for your account, without a PO doc. 2Checkout sets the PURCHASE_PENDING status for auto-approved PO orders. FALSE - Default. Send this if the PO AUtoApprove package is not available for your account. 2Checkout uses the same flow as cart purchases with Purchase Orders for business customers placing orders with POs via API. This means that customers receive the same emails as if they made the purchase using the cart and need to update the PO document, which is reviewed by 2Checkout and that you need to approve. 2Checkout sets the AVAITING_UPLOAD status for POs andUnfinished for their orders.
Can be NULL. |
||||||||||||
WE_CHAT_PAY | Optional (string) | |||||||||||
Details below | ||||||||||||
ReturnURL | Optional (string) | |||||||||||
The return URL is the page to which your customers are redirected after their successful payment. | ||||||||||||
CancelURL | Optional (string) | |||||||||||
The cancel URL is the page to which your customers are redirected after their failed payment attempt. | ||||||||||||
IDEAL | Optional (string) | |||||||||||
Details below | ||||||||||||
ReturnURL | Optional (string) | |||||||||||
The return URL is the page to which your customers are redirected after their successful payment. | ||||||||||||
CancelURL | Optional (string) | |||||||||||
The cancel URL is the page to which your customers are redirected after their failed payment attempt. | ||||||||||||
BankCode | Required (string) | |||||||||||
String contains the SWIFT code of the bank, the plus sign "+", and the first 3 characters from the bank name. E.q.: in the case of Rabobank, code parameter is "RABONL2U+RAB". | ||||||||||||
EXISTING_PAYMENT_DATA | Optional (Object) | |||||||||||
By using EXISTING_PAYMENT_DATA you no longer require shoppers to enter any payment details. | ||||||||||||
TransientToken | Optional (string) | |||||||||||
Returned as a part of the process of retrieving customer information by SSOToken. | ||||||||||||
CustomerIP | Required (string) | |||||||||||
Shopper IP. | ||||||||||||
Promotions | Optional (Array of strings) | |||||||||||
Array of promotion codes. | ||||||||||||
AdditionalFields | ||||||||||||
Details below. | ||||||||||||
Code | Optional (string) | |||||||||||
The alpha-numeric characters, underscores and dashes that are set as the field identifier. | ||||||||||||
Text | Optional (string) | |||||||||||
Field text visible to shoppers in the cart. | ||||||||||||
Value | Optional (string) | |||||||||||
Selected field value. | ||||||||||||
LocalTime | Optional (string) | |||||||||||
Local shopper time in the following format: Y-m-d H:i:s. This parameter can impact the fraud score of an order when it's missing, NULL or incorrectly formatted. |
||||||||||||
GiftDetails | Optional (object) | |||||||||||
Contains contact details for the recipient of a gift purchase. | ||||||||||||
FirstName | Optional (string) | |||||||||||
First name of gift recipient. | ||||||||||||
LastName | Optional (string) | |||||||||||
Last name of gift recipient. | ||||||||||||
Optional (string) | ||||||||||||
Email of gift recipient. 2Checkout uses this email for the delivery/fulfillment process. | ||||||||||||
GiftNote | Optional (string) | |||||||||||
Custom text shoppers provide as a message to the gift recipient. |
Pricing options
Overview
Use this object to add/create and edit/update price options for your account.
Parameters
Parameters | Type/Description | |||
---|---|---|---|---|
PriceOptionsGroup |
Object |
|||
Name |
String |
|||
|
Price option group name. Use this parameter when adding a new price options group. To edit the name of a price option group use the Name parameter under the Translations object. |
|||
Description |
String |
|||
|
Pricing option group description. |
|||
Translations |
Array of objects |
|||
|
Details below. |
|||
|
Name |
String |
||
|
|
Product pricing options group name, localized under Options. |
||
|
Description |
String |
||
|
|
Product pricing options group description, localized under Options. |
||
|
Language |
String |
||
|
|
ISO language code. (ISO 639-1 two-letter code). |
||
Code |
String |
|||
|
Unique code that The 2Checkout system generates or set for each pricing options group. |
|||
Type |
String |
|||
|
The type of the pricing options group. Possible values: · RADIO · CHECKBOX · INTERVAL · COMBO |
|||
Options |
Array of objects |
|||
|
Details below. |
|||
|
Name |
String |
||
|
|
Pricing option child name. |
||
|
Description |
String |
||
|
|
Pricing option child description. |
||
|
Translations |
Array of objects |
||
|
|
Details above. |
||
|
|
Name |
String |
|
|
|
|
Localized product pricing options group name under PriceOptionGroup. Localized pricing option child name under Options. |
|
|
|
Description |
String |
|
|
|
|
Localized product pricing options group description under PriceOptionGroup. Localized pricing option child description under Options. |
|
|
|
Language |
String |
|
|
|
|
ISO language code. (ISO 639-1 two-letter code). |
|
|
Value |
String |
||
|
|
The code you set or that the 2Checkout system generated for each pricing option child inside a pricing options group parent. |
||
|
ScaleMin |
Int |
||
|
|
The minimum value of a scale interval set for each pricing option child inside a pricing options group parent of the type INTERVAL. |
||
|
ScaleMax |
Int |
||
|
|
The maximum value of a scale interval set for each pricing option child inside a pricing options group parent of the type INTERVAL. |
||
|
SubscriptionImpact |
Object |
||
|
|
Details below. |
||
|
Months |
String |
||
|
|
The value in months the 2Checkout system adds or subtracts from the initial billing cycle of a subscription. |
||
|
Impact |
String |
||
|
|
Possible values: · ADD · SUBTRACT · LIFETIME |
||
|
PriceImpact |
Object |
||
|
|
Details below. |
||
|
|
ImpactOn |
String |
|
|
|
|
Possible values:
|
|
|
|
Impact |
String |
|
|
|
|
Impact on price per unit:
|
|
|
|
Percent |
String |
|
|
|
|
The value of the percentage out of the price per product unit, when you use PERCENT for Method. |
|
|
|
Method |
String |
|
|
|
|
Possible values: · PERCENT · FIXED |
|
|
|
Amounts |
Array of objects. |
|
|
|
|
Details below. |
|
|
|
|
Currency |
String |
|
|
|
|
Currency ISO code - ISO 4217. |
|
|
|
Amount |
String |
|
|
|
|
The amount defined for each specific currency active for your account, when you use FIXED for Method. |
|
Default |
Boolean |
||
|
|
TRUE for preselected options. Missing for options that are not preselected. |
Account Payouts
Overview
Retrieve the account balance from your current payout period, detailed for each billing currency.
You can also search for the historical transfers issued by 2Checkout for your account, and filter the results based on payment date, method or invoice paid.