Navigation: 4. CLIENT ACCOUNT MANAGEMENT >

The Client Data

 

 

 

 

 

Example of a JSON client Object used to send and receive client data to and from the MYGW server.

 

{

“name”  : "A Citizen";             

“id” : "6721f4f7-8012-43aa-a7d0-68458a2f9e16";             

“clientID” : "AndrewC";

“black” : false;

“correlatedBlack” : false;

“merchantID” : "8873abde-7b40-4ac2-8774-be331fa80ffd ";

“merchantName” : "The Merchant";             

“mobileNumber” : "+610411123456"; 

“clientPhone” : "+61212345678"; 

“emailAddress” : "client@email.com";

“created” : "2017-10-05T02:23:52.645Z ";             

“updated” : "2017-10-17T21:36:50.575Z ";

“valid”  : true;

"billingAddress" : {

"streetNumber" : "23",

"streetName" : "High",

"streetSuffix" : "St",

"city" : "Sydney",

"state ": "NSW",

"postCode" : "2000",

"country" : "Australia",

"valid" : true

},

"cards" : {

"pan" : "************0064",

"expiry" : "MM/YY",

"name" : "Andrew Citizen",

"expiryMonth" : "MM",

"expiryYear ": "YYYY",

“default” : true,

“valid” : true;

},

{

"pan" : "************0065",

"expiry" : "MM/YY",

"name" : "A Citizen",

"expiryMonth" : "MM",

"expiryYear" : "YYYY",

“default” : false,

“valid” : true

}

};

 

Not all the elements of the object are required for every MYGW-CM API call and some are set by the MYGW server. The following tables describe which elements are required for some calls, are optional or read only (as described below in the specific API calls).

 

R:                     System supplied, read-only.

M:                     Mandatory.

O:                    Optional.

 

Client Body

 

Name

Description

R/M/O

id

Gateway identifier, supplied by the MYGW server

R

Name

Client’s name

M

clientID

Key or name to identify the customer

M

black

Flags whether the client is blacklisted. These clients cannot complete transactions until the blacklist is lifted. Set by the MYGW system

R

correlatedBlack

Flags whether a client has some correlation (e.g. same email address, phone or billing address) as a blacklisted client. These clients cannot complete transactions until the blacklist is lifted. Set by the MYGW system

R

merchantID

The unique merchant ID provided by the PSP or allocated by the MYGW system

M

merchantName

The merchant’s name as stored on the MYGW server

O

mobileNumber

The client's mobile phone number which may be used to securely communicate with, and identify the client

M

clientPhone

Alternative phone number of the client

O

emailAddress

Valid email address of the client, used to contact the client if necessary

M

created

Date and time when the client record was created, determined by the MYGW system

R

updated

Date and time when the client record was last updated, determined by the MYGW system

R

valid

Flags whether the client has been validated, set by the MYGW system

R

 

billingAddress

 

The client’s address may optionally be provided when the client is created; in which case the details will be returned when the client’s data is accessed.

 

Name

Description

R/M/O

streetNumber

The number on a street of the client’s postal address

O

streetName

the name of the street of the client’s postal address

O

streetSuffix

The tail of the street address, of the client’s postal address, typically St, Rd, etc

O

city

The town, city or village that is used in the client’s postal address

O

state

The state or region used in the client’s postal address

O

postcode

The postal code used in the client’s postal address

O

country

The country used in the client’s postal address

O

valid

Flags whether the client address has been validated, set by the MYGW system

R

 

cards

 

Each client may optionally have up to 3 account details (card details) provided when the client is created, These ‘lodged’ accounts are referred to as Cards on File and may expedite payment processing by reducing the need for account information to be entered for every payment transaction. If set, this information will be returned when the client’s data is accessed.

 

Name

Description

R/M/O

pan

The Primary Account Number, or that embossed on the front of the credit card

O

expiry

The expiration date of the credit card.

O

name

The name of the person that the credit card was issued to.

O

expiryMonth

This is a derived field, and is the month of the card expiration date.

R

expiryYear

This is a derived field, and is the year of the card expiration date.

R

default

This field indicates that this is the default card,  if more than one card is lodged

O

valid

Flags whether the account details have been validated, set by the MYGW system

R

 

An example of executable JavaScript sample source code to create a client object can be found by clicking on the source code icon below. Note that this is an example of how a client object is structured, it is a not a recommendation for how to implement the client APIs in your own applications.

 

 

 

 

 

Copyright © 2024 My Gateway