Cards & Wallets · Access Your Data

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#
description:

Retrieves a customer by platform customer identifier for the given installation

authorization:HTTP Basic
content-type: application/json
path parameters:
{
  • instId
    stringMandatoryInstallation identifier
  • customerId
    stringMandatoryPlatform customer identifier
}

Responses

200Customer retrieved
response body:
shared schema advancedPayments/customer-resource
{
  • merchantRef
    string (≤ 255 chars)Your reference for the Customer.
  • id
    string (≤ 255 chars)Our ID for the Customer that is registered with us.
  • displayName
    string (≤ 255 chars)The Customer's name.
  • email
    string (≤ 255 chars)Email address for the Customer.
  • dob
    string (≤ 255 chars)Date of birth for the Customer.
  • dateOfBirth
    string (date)
  • telephone
    string (≤ 255 chars)Telephone number for the Customer.
  • defaultCurrency
    string (≤ 255 chars)The Customer's default currency.
}
400Invalid installation identifier or customer identifier
response body:
shared schema advancedPayments/validation-failure-outcome
{
  • status
    stringReturnedPossible values: SUCCESS, FAILED, PROCESSINGThe overall outcome of the request.
  • reasonCode
    string (≤ 255 chars)ReturnedA code indicating the overall outcome of the request. Refer to Errors for more information.
  • reasonMessage
    string (≤ 255 chars)ReturnedA message indicating the overall outcome of the request. This is where we'll provide detailed reasons for any errors.
}
401Unauthorized
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
403Access denied
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
404Customer not found
response body:
shared schema advancedPayments/customer-resource
{
  • merchantRef
    string (≤ 255 chars)Your reference for the Customer.
  • id
    string (≤ 255 chars)Our ID for the Customer that is registered with us.
  • displayName
    string (≤ 255 chars)The Customer's name.
  • email
    string (≤ 255 chars)Email address for the Customer.
  • dob
    string (≤ 255 chars)Date of birth for the Customer.
  • dateOfBirth
    string (date)
  • telephone
    string (≤ 255 chars)Telephone number for the Customer.
  • defaultCurrency
    string (≤ 255 chars)The Customer's default currency.
}
500Internal Server Error
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
GET/acceptor/rest/customers/{instId}/byRefFind a customer by merchant reference#
description:

Retrieves a customer for the given installation using the supplied merchant reference

authorization:HTTP Basic
content-type: application/json
path parameters:
{
  • instId
    stringMandatoryInstallation identifier
}
query parameters:
{
  • merchantRef
    stringMandatoryMerchant reference used to identify the customer
}

Responses

200Customer retrieved
response body:
shared schema advancedPayments/customer-resource
{
  • merchantRef
    string (≤ 255 chars)Your reference for the Customer.
  • id
    string (≤ 255 chars)Our ID for the Customer that is registered with us.
  • displayName
    string (≤ 255 chars)The Customer's name.
  • email
    string (≤ 255 chars)Email address for the Customer.
  • dob
    string (≤ 255 chars)Date of birth for the Customer.
  • dateOfBirth
    string (date)
  • telephone
    string (≤ 255 chars)Telephone number for the Customer.
  • defaultCurrency
    string (≤ 255 chars)The Customer's default currency.
}
400Invalid installation identifier or merchant reference
response body:
shared schema advancedPayments/validation-failure-outcome
{
  • status
    stringReturnedPossible values: SUCCESS, FAILED, PROCESSINGThe overall outcome of the request.
  • reasonCode
    string (≤ 255 chars)ReturnedA code indicating the overall outcome of the request. Refer to Errors for more information.
  • reasonMessage
    string (≤ 255 chars)ReturnedA message indicating the overall outcome of the request. This is where we'll provide detailed reasons for any errors.
}
401Unauthorized
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
403Access denied
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
404Customer not found
response body:
shared schema advancedPayments/customer-resource
{
  • merchantRef
    string (≤ 255 chars)Your reference for the Customer.
  • id
    string (≤ 255 chars)Our ID for the Customer that is registered with us.
  • displayName
    string (≤ 255 chars)The Customer's name.
  • email
    string (≤ 255 chars)Email address for the Customer.
  • dob
    string (≤ 255 chars)Date of birth for the Customer.
  • dateOfBirth
    string (date)
  • telephone
    string (≤ 255 chars)Telephone number for the Customer.
  • defaultCurrency
    string (≤ 255 chars)The Customer's default currency.
}
500Internal Server Error
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
GET/acceptor/rest/customers/{instId}/{customerId}/paymentMethodsList payment methods#
description:

Retrieves all saved payment methods for the specified customer and installation

authorization:HTTP Basic
content-type: application/json
path parameters:
{
  • instId
    stringMandatoryInstallation identifier
  • customerId
    stringMandatoryPlatform customer identifier
}

Responses

200Payment methods retrieved
response body:
shared schema advancedPayments/payment-method-resource
[ {
  • paymentClass
    string (≤ 255 chars)ReturnedThe classification of payment method used. Eg. Card, Cash, PayPal.
  • isPrimary
    booleanIndicates if this was Customer's primary registered payment method.
} ]
400Invalid installation identifier or customer identifier
response body:
shared schema advancedPayments/validation-failure-outcome
{
  • status
    stringReturnedPossible values: SUCCESS, FAILED, PROCESSINGThe overall outcome of the request.
  • reasonCode
    string (≤ 255 chars)ReturnedA code indicating the overall outcome of the request. Refer to Errors for more information.
  • reasonMessage
    string (≤ 255 chars)ReturnedA message indicating the overall outcome of the request. This is where we'll provide detailed reasons for any errors.
}
401Unauthorized
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
403Access denied
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
404Customer not found
response body:
shared schema advancedPayments/payment-method-resource
[ {
  • paymentClass
    string (≤ 255 chars)ReturnedThe classification of payment method used. Eg. Card, Cash, PayPal.
  • isPrimary
    booleanIndicates if this was Customer's primary registered payment method.
} ]
500Internal Server Error
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
POST/acceptor/rest/customers/{instId}/{customerId}/paymentMethod/{token}/makeDefaultMake a payment method default#
description:

Marks the specified saved payment method as the default for the customer and installation

authorization:HTTP Basic
content-type: application/json
path parameters:
{
  • instId
    stringMandatoryInstallation identifier
  • customerId
    stringMandatoryPlatform customer identifier
  • token
    stringMandatorySaved payment method token
}
request body:

{} — This call takes no request body — send an empty JSON object.

Responses

200Payment method marked as default
response body:
shared schema advancedPayments/payment-method-resource
{
  • paymentClass
    string (≤ 255 chars)ReturnedThe classification of payment method used. Eg. Card, Cash, PayPal.
  • isPrimary
    booleanIndicates if this was Customer's primary registered payment method.
}
400Invalid installation, customer, or payment method token
response body:
shared schema advancedPayments/validation-failure-outcome
{
  • status
    stringReturnedPossible values: SUCCESS, FAILED, PROCESSINGThe overall outcome of the request.
  • reasonCode
    string (≤ 255 chars)ReturnedA code indicating the overall outcome of the request. Refer to Errors for more information.
  • reasonMessage
    string (≤ 255 chars)ReturnedA message indicating the overall outcome of the request. This is where we'll provide detailed reasons for any errors.
}
401Unauthorized
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
403Access denied
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
404Payment method not found
response body:
shared schema advancedPayments/payment-method-resource
{
  • paymentClass
    string (≤ 255 chars)ReturnedThe classification of payment method used. Eg. Card, Cash, PayPal.
  • isPrimary
    booleanIndicates if this was Customer's primary registered payment method.
}
500Internal Server Error
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
POST/acceptor/rest/customers/{instId}/{customerId}/paymentMethods/{token}/updateUpdate a payment method#
description:

Updates the saved payment method details for the specified customer, token, and installation

authorization:HTTP Basic
content-type: application/json
path parameters:
{
  • instId
    stringMandatoryInstallation identifier
  • customerId
    stringMandatoryPlatform customer identifier
  • token
    stringMandatorySaved payment method token
}
request body:
shared schema advancedPayments/payment-method-update
{
  • isPrimary
    booleanIndicates if the card being used should become the Customer's default card.
}

Responses

200Payment method updated
response body:
shared schema advancedPayments/payment-method-resource
{
  • paymentClass
    string (≤ 255 chars)ReturnedThe classification of payment method used. Eg. Card, Cash, PayPal.
  • isPrimary
    booleanIndicates if this was Customer's primary registered payment method.
}
400Invalid installation, customer, token, or update request
response body:
shared schema advancedPayments/validation-failure-outcome
{
  • status
    stringReturnedPossible values: SUCCESS, FAILED, PROCESSINGThe overall outcome of the request.
  • reasonCode
    string (≤ 255 chars)ReturnedA code indicating the overall outcome of the request. Refer to Errors for more information.
  • reasonMessage
    string (≤ 255 chars)ReturnedA message indicating the overall outcome of the request. This is where we'll provide detailed reasons for any errors.
}
401Unauthorized
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
403Access denied
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
404Payment method not found
response body:
shared schema advancedPayments/payment-method-resource
{
  • paymentClass
    string (≤ 255 chars)ReturnedThe classification of payment method used. Eg. Card, Cash, PayPal.
  • isPrimary
    booleanIndicates if this was Customer's primary registered payment method.
}
500Internal Server Error
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
POST/acceptor/rest/customers/{instId}/{customerId}/paymentMethod/{token}/removeRemove a payment method#
description:

Removes the specified saved payment method for the customer and installation

authorization:HTTP Basic
content-type: application/json
path parameters:
{
  • instId
    stringMandatoryInstallation identifier
  • customerId
    stringMandatoryPlatform customer identifier
  • token
    stringMandatorySaved payment method token
}
request body:

{} — This call takes no request body — send an empty JSON object.

Responses

200Payment method removed
400Invalid installation, customer, or payment method token
response body:
shared schema advancedPayments/validation-failure-outcome
{
  • status
    stringReturnedPossible values: SUCCESS, FAILED, PROCESSINGThe overall outcome of the request.
  • reasonCode
    string (≤ 255 chars)ReturnedA code indicating the overall outcome of the request. Refer to Errors for more information.
  • reasonMessage
    string (≤ 255 chars)ReturnedA message indicating the overall outcome of the request. This is where we'll provide detailed reasons for any errors.
}
401Unauthorized
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
403Access denied
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}
404Payment method not found
500Internal Server Error
response body:
shared schema advancedPayments/error-response
{
  • status
    string
  • error
    string
  • message
    string
  • path
    string
  • timestamp
    string (date-time)
}