For the complete documentation index, see llms.txt. This page is also available as Markdown.

Customers

Create a customer

post

Overview

Add new customers in the 2Checkout platform. By default, customer status is Inactive until you assign a specific subscription to the customer. Following that action, customer status reflects the status of the attached subscription(s).

Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
ExternalCustomerReferencestringOptional
FirstNamestringOptional
LastNamestringOptional
CompanystringOptional
FiscalCodestringOptional
Address1stringOptional
Address2stringOptional
CitystringOptional
StatestringOptional
ZipstringOptional
CountryCodestringOptional
PhonestringOptional
FaxstringOptional
EmailstringOptional
ExistingCardsstring[]Optional
EnabledbooleanOptional
TrialbooleanOptional
LanguagestringOptional
CustomerReferencestringOptional
Responses
post
/customers/
200

OK

No content

Retrieve a customer

get

Overview Retrieve customer information from the 2Checkout platform using either the 2Checkout Customer Reference or the External Customer Reference.

Path parameters
CReferencestringRequired

Internal 2Checkout customer reference or your customer identifier

Example: HotTalks1Customer123
includePaymentDatabooleanRequired

Flag used to indicate if customer payment information should be returned or not

Example: true
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
get
/customers/{CReference}/
200

OK

Update a customer

put

Overview

Update customer information from the 2Checkout platform using the 2Checkout Customer Reference.


Method and URL

PUT https://api.2checkout.com/rest/5.0/customers/CReference/


Example URL

To update a customer in the 2Checkout system, use this URL:

  • https://api.2checkout.com/rest/5.0/customers/{CReference}/


Response

200 JSON

Path parameters
CReferencestringRequired

Internal 2Checkout customer reference

Example: 258113240
Query parameters
endUserUpdatebooleanOptional

Set true to have the changes reflected on the end-user details for all subscriptions.

Example: false
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
ExternalCustomerReferencestringOptional
FirstNamestringOptional
LastNamestringOptional
CompanystringOptional
FiscalCodestringOptional
Address1stringOptional
Address2stringOptional
CitystringOptional
StatestringOptional
ZipstringOptional
CountryCodestringOptional
PhonestringOptional
FaxstringOptional
EmailstringOptional
ExistingCardsstring[]Optional
EnabledbooleanOptional
TrialbooleanOptional
LanguagestringOptional
CustomerReferencestringOptional
Responses
put
/customers/{CReference}/
200

OK

Delete customer credit card

delete

Delete customer credit card

Path parameters
CReferencestringRequired

Internal 2Checkout customer reference or your customer identifier string

Example: 260015052
TransientTokenstringRequired

Transient Token for card, can be fount in getCustomerInfoBySSOToken string

Example: 2hih36ssdf96i8cx4y7868brh5fyi0frmrpvtjgf
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
delete
/customers/{CReference}/credit-card/{TransientToken}

Last updated

Was this helpful?