Docs
DocumentationAPI ReferenceAsk AI Assistant
  • Home
    • Get Your Business Started
    • Services and Supported Features
  • Documentation
    • Developer Quickstart
      • Authentication
      • Card Sales and Consent
      • Querying and Filtering
      • Payment Reminders
    • Getting Started
      • Integration Checklist
      • Integration Options
        • REST API
        • Android SDK
        • iOS SDK
        • React Native Wrapper
        • PayForm
        • Verifone
        • Virtual Terminal
      • Basics
        • Authentication
        • API Best Practices
        • API Input Validation
        • Testing Considerations
      • Client Admin Portal
    • Testing
      • Testing Overview
      • Global Payments Testing
      • First Data Testing
      • ACH Testing
    • Resources
      • Tools and Downloads
      • Vocabulary
      • Querying
      • Error Codes
      • Software Requirements
  • API Reference
    • REST API
      • Authentication
      • ACH
      • Card Operations
        • Process a Card Sale
      • Consent Annual
        • Create Annual Consent
      • Consent Recurring
        • Create Recurring Consent
      • Consent Subscription
      • International
      • PayForm
      • Query
        • Account
        • ACH
        • Batch
        • Consent Annual
        • Consent Recurring
        • Consent General
        • Recurring Schedule
        • Receipt
        • Transaction
        • Voice
        • Query General
        • Reconcile
      • Receipt
      • Recurring Schedule
      • Settlement
      • Text to Pay
  • Help
    • Customer Support
      • FAQ
Powered by GitBook

Copyright ยฉ Number

On this page

Was this helpful?

Export as PDF
  1. API Reference
  2. REST API
  3. Query

Consent Annual

Queries related to annual consent

PreviousBatchNextConsent Recurring

Last updated 4 months ago

Was this helpful?

  • POSTQuery annual consent
  • POSTQuery annual consent with APR
  • POSTGet full detail of annual consent
  • POSTQuery annual consent receipt

Query annual consent

post
Header parameters
SessKeystringRequired

A unique session key used for authentication in API calls. This key is generated upon successful authentication and must be included in all subsequent requests.

Example: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-TypestringRequiredExample: application/json
AcceptstringRequiredExample: application/json
Body
QuerystringOptional

A query string for obtaining specific consent records using Number's query language. Build logical terms and join them with '&&' for logical AND or '||' for logical OR. Use single quotes for text and date values. Refer to the variable chart for query composition:

  • A: MERCHANT ID - The merchant record you are interested in, e.g. (A=1).
  • B: START DATE - The date the consent becomes active, e.g. (B>='10/20/2024').
  • C: END DATE - The date the consent expires, e.g. (C<='10/20/2024').
  • D: ACCOUNT HOLDER LAST NAME - Last name of the account holder, e.g. (D LIKE '%MITH') for all names that end with 'MITH'.
  • E: CREATED ON - The date the consent was created, e.g. (E<='10/20/2024').
  • F: CUSTOMER REFERENCE ID - User-defined value on the consent.
  • G: CONSENT TYPE - The type of consent, e.g. (G='-1').
    • -1: ALL
    • 1: ANNUAL
    • 2: ONE-TIME
    • 3: RECURRING
    • 4: SUBSCRIPTION
  • H: ENABLED - Indicates whether the consent is currently enabled, e.g. (H=1).
  • J: RPGUID - User-defined value on the consent.
  • K: ACCOUNT HOLDER FIRST NAME - First name of the account holder, e.g. (K LIKE 'ROB%') for all names that start with 'ROB'.
  • Z: CONSENT ID - The unique identifier for the consent, e.g. (Z=15875).
Example: (G=1)&&(B>'10/20/2024')
Responses
200
Successfully returned consent records
application/json
post
POST /APIcardProcREST/v1.0.0/Query/ConsentAnnual HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 37

{
  "Query": "(A=-1)&&(G=1)&&(H='True')"
}
200

Successfully returned consent records

{
  "ConsentAnnual_QueryResult": {
    "Consents": [
      {
        "AcctHolderFirstName": "JOHN",
        "AcctHolderID": 1,
        "AcctHolderLastName": "DOE",
        "AcctNo": "1111",
        "AuthTxID": 15,
        "CreatedBy": "John_Doe",
        "CreatedOn": "2024-12-01 11:19:01",
        "CustID": 15,
        "CustomerRefID": "A12345NO-99",
        "EndDate": "2024-12-01 11:19:01",
        "ID": 12,
        "IsEnabled": true,
        "LimitLifeTime": 1000000,
        "LimitPerCharge": 1000000,
        "MerchID": 1,
        "NumDays": 365,
        "RPGUID": "adf98580-b4ab-42fc-bb99-01c89964afe9",
        "ServiceDescrip": "",
        "StartDate": "2024-12-01 11:19:01"
      }
    ],
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "NumRecords": 2,
    "RespMsg": "Successfully Returned Consent Records : 2"
  }
}

Query annual consent with APR

post

Use this call to determine if the purchaser has a card on file. If you have created the consent (card on file) using a reference ID or PatientID then you can use the following Query to return an array of Consents ( Card On File Info ) for a particular patient with this PatientID: F='213456')&&(H=1)&& (C>='01/21/2024') This will return consents with a particular PatientID which are still enabled and have not yet expired ( use todays date ).

You will want to present the user with the last 4 digits of each stored card so they can decide to choose a stored card or simply enter a new one. Easy Pay offers multiple ways of querying consent data. View the https://easypaysoftware.com/en/Querying Query Guide for more details.

Header parameters
SessKeystringRequired

A unique session key used for authentication in API calls. This key is generated upon successful authentication and must be included in all subsequent requests.

Example: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-TypestringRequiredExample: application/json
AcceptstringRequiredExample: application/json
Body
QuerystringOptional

A query string for obtaining specific consent records using Number's query language. Build logical terms and join them with '&&' for logical AND or '||' for logical OR. Use single quotes for text and date values. Refer to the variable chart for query composition:

  • A: MERCHANT ID - The merchant record you are interested in, e.g. (A=1).
  • B: START DATE - The date the consent becomes active, e.g. (B>='10/20/2024').
  • C: END DATE - The date the consent expires, e.g. (C<='10/20/2024').
  • D: ACCOUNT HOLDER LAST NAME - Last name of the account holder, e.g. (D LIKE '%MITH') for all names that end with 'MITH'.
  • E: CREATED ON - The date the consent was created, e.g. (E<='10/20/2024').
  • F: CUSTOMER REFERENCE ID - User-defined value on the consent.
  • G: CONSENT TYPE - The type of consent, e.g. (G='-1').
    • -1: ALL
    • 1: ANNUAL
    • 2: ONE-TIME
    • 3: RECURRING
    • 4: SUBSCRIPTION
  • H: ENABLED - Indicates whether the consent is currently enabled, e.g. (H=1).
  • J: RPGUID - User-defined value on the consent.
  • K: ACCOUNT HOLDER FIRST NAME - First name of the account holder, e.g. (K LIKE 'ROB%') for all names that start with 'ROB'.
  • Z: CONSENT ID - The unique identifier for the consent, e.g. (Z=15875).
Example: (G=1)&&(B>'10/20/2024')
Responses
200
Successfully returned consent records
application/json
post
POST /APIcardProcREST/v1.0.0/ConsentAnnual/QueryApr HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 61

{
  "Query": "(A=1)&&(J='07e77e99-b16e-4b0f-8935-8d28e3fa28ef')"
}
200

Successfully returned consent records

{
  "ConsentAnnual_Query_AprResult": {
    "Consents": [
      {
        "AcctFirstName": "MTIP08-1 DMC 13A",
        "AcctLastName": "MTIP08-1 DMC 13A",
        "AcctMask": "5457XXXXXXXX0012",
        "CardExpDate": "1225",
        "CardType": "MC",
        "ConsentType": "S",
        "CreatedOn": "2024-12-01 11:19:01",
        "CustomerRefID": "197",
        "EndDate": "2024-12-01 11:19:01",
        "ExpiredConsent": false,
        "ID": 386,
        "IsEnabled": true,
        "LimitLifeTime": 1000,
        "LimitPerCharge": 100,
        "MerchID": 1,
        "ModifiedOn": "2024-12-01 11:19:01",
        "RPGUID": "adf98580-b4ab-42fc-bb99-01c89964afe9",
        "Remaining": 1000,
        "StartDate": "2024-12-01 11:19:01"
      }
    ],
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "NumRecords": 1,
    "RespMsg": "Successfully Returned Consent Records : 1"
  }
}

Get full detail of annual consent

post
Header parameters
SessKeystringRequired

A unique session key used for authentication in API calls. This key is generated upon successful authentication and must be included in all subsequent requests.

Example: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-TypestringRequiredExample: application/json
AcceptstringRequiredExample: application/json
Body
ConsentIDintegerOptional

ID of the consent

Example: 12
Responses
200
Successfully returned full detail for consent
application/json
post
POST /APIcardProcREST/v1.0.0/Query/ConsentAnnual_FullDetail HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 16

{
  "ConsentID": 12
}
200

Successfully returned full detail for consent

{
  "ConsentAnnual_FullDetailResult": {
    "AccounttHolder": {
      "AccountNum": "wj8HlAYlMJI=jvje9l7qZuEFiDDeEDDym6ZdlL0DX8HX",
      "AcctMask": "4111XXXXXXXX1111",
      "Address1": "123 Fake St",
      "Address2": "",
      "CardType": "VI",
      "City": "PORTLAND",
      "Company": "",
      "CreatedOn": "2024-12-01 11:19:01",
      "Email": "robert@easypaysolutions.com",
      "ExpDate": "1023",
      "Firstname": "Sean",
      "ID": 1,
      "LastChanged": "2024-12-01 11:19:01",
      "LastName": "Wood",
      "MerchID": 1,
      "Phone": "8777248472",
      "State": "ME",
      "Zip": "04106"
    },
    "ConsentAnnual": {
      "AcctHolderFirstName": "JOHN",
      "AcctHolderID": 1,
      "AcctHolderLastName": "DOE",
      "AcctNo": "1111",
      "AuthTxID": 15,
      "CreatedBy": "vidya_Venkatraman",
      "CreatedOn": "2024-12-01 11:19:01",
      "CustID": 15,
      "CustomerRefID": "A12345NO-99",
      "EndDate": "2024-12-01 11:19:01",
      "ID": 12,
      "IsEnabled": true,
      "LimitLifeTime": 1000000,
      "LimitPerCharge": 1000000,
      "MerchID": 1,
      "NumDays": 365,
      "RPGUID": "adf98580-b4ab-42fc-bb99-01c89964afe9",
      "ServiceDescrip": "",
      "StartDate": "2024-12-01 11:19:01"
    },
    "EndCustomer": {
      "Address1": "123 Fake St.",
      "Address2": "          ",
      "City": "PORTLAND  ",
      "ClientRefID": "A123456",
      "Company": "",
      "CreatedOn": "2024-12-01 11:19:01",
      "Email": "robert@easypaysolutions.com",
      "Firstname": "Sean",
      "ID": 72,
      "LastChanged": "2024-12-01 11:19:01",
      "LastName": "Wood",
      "MerchID": 1,
      "Phone": "8777248472",
      "Service": "",
      "State": "ME        ",
      "Zip": "04106          "
    },
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "RespMsg": "Successfully Returned Full Detail For Consent ID : 12"
  }
}

Query annual consent receipt

post
Header parameters
SessKeystringRequired

A unique session key used for authentication in API calls. This key is generated upon successful authentication and must be included in all subsequent requests.

Example: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-TypestringRequiredExample: application/json
AcceptstringRequiredExample: application/json
Body
ConsentIDintegerOptional

ID of the consent

Example: 2
ReceiptTypeinteger ยท enumOptional

The type of receipt

  • 1: Transaction
  • 2: Void
  • 3: Refund
  • 4: Annual Consent
  • 5: Recurring Consent
  • 6: Subscription
  • 7: ACH Transaction
  • 8: ACH Void
  • 9: ACH Refund
Example: 2Possible values:
Responses
200
Successfully returned annual consent receipt
application/json
post
POST /APIcardProcREST/v1.0.0/Query/ConsentAnnualReceipt HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 31

{
  "ConsentID": 2,
  "ReceiptType": 1
}
200

Successfully returned annual consent receipt

{
  "ConsentAnnualReceiptQryResult": {
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "ReceiptHtml": "<!DOCTYPE html>\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head runat=\"server\">\n<meta name=\"viewport\" content= width=device-width, initial-scale=1 />\n<title></title>\n</head>\n<body>\n<form id=form1 runat=server>\n<div style=font-size:12px;font-family:Verdana align=center>\n<h3>SALE RECEIPT</h3>\n<br />\n<div>\n<label>REA010 RETAIL</label>\n<br />\n<label>1307 BROAD HOLLOW ROAD</label>\n<br />\n<label>ANYWHERE, ME 11747</label>\n<br /><label></label>\n</div><br /> <br />\n<table style=text-align:left>\n<tr>\n<td>CARDHOLDER NAME:</td>\n<td><label>Wood, Sean</label></td>\n</tr>\n<tr>\n<td>ACCT NUMBER:</td>\n<td><label>x1118</label></td>\n</tr>\n<tr>\n<td>EXP DATE:</td>\n<td><label>xxxx</label></td>\n</tr>\n<tr>\n<td>TX ID:</td>\n<td><label>4117</label></td>\n</tr>\n<tr>\n<td>SEQ:</td>\n<td><label>5981</label></td>\n</tr>\n<tr><td>APPROVAL CODE:</td><td><label>OK5100</label></td></tr>\n<tr>\n<td><label>PATIENT</label> REF ID:</td>\n<td><label>12456</label></td>\n</tr>\n<tr>\n<td>TX DATE:</td>\n<td><label>12/13/2024 9:10:44 AM</label></td>\n</tr>\n<tr>\n<td>CARD TYPE:</td>\n<td><label>VI</label></td>\n</tr>\n<tr>\n<td>ENTRY METHOD:</td>\n<td><label>ManualEntry</label></td>\n</tr>\n<tr>\n<td>AMOUNT:</td>\n<td><asp:label runat=server>$10.00</asp:label></td>\n</tr>\n<tr>\n<td></td>\n<td><asp:label runat=server></asp:label></td>\n</tr>\n<tr>\n<td>TOTAL(USD):</td>\n<td><label>$10.00</label></td>\n</tr>\n</table>\n<br />\n<div>\n<label>THANK YOU FOR YOUR PATRONAGE</label><br />\n<label>All Sales Final</label><br />\n<div><label>I agree to pay REA010 RETAIL the above amount according to card issuer agreement.</label></div>\n<br /><br />\n<div><label>SIGNATURE</label></div>\n<br />\n<div>___________________________________</div>\n<h3><b>MERCHANT COPY</b></h3>\n</div>\n</div>\n</form>\n</body>\n</html>\n",
    "RespMsg": "Successfully Returned Transaction Receipt Markup"
  }
}