Manage Customers
Retrieve your customers and manage the payment methods saved against them.
Customer payment method endpoints
The endpoints below let you list, retrieve, update and remove saved payment methods for a customer. Make sure you respect the guidelines described in Saving cards for reuse when saving payment methods.
GET/acceptor/rest/customers/{instId}/{customerId}Get a customer#
Retrieves a customer by platform customer identifier for the given installation
- instId
- customerId
Responses
200Customer retrieved
advancedPayments/customer-resource- merchantRef
- id
- displayName
- billingAddress {
- name
- line1
- line2
- line3
- line4
- district
- city
- state
- region
- postcode
- country
- countryCode
} - email
- dob
- dateOfBirth
- telephone
- defaultCurrency
- link [ {
- href
- rel
} ]
400Invalid installation identifier or customer identifier
advancedPayments/validation-failure-outcome- status
- reasonCode
- reasonMessage
- fieldErrors [ {
- field
- message
} ]
401Unauthorized
advancedPayments/error-response- status
- error
- message
- path
- timestamp
403Access denied
advancedPayments/error-response- status
- error
- message
- path
- timestamp
404Customer not found
advancedPayments/customer-resource- merchantRef
- id
- displayName
- billingAddress {
- name
- line1
- line2
- line3
- line4
- district
- city
- state
- region
- postcode
- country
- countryCode
} - email
- dob
- dateOfBirth
- telephone
- defaultCurrency
- link [ {
- href
- rel
} ]
500Internal Server Error
advancedPayments/error-response- status
- error
- message
- path
- timestamp
GET/acceptor/rest/customers/{instId}/byRefFind a customer by merchant reference#
Retrieves a customer for the given installation using the supplied merchant reference
- instId
- merchantRef
Responses
200Customer retrieved
advancedPayments/customer-resource- merchantRef
- id
- displayName
- billingAddress {
- name
- line1
- line2
- line3
- line4
- district
- city
- state
- region
- postcode
- country
- countryCode
} - email
- dob
- dateOfBirth
- telephone
- defaultCurrency
- link [ {
- href
- rel
} ]
400Invalid installation identifier or merchant reference
advancedPayments/validation-failure-outcome- status
- reasonCode
- reasonMessage
- fieldErrors [ {
- field
- message
} ]
401Unauthorized
advancedPayments/error-response- status
- error
- message
- path
- timestamp
403Access denied
advancedPayments/error-response- status
- error
- message
- path
- timestamp
404Customer not found
advancedPayments/customer-resource- merchantRef
- id
- displayName
- billingAddress {
- name
- line1
- line2
- line3
- line4
- district
- city
- state
- region
- postcode
- country
- countryCode
} - email
- dob
- dateOfBirth
- telephone
- defaultCurrency
- link [ {
- href
- rel
} ]
500Internal Server Error
advancedPayments/error-response- status
- error
- message
- path
- timestamp
GET/acceptor/rest/customers/{instId}/{customerId}/paymentMethodsList payment methods#
Retrieves all saved payment methods for the specified customer and installation
- instId
- customerId
Responses
200Payment methods retrieved
advancedPayments/payment-method-resource- paymentClass
- card {
- cardToken
- cardFingerprint
- cardType
- cardUsageType
- cardScheme
- cardCategory
- maskedPan
- expiryDate
- issuer
- issuerCountry
- cardHolderName
- cardNickname
- issueNumber
- validDate
- source
- networkToken {
- status
- usage
- tokenError
- expiryDate
} - new
} - isPrimary
- billingAddress {
- name
- line1
- line2
- line3
- line4
- district
- city
- state
- region
- postcode
- country
- countryCode
} - bankAccount {
- accountHolderName
- savedAccountToken
- iban
- bic
- bankAccountToken
} - phone {
- accountHolderName
- savedAccountToken
- mobileNumber
} - applepay {
- displayName
- transactionIdentifier
- cardType
- cardUsageType
- cardScheme
- savedAccountToken
} - googlepay {
- displayName
- cardScheme
- savedAccountToken
- cardDetails
- cardHolderName
} - link [ {
- href
- rel
} ]
400Invalid installation identifier or customer identifier
advancedPayments/validation-failure-outcome- status
- reasonCode
- reasonMessage
- fieldErrors [ {
- field
- message
} ]
401Unauthorized
advancedPayments/error-response- status
- error
- message
- path
- timestamp
403Access denied
advancedPayments/error-response- status
- error
- message
- path
- timestamp
404Customer not found
advancedPayments/payment-method-resource- paymentClass
- card {
- cardToken
- cardFingerprint
- cardType
- cardUsageType
- cardScheme
- cardCategory
- maskedPan
- expiryDate
- issuer
- issuerCountry
- cardHolderName
- cardNickname
- issueNumber
- validDate
- source
- networkToken {
- status
- usage
- tokenError
- expiryDate
} - new
} - isPrimary
- billingAddress {
- name
- line1
- line2
- line3
- line4
- district
- city
- state
- region
- postcode
- country
- countryCode
} - bankAccount {
- accountHolderName
- savedAccountToken
- iban
- bic
- bankAccountToken
} - phone {
- accountHolderName
- savedAccountToken
- mobileNumber
} - applepay {
- displayName
- transactionIdentifier
- cardType
- cardUsageType
- cardScheme
- savedAccountToken
} - googlepay {
- displayName
- cardScheme
- savedAccountToken
- cardDetails
- cardHolderName
} - link [ {
- href
- rel
} ]
500Internal Server Error
advancedPayments/error-response- status
- error
- message
- path
- timestamp
POST/acceptor/rest/customers/{instId}/{customerId}/paymentMethod/{token}/makeDefaultMake a payment method default#
Marks the specified saved payment method as the default for the customer and installation
- instId
- customerId
- token
{} — This call takes no request body — send an empty JSON object.
Responses
200Payment method marked as default
advancedPayments/payment-method-resource- paymentClass
- card {
- cardToken
- cardFingerprint
- cardType
- cardUsageType
- cardScheme
- cardCategory
- maskedPan
- expiryDate
- issuer
- issuerCountry
- cardHolderName
- cardNickname
- issueNumber
- validDate
- source
- networkToken {
- status
- usage
- tokenError
- expiryDate
} - new
} - isPrimary
- billingAddress {
- name
- line1
- line2
- line3
- line4
- district
- city
- state
- region
- postcode
- country
- countryCode
} - bankAccount {
- accountHolderName
- savedAccountToken
- iban
- bic
- bankAccountToken
} - phone {
- accountHolderName
- savedAccountToken
- mobileNumber
} - applepay {
- displayName
- transactionIdentifier
- cardType
- cardUsageType
- cardScheme
- savedAccountToken
} - googlepay {
- displayName
- cardScheme
- savedAccountToken
- cardDetails
- cardHolderName
} - link [ {
- href
- rel
} ]
400Invalid installation, customer, or payment method token
advancedPayments/validation-failure-outcome- status
- reasonCode
- reasonMessage
- fieldErrors [ {
- field
- message
} ]
401Unauthorized
advancedPayments/error-response- status
- error
- message
- path
- timestamp
403Access denied
advancedPayments/error-response- status
- error
- message
- path
- timestamp
404Payment method not found
advancedPayments/payment-method-resource- paymentClass
- card {
- cardToken
- cardFingerprint
- cardType
- cardUsageType
- cardScheme
- cardCategory
- maskedPan
- expiryDate
- issuer
- issuerCountry
- cardHolderName
- cardNickname
- issueNumber
- validDate
- source
- networkToken {
- status
- usage
- tokenError
- expiryDate
} - new
} - isPrimary
- billingAddress {
- name
- line1
- line2
- line3
- line4
- district
- city
- state
- region
- postcode
- country
- countryCode
} - bankAccount {
- accountHolderName
- savedAccountToken
- iban
- bic
- bankAccountToken
} - phone {
- accountHolderName
- savedAccountToken
- mobileNumber
} - applepay {
- displayName
- transactionIdentifier
- cardType
- cardUsageType
- cardScheme
- savedAccountToken
} - googlepay {
- displayName
- cardScheme
- savedAccountToken
- cardDetails
- cardHolderName
} - link [ {
- href
- rel
} ]
500Internal Server Error
advancedPayments/error-response- status
- error
- message
- path
- timestamp
POST/acceptor/rest/customers/{instId}/{customerId}/paymentMethods/{token}/updateUpdate a payment method#
Updates the saved payment method details for the specified customer, token, and installation
- instId
- customerId
- token
advancedPayments/payment-method-update- isPrimary
- billingAddress {
- name
- line1
- line2
- line3
- line4
- district
- city
- state
- region
- postcode
- country
- countryCode
} - card {
- cardNickname
- expiryDate
- validDate
- issueNumber
} - bankAccount {
- accountHolderName
}
Responses
200Payment method updated
advancedPayments/payment-method-resource- paymentClass
- card {
- cardToken
- cardFingerprint
- cardType
- cardUsageType
- cardScheme
- cardCategory
- maskedPan
- expiryDate
- issuer
- issuerCountry
- cardHolderName
- cardNickname
- issueNumber
- validDate
- source
- networkToken {
- status
- usage
- tokenError
- expiryDate
} - new
} - isPrimary
- billingAddress {
- name
- line1
- line2
- line3
- line4
- district
- city
- state
- region
- postcode
- country
- countryCode
} - bankAccount {
- accountHolderName
- savedAccountToken
- iban
- bic
- bankAccountToken
} - phone {
- accountHolderName
- savedAccountToken
- mobileNumber
} - applepay {
- displayName
- transactionIdentifier
- cardType
- cardUsageType
- cardScheme
- savedAccountToken
} - googlepay {
- displayName
- cardScheme
- savedAccountToken
- cardDetails
- cardHolderName
} - link [ {
- href
- rel
} ]
400Invalid installation, customer, token, or update request
advancedPayments/validation-failure-outcome- status
- reasonCode
- reasonMessage
- fieldErrors [ {
- field
- message
} ]
401Unauthorized
advancedPayments/error-response- status
- error
- message
- path
- timestamp
403Access denied
advancedPayments/error-response- status
- error
- message
- path
- timestamp
404Payment method not found
advancedPayments/payment-method-resource- paymentClass
- card {
- cardToken
- cardFingerprint
- cardType
- cardUsageType
- cardScheme
- cardCategory
- maskedPan
- expiryDate
- issuer
- issuerCountry
- cardHolderName
- cardNickname
- issueNumber
- validDate
- source
- networkToken {
- status
- usage
- tokenError
- expiryDate
} - new
} - isPrimary
- billingAddress {
- name
- line1
- line2
- line3
- line4
- district
- city
- state
- region
- postcode
- country
- countryCode
} - bankAccount {
- accountHolderName
- savedAccountToken
- iban
- bic
- bankAccountToken
} - phone {
- accountHolderName
- savedAccountToken
- mobileNumber
} - applepay {
- displayName
- transactionIdentifier
- cardType
- cardUsageType
- cardScheme
- savedAccountToken
} - googlepay {
- displayName
- cardScheme
- savedAccountToken
- cardDetails
- cardHolderName
} - link [ {
- href
- rel
} ]
500Internal Server Error
advancedPayments/error-response- status
- error
- message
- path
- timestamp
POST/acceptor/rest/customers/{instId}/{customerId}/paymentMethod/{token}/removeRemove a payment method#
Removes the specified saved payment method for the customer and installation
- instId
- customerId
- token
{} — This call takes no request body — send an empty JSON object.
Responses
400Invalid installation, customer, or payment method token
advancedPayments/validation-failure-outcome- status
- reasonCode
- reasonMessage
- fieldErrors [ {
- field
- message
} ]
401Unauthorized
advancedPayments/error-response- status
- error
- message
- path
- timestamp
403Access denied
advancedPayments/error-response- status
- error
- message
- path
- timestamp
500Internal Server Error
advancedPayments/error-response- status
- error
- message
- path
- timestamp