Customer API

This API document offers detailed examples of how Merchants can use Customer and CustomerSummary end points. This document is aimed at the technical teams in Merchant’s organisations who will be responsible for implementing the integration.

 

Calling end points

The Customer end point allows us to inform the merchant about the accounts for different payment solutions that a customer has. For example, Let’s Say that Jon has two different accounts for neteller and one more for Trustly, The customer details and different accounts that he has registered will be sent to the merchant.

The CustomerSummary end point allows us to inform the merchant about the historical operation that a customer have done through our system.

In order to be able to make an API call merchant will need to encrypt the information with a token. Also the merchant will need to set the Accept header on the request as “application/xml” or “application/json” in order to get the response in xml or json format.

 

Customer endpoint

Url

  • Staging: https://checkout-stg.easypaymentgateway.com/EPGCheckout/rest/online/customer?
  • Production: https://checkout-prd.easypaymentgateway.com/EPGCheckout/rest/online/customer?

Customer Request Parameters:

  • merchantId : Id of the merchant in our system. (Required)
  • encrypted : ref to Hosted Payment Gateway API Guide
    • customerId: Id of the customer for the merchant. (Required)
    • paymentSolution: List of the payment solutions that you want to check, separated between commas. “skrill, neteller” (Required)
    • format: response content type: application/json or application/xml (Required)
    • customerPaysolId: Payment solution account id (Optional)
  • integrityCheck : ref to Hosted Payment Gateway API Guide

Customer Response Parameters:

  • customerId : Id of the customer for the merchant.
  • customerAccounts[] :
    • accountId
    • paymentSolution
    • iban
    • holder
    • cardNumberToken
    • cardHolderName
    • expirationDate
    • internalToken
    • accountNumber
    • bankName
    • bankCountry
    • bankCode
    • paymentSolutionCustomerInformation
  • details :
    • email
    • addressLine1
    • addressLine2
    • state
    • city
    • postcode
    • telephone
    • firstName
    • lastName
    • country
    • dateOfBirth
    • title
    • buildingName
    • buildingNumber

     

 

Customer Accounts summary

Url

  • Staging: https://checkout-stg.easypaymentgateway.com/EPGCheckout/rest/online/customerSummary?
  • Production: https://checkout-prd.easypaymentgateway.com/EPGCheckout/rest/online/customerSummary?

Customer Accounts Summary Request Parameters:

  • merchantId : Id of the merchant in our system. (Required)
  • encrypted : ref to Hosted Payment Gateway API Guide
    • customerId: Id of the customer for the merchant. (Required)
    • paymentSolution: In order to filter the accounts queried by payment Solutions (Optional)
    • format: response content type: application/json or application/xml (Required)
    • paymentSolution: List of the payment solutions that you want to check, separated between commas. “skrill, neteller” (Required)
    • customerPaysolId: Payment solution account id (Optional)
  • integrityCheck : ref to Hosted Payment Gateway API Guide

Customer Accounts Summary Response Parameters:

  • customerSummaryResponse[]:
    • paymentSolution
    • account:
      • accountId
      • iban
      • holder
      • cardNumberToken
      • cardHolderName
      • expirationData
      • internalToken
      • accountNumber
      • bankName
      • bankCountry
      • bankCode
      • paymentSolutionCustomerInformation
    • operationType : {credit, debit}
    • status : {INITIATED, PENDING, SUCCESS, FAIL, ERROR, VOIDED, REBATED, REJECTED, GROUPED, SUCCESS_WARNING, REDIRECTED, AWAITING_PAYSOL, PARTIAL,  COMPLETED, SUCCESS3DS, ERROR3DS}
    • sumAmount
    • currency: ISO-3
    • numTransactions
  • INITIATED(1L, “INITIATED”),PENDING(2L, “PENDING”), SUCCESS(3L, “SUCCESS”), FAIL(4L, “FAIL”),

    ERROR(5L, “ERROR”), VOIDED(6L, “VOIDED”), REBATED(7L, “REBATED”), NA(8L, “N/A”), REJECTED(9L, “REJECTED”), GROUPED(10L, “GROUPED”),SUCCESS_WARNING(11L, “SUCCESS_WARNING”),

    REDIRECTED(12l, “REDIRECTED”),AWAITING_PAYSOL(13l, “AWAITING_PAYSOL”), PARTIAL(14l, “PARTIAL”) , COMPLETED(15l, “COMPLETED”), SUCCESS3DS(16l, “SUCCESS3DS”), ERROR3DS(17l, “ERROR3DS”);

Code Example – Snippets

Above example uses below classes:

Examples

Customer Response – Json

{  
   "customerId":"1234567",
   "details":{  
      "email":null,
      "addressLine1":null,
      "addressLine2":null,
      "state":null,
      "city":null,
      "postCode":null,
      "telephone":null,
      "firstName":"wirecard",
      "lastName":"payin",
      "country":null,
      "county":null,
      "dateOfBirth":null,
      "title":null,
      "buildingName":null,
      "buildingNumber":null
   },
   "customerAccounts":[  
      {  
         "accountId":null,
         "paymentSolution":"WireCard",
         "iban":null,
         "holder":null,
         "cardNumberToken":"420000****0000",
         "cardHolderName":"Mr Tester",
         "expirationDate":"1121",
         "internalToken":"1922002520580000",
         "accountNumber":null,
         "bankName":null,
         "bankCountry":null,
         "bankCode":null,
         "paymentSolutionCustomerInformation":null
      },
      {  
         "accountId":null,
         "paymentSolution":"WireCard",
         "iban":null,
         "holder":null,
         "cardNumberToken":"401200****1003",
         "cardHolderName":"Mr Tester",
         "expirationDate":"1121",
         "internalToken":"9770622217061003",
         "accountNumber":null,
         "bankName":null,
         "bankCountry":null,
         "bankCode":null,
         "paymentSolutionCustomerInformation":null
      }
   ]
}

Customer Summary Response – Json

{  
   "customerSummaryResponse":[  
      {  
         "paymentSolution":"WireCard",
         "account":{  
            "accountId":null,
            "paymentSolution":null,
            "iban":null,
            "holder":null,
            "cardNumberToken":"420000****0000",
            "cardHolderName":"asdf",
            "expirationDate":"1121",
            "internalToken":"1922002520580000",
            "accountNumber":null,
            "bankName":null,
            "bankCountry":null,
            "bankCode":null,
            "paymentSolutionCustomerInformation":null
         },
         "operationType":"DEBIT",
         "status":"SUCCESS",
         "sumAmount":481.0,
         "currency":"GBP",
         "nTransactions":18
      },
      {  
         "paymentSolution":"WireCard",
         "account":{  
            "accountId":null,
            "paymentSolution":null,
            "iban":null,
            "holder":null,
            "cardNumberToken":"401200****1003",
            "cardHolderName":"asdfs",
            "expirationDate":"1121",
            "internalToken":"9770622217061003",
            "accountNumber":null,
            "bankName":null,
            "bankCountry":null,
            "bankCode":null,
            "paymentSolutionCustomerInformation":null
         },
         "operationType":"DEBIT",
         "status":"ERROR",
         "sumAmount":40.0,
         "currency":"GBP",
         "nTransactions":2
      },
      
      
   ]
}

 

Cookies Policy We need our cookies to make Easy Payment Gateway better. If you need more information click here.