Customers

Create customer

SecurityBearer or Bearer or Bearer or Bearer
Request
Request Body schema: application/json
firstName
required
string non-empty

First name

lastName
required
string non-empty

Last name

companyName
string or null

Company name

email
string or null

Email

mobilePhoneNumber
string or null

Phone number

isMobileNumberSmsNotificationsEnabled
boolean

Is SMS notification enabled

useBillingAsShippingAddress
boolean

Use billing address as shipping address

object (PaymentGateway.Contracts.Customers.Create.CreateCustomerRequestDto.AddressDto)
object (PaymentGateway.Contracts.Customers.Create.CreateCustomerRequestDto.AddressDto)
Array of objects or null (PaymentGateway.Contracts.Customers.Create.CreateCustomerRequestDto.PaymentMethodCardDto)

Payment methods

Array of objects or null (PaymentGateway.Contracts.Customers.Create.CreateCustomerRequestDto.PaymentMethodAchAccountDto)
Responses
200

Success

400

Bad Request

404

Not Found

500

Server Error

post/pay-api/v1/customers
Request samples
application/json
{
  • "firstName": "First",
  • "lastName": "Last",
  • "companyName": "Company Name",
  • "email": "Company@mail.com",
  • "mobilePhoneNumber": "12345678",
  • "isMobileNumberSmsNotificationsEnabled": true,
  • "useBillingAsShippingAddress": false,
  • "billingAddress": {
    },
  • "shippingAddress": {
    },
  • "paymentMethodsCards": [
    ],
  • "paymentMethodsAchAccounts": null
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

Search customers

SecurityBearer or Bearer or Bearer or Bearer
Request
query Parameters
page
integer <int32>

Page number

pageSize
integer <int32>

Items on page

orderBy
string

Order by field

asc
boolean

Is order ascending

search
string

Search string

customerIds
Array of strings <uuid>

Customers Ids

dateFrom
string <date-time>

Date from

dateTo
string <date-time>

Date to

Responses
200

Success

400

Bad Request

404

Not Found

500

Server Error

get/pay-api/v1/customers
Request samples
Response samples
application/json
{
  • "items": [
    ],
  • "total": 0
}

Update customer

SecurityBearer or Bearer or Bearer or Bearer
Request
path Parameters
customerId
required
string <uuid>
Request Body schema: application/json
firstName
required
string non-empty

First name

lastName
required
string non-empty

Last name

companyName
string or null

Company name

email
string or null

Email

mobilePhoneNumber
string or null

Phone number

isMobileNumberSmsNotificationsEnabled
boolean

Is SMS notification enabled

useBillingAsShippingAddress
boolean

Use billing address as shipping address

object (PaymentGateway.Contracts.Customers.Update.UpdateCustomerRequestDto.AddressDto)
object (PaymentGateway.Contracts.Customers.Update.UpdateCustomerRequestDto.AddressDto)
Responses
200

Success

400

Bad Request

404

Not Found

500

Server Error

put/pay-api/v1/customers/{customerId}
Request samples
application/json
{
  • "firstName": "First",
  • "lastName": "Last",
  • "companyName": "Company Name",
  • "email": "Company@mail.com",
  • "mobilePhoneNumber": "12345678",
  • "isMobileNumberSmsNotificationsEnabled": true,
  • "useBillingAsShippingAddress": false,
  • "billingAddress": {
    },
  • "shippingAddress": {
    }
}
Response samples
application/json
{
  • "errors": {
    },
  • "details": "Validation failed: \n -- Email: 'Email' is not a valid email address. Severity: Error",
  • "statusCode": 400,
  • "source": "<Service>",
  • "exceptionType": "FluentValidation.ValidationException",
  • "correlationId": "aa6cfcd0-0295-4a4c-b074-8c901f114fee",
  • "entityId": null,
  • "errorCode": null
}

Get customer

SecurityBearer or Bearer or Bearer or Bearer
Request
path Parameters
customerId
required
string <uuid>
Responses
200

Success

400

Bad Request

404

Not Found

500

Server Error

get/pay-api/v1/customers/{customerId}
Request samples
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "merchantId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
  • "firstName": "string",
  • "lastName": "string",
  • "companyName": "string",
  • "email": "string",
  • "mobilePhoneNumber": "string",
  • "isMobileNumberSmsNotificationsEnabled": true,
  • "useBillingAsShippingAddress": true,
  • "defaultPaymentMethodId": "10098869-575b-49ae-a0bc-197f04f0018a",
  • "defaultAchPaymentMethodId": "d193eb46-976d-4274-b4e4-18dbd12acd3a",
  • "createdOn": "2019-08-24T14:15:22Z",
  • "modifiedOn": "2019-08-24T14:15:22Z",
  • "billingAddress": {
    },
  • "shippingAddress": {
    },
  • "lastTransactionDate": "2019-08-24T14:15:22Z",
  • "transactionsCount": 0,
  • "transactionsVolume": 0,
  • "lastTransactionAmount": 0,
  • "numberOfSubscriptions": 0,
  • "cards": [
    ],
  • "achAccounts": [
    ]
}

Delete customer

SecurityBearer or Bearer or Bearer or Bearer
Request
path Parameters
customerId
required
string <uuid>
Responses
200

Success

400

Bad Request

404

Not Found

500

Server Error

delete/pay-api/v1/customers/{customerId}
Request samples
Response samples
application/json
{
  • "errors": {
    },
  • "details": "Validation failed: \n -- Email: 'Email' is not a valid email address. Severity: Error",
  • "statusCode": 400,
  • "source": "<Service>",
  • "exceptionType": "FluentValidation.ValidationException",
  • "correlationId": "aa6cfcd0-0295-4a4c-b074-8c901f114fee",
  • "entityId": null,
  • "errorCode": null
}

Add payment method for cards

SecurityBearer or Bearer or Bearer or Bearer
Request
path Parameters
customerId
required
string <uuid>
Request Body schema: application/json
name
string or null

Payment method name

pan
required
string non-empty

PAN

expirationMonth
required
integer <int32>

Expiration month

expirationYear
required
integer <int32>

Expiration year

securityCode
string or null

Security code

Responses
200

Success

400

Bad Request

404

Not Found

500

Server Error

post/pay-api/v1/customers/{customerId}/payment-methods/cards
Request samples
application/json
{
  • "name": "Payment_method",
  • "pan": "444466666655555",
  • "expirationMonth": 1,
  • "expirationYear": 24,
  • "securityCode": "345"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

Add payment method for EFT/ACH

SecurityBearer or Bearer or Bearer or Bearer
Request
path Parameters
customerId
required
string <uuid>
Request Body schema: application/json
name
required
string non-empty

Payment method name

accountNumber
string or null

Account number

routingNumber
required
string non-empty

Routing number

accountType
required
integer <int32> (PaymentGateway.Contracts.Enums.AccountType)

Account type

Possible values:

  • 1 - Checking: Checking
  • 2 - Savings: Savings
Enum: 1 2
accountHolderType
required
integer <int32> (PaymentGateway.Contracts.Enums.AccountHolderType)

Account holder type

Possible values:

  • 1 - Business: Business
  • 2 - Personal: Personal
Enum: 1 2
taxId
string or null

Tax Id

Responses
200

Success

400

Bad Request

404

Not Found

500

Server Error

post/pay-api/v1/customers/{customerId}/payment-methods/ach
Request samples
application/json
{
  • "name": "string",
  • "accountNumber": "string",
  • "routingNumber": "string",
  • "accountType": 1,
  • "accountHolderType": 1,
  • "taxId": "string"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

Get customer's payment methods

SecurityBearer or Bearer or Bearer or Bearer
Request
path Parameters
customerId
required
string <uuid>
query Parameters
page
integer <int32>

Page number

pageSize
integer <int32>

Items on page

orderBy
string

Order by field

asc
boolean

Is order ascending

search
string

Search string

dateFrom
string <date-time>

Date from

dateTo
string <date-time>

Date to

Responses
200

Success

400

Bad Request

404

Not Found

500

Server Error

get/pay-api/v1/customers/{customerId}/payment-methods
Request samples
Response samples
application/json
{
  • "items": [
    ],
  • "total": 0
}

Update payment method

SecurityBearer or Bearer or Bearer or Bearer
Request
path Parameters
customerId
required
string <uuid>
paymentMethodId
required
string <uuid>
Request Body schema: application/json
name
string or null

Payment method name

Responses
200

Success

400

Bad Request

404

Not Found

500

Server Error

put/pay-api/v1/customers/{customerId}/payment-methods/{paymentMethodId}
Request samples
application/json
{
  • "name": "Payment_Method"
}
Response samples
application/json
{
  • "errors": {
    },
  • "details": "Validation failed: \n -- Email: 'Email' is not a valid email address. Severity: Error",
  • "statusCode": 400,
  • "source": "<Service>",
  • "exceptionType": "FluentValidation.ValidationException",
  • "correlationId": "aa6cfcd0-0295-4a4c-b074-8c901f114fee",
  • "entityId": null,
  • "errorCode": null
}

Delete payment method

SecurityBearer or Bearer or Bearer or Bearer
Request
path Parameters
customerId
required
string <uuid>
paymentMethodId
required
string <uuid>
Responses
200

Success

400

Bad Request

404

Not Found

500

Server Error

delete/pay-api/v1/customers/{customerId}/payment-methods/{paymentMethodId}
Request samples
Response samples
application/json
{
  • "errors": {
    },
  • "details": "Validation failed: \n -- Email: 'Email' is not a valid email address. Severity: Error",
  • "statusCode": 400,
  • "source": "<Service>",
  • "exceptionType": "FluentValidation.ValidationException",
  • "correlationId": "aa6cfcd0-0295-4a4c-b074-8c901f114fee",
  • "entityId": null,
  • "errorCode": null
}

Make payment method default

SecurityBearer or Bearer or Bearer or Bearer
Request
path Parameters
customerId
required
string <uuid>
paymentMethodId
required
string <uuid>
Responses
200

Success

400

Bad Request

404

Not Found

500

Server Error

put/pay-api/v1/customers/{customerId}/payment-methods/{paymentMethodId}/make-default
Request samples
Response samples
application/json
{
  • "errors": {
    },
  • "details": "Validation failed: \n -- Email: 'Email' is not a valid email address. Severity: Error",
  • "statusCode": 400,
  • "source": "<Service>",
  • "exceptionType": "FluentValidation.ValidationException",
  • "correlationId": "aa6cfcd0-0295-4a4c-b074-8c901f114fee",
  • "entityId": null,
  • "errorCode": null
}