Payment Methods Payload

This section is to guide integrators in understanding different payment methods payload for each types of payment method. Ezypay's payment method payload is made up of 2 different parts:

  1. Generic Payment Methods Information
  2. Specific Payment Method Data

Generic Payment Methods Information

This contains general information of the payment method. These fields are same among all payment methods.

{
    "paymentMethodToken": "a0103b2d-a5c3-40f1-9f8b-3856033ac069",
    "customerId": "c623b717-234a-442c-961c-12e2d80e02ff",
    "type": "PAYTO",
    "bank": null,
    "payTo": {"some data"
    },
    "card": null,
    "invalidReason": {
        "code": "mandate_created",
        "description": "Mandate is created but not activated yet."
    },
    "lastUsedOn": null,
    "replacedPaymentMethodData": null,
    "wallet": null,
    "valid": false,
    "primary": true
}

Payload FieldDescriptionDetails
paymentMethodTokenPayment Method TokenThis is the unique token linked to a specific payment method data stored in Ezypay vault.
customerIdEzypay's Customer UUIDUnique ID of the customer registered in Ezypay that linked to the payment method.
typePayment Method TypeIndicating which type this payment method token belongs to. 4 possible value.

1. PAYTO
2. WALLET
3. BANK
4. CARD
bank, payTo, card, walletInformation about the underlying payment methodsThese fields shows the truncated data of the underlying payment method of the token. Only the field corresponding to the type field will contains data. Others will return as null.
invalidReasonReason on why the payment method is invalidatedReturn null if the payment method is still valid, else return an object specifying the invalid reasons. The object contain 2 fields:
a) code - the failure code
b) description - Description for the failure code.
lastUsedOnPayment Method Last used dateShows the date and time the payment method was last used on in ISO 8601 format. If it is not used before, will show null.
replacedPaymentMethodDataPayment Method Data that is being replacedOnly applicable when replacing a payment method, otherwise it will be null. It contains a payment method object with all the same fields as the payment method payload.
validValid flag of the payment methodIndicates whether the payment method is valid or not.
True - This payment method is valid
False - This payment method is invalid
primaryPrimary flag of the payment methodIndicates whether the payment method is primary or not.
True - This payment method is primary
False - This payment method is not primary.

Specific Payment Method Data

Table below shows the difference on the data for different payment method type. Please take note only truncated data is returned for sensitive data.

{  
  "type": "CARD",  
  "card": {  
    "accountHolderName": "John Smith",  
    "expiryYear": "22",  
    "expiryMonth": "01",  
    "type": "VISA",  
    "last4": "1111",  
    "first6": "411111",  
    "origin": null,  
    "tokenDetails": null,
    "tokenized": false
  }
}
{  
  "type": "BANK",  
  "bank": {  
    "accountHolderName": "John Smith",  
    "last4": "1534",  
    "bankNumber": "062140",  
    "branchNumber": "2140",  
    "suffixNumber": "06",  
    "countryCode": "AU",  
    "bankTransferType": "LOCAL"  
  }
}
{
  "type": "wallet",  
  "wallet": {  
        "accountHolderName": "John Smith",  
        "accountMobileNumber": "+63966164540",  
        "type": "gcash",
        "merchantId": "bfdaa558-0779-4df0-98a0-41280e9dd805",  
        "walletPaymentProviderId": "5cafeb170a2b18519b1b8761", 
        "countryCode": "PH"  
  }
}
{
  "type": "PAYTO",  
    "payTo": {  
        "accountHolderName": "John Smith",  
        "accountType": "ALIA",  
        "aliasType": "TELI",  
        "aliasId": "+61-412345678",  
        "merchantId": "1aefbba9-263a-484f-8ba1-1b074b8c1493",  
        "mandateTypeId": "bd0d2201-92ac-432a-80d1-fc884be19dba",  
        "mandateStatus": "CRTD",  
        "mandateReason": "Created.",  
        "mandateId": "504544b4c810457f9c94793455ed50b9",  
        "description": "Payment for JGym Membership",  
        "frequency": "ADHO",  
        "validityStartDate": "2024-07-30T07:37:39.146",  
        "maximumPaymentAmount": 1000.00,  
        "bbanBSB": null,  
        "bbanAccountNo": null  
    }
}

Card Payload Explanation

Table below explain the meaning of card payload:

Payload FieldDescriptionDetails
accountHolderNameAccount Holder's Name
expiryYearYear of card expiryShowing last 2 digit of the year of expiry. Integrators should store this and display to the customer
expiryMonthMonth of card expiryShowing the 2 digit of the month of expiry. Integrators should store this and display to the customer
typeType of the card3 possible value.
a) VISA
b) MASTER
c) AMEX
Integrators should store this and display to the customer
last4Last 4 digit of card numberIntegrators should store this and display to the customer. Together with type of card will allows customer to identify the payment method easily.
first6First 6 digit of card number
originN/ANot being used right now
tokenDetailsN/ANot being used right now
tokenizedIndicate is the payment method network tokenizedApplicable value:
a) true
b) false

Bank Payload Explanation

Payload FieldDescriptionDetails
accountHolderNameAccount Holder's Name
last4Last 4 digit of bank account numberIntegrators should store this and display to the customer to allow customer identify the payment method easily.
bankNumberBank Number of the bankAU: 6 digit BSB Number
NZ: 2 digit bank number
Integrators should store this and display to the customer to allow customer identify the payment method easily.
branchNumberBranch number of the bankAU: null
NZ: 4 digit branch code
suffixNumberSuffix Number of the bankAU: null
NZ: 2 or 3 digit suffix number
countryCodeCountry code of the bankISO 3166 country codes
bankTransferTypeIndicates local or international transferApplicable value:
a) local
b) international

Wallet Payload Explanation

Payload FieldDescriptionDetails
accountHolderNameAccount Holder's Name
accountMobileNumberMobile Number that the wallet ties toThis is the full mobile number with country code.

Integrators should store this and display to the customer to allow customer identify the payment method easily..
typeType of the wallet.Integrators should store this and display to the customer to allow customer identify the payment method easily.
merchantIdMerchant ID of Ezypay
walletPaymentProviderIdAccount ID tied to the payment providerThis ID is for payment provider identification
countryCodeCountry code of the walletISO 3166 country codes

## PayTo Payload Explanation

Table below explain the meaning of PayTo payload:

Payload FieldDescriptionDetails
accountHolderNameAccount Holder's NameThis is the full name used for the customer's bank account.
accountTypeAccount TypeThis is the type of account that the customer is using for PayTo:
BBAN - Bank Account Number
ALIA - Alias, a PayID is used
aliasTypetype of the PayIDShowing the type of PayID captured..
EMAL - Email address is used as PayID
TELI - Phone number is used as PayID

If accountType is not ALIA, this field is null.

Integrators should store this and display to the customer to allow customer identify the payment method easily.
aliasIdDetails of the PayIDDepends on aliasType, this field shows the details of the PayID captured.
EMAL - Display the email address registered as PayID
TELI - Display the phone number registered as PayID

If accountType is not ALIA, this field is null.

Integrators should store this and display to the customer to allow customer identify the payment method easily.
merchantIdEzypay Merchant IDThis is the unique identifier of the merchant when they onboarded Ezypay.
mandateTypeIdEzypay Mandate Type IDThis is the unique identifier assigned to the merchant by Ezypay when they have been enabled to use PayTo services.
mandateStatusMandate StatusThis is the status code of the mandate. A mandate can have the following status code:

- CRTD
- CNCD
- ACTV
- SUSD
mandateReasonMandate Status DescriptionThis is explanation of the mandateStatus.

- Created = CRTD
- Cancelled = CNCD
- Active = ACTV
- Suspended =SUSD
mandateIdPayTo Mandate IDThis is a unique identifier used between Ezypay and their banking partner.
descriptionDescription of the mandateThis description explain the purpose of the mandate
frequencyBilling frequency of the mandateIndicates the allowed payment frequency for this mandate. Current available value is ADHO which indicates ad-hoc.
validityStartDateDate of mandate creationShowing the date of PayTo mandate being created in ISO 8601 format.
maximumPaymentAmountMaximum amount of a transactionMaximum allowable amount to be transacted using this mandate.
bbanBSBAccount Holder's BSB NumberThis is the BSB number of the customer's bank account. If accountType is not BBAN, this field is null.

Integrators should store this and display to the customer to allow customer identify the payment method easily.
bbBanAccountNoAccount Holder's Bank Account NumberThis is the account number for the customer's bank account. If accountType is not BBAN, this field is null.

Integrators should store this and display to the customer to allow customer identify the payment method easily.