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

Consent Annual

PreviousProcess a Card SaleNextCreate Annual Consent

Last updated 4 months ago

Was this helpful?

  • POSTCalculate surcharging or convenience fees
  • POSTCancel a consent (Card On File)
  • POSTCharge a stored card
  • POSTModify an annual consent
  • POSTProcess a payment using a stored card consent
  • POSTProcess a payment using a stored card consent with an alternate merchant
  • POSTRetrieve statistics for a specific consent

Calculate surcharging or convenience fees

post

This API call is for merchant accounts that are specifically configured for surcharge and/or convenience fee processing. Prior to charging a card on file, you may use this method to properly calculate the intended fees (Surcharging or Convenience fees ).

Fees will be calculated based on the merchant configuration and the card type itself. It is important to show the calculated fees at the point of sale so that a cardholder can reject the sale if they desire.

You can specify a Alternate MerchID rather than use the merchant record originally designated when you saved the card. A Value Of ZERO will use the original Merchant record.

Once you have determined your fees you can then call the method named : Charge Stored Card with Options to authorize the sale.

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 for consent associated with the merchant account

Example: 7849
Amountnumber · floatOptional

Base $ amount for which fees are to be calculated

Example: 52
AlternateMerchIDintegerOptional

ID of the merchant to collect the payment funds. Use 0 for the merchant on consent.

Example: 0
Responses
200
Successful calculation of fees
application/json
post
POST /APIcardProcREST/v1.0.0/ConsentAnnual/CalcFees HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 51

{
  "ConsentID": 7849,
  "Amount": 52,
  "AlternateMerchID": 0
}
200

Successful calculation of fees

{
  "ConsentAnnual_CalcFeesResult": {
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "RespMsg": "Fees calculated for CREDIT Card 4663XXXXXXXX2741",
    "Amounts": {
      "BaseAmt": 52,
      "Surcharge": 1.04,
      "TotalAmt": 53.04
    }
  }
}

Cancel a consent (Card On File)

post

Use this call to Cancel a consent (Card On File). You will need the ConsentID in order to execute this method.

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 to be canceled

Example: 20
Responses
200
Successful cancellation of consent
application/json
post
POST /APIcardProcREST/v1.0.0/ConsentAnnual/Cancel HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 16

{
  "ConsentID": 20
}
200

Successful cancellation of consent

{
  "ConsentAnnual_CancelResult": {
    "CancelSuccess": true,
    "CancelledConsentID": 20,
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "RespMsg": "Successfully DISBALED ConsentID 20 : Card Number Removed"
  }
}

Charge a stored card

post

This Method allows the user to charge a stored Card.

ConsentID Please supply the ID of the Consent ( or stored card data )

AlternateMerchID Here you can use ZERO if you plan to charge the same merchant record which was specified when saving the Card Info. You can use a positive integer if you plan to charge a merchant record which differs from the one originally used.

purchDetails If you want to attach new reference data to the transaction you may do so using the following fields:

ServiceDescrip : description of the transaction ClientRefID : your user defined reference ID RPGUID : another user defined reference ID If you choose NOT to supply these fields ( use empty string ) the system will pull this data from the original stored card data.

Amounts Here you will supply the amount of the transaction. You may supply FEES but only if these have been properly configured for each Merchant record.

If you don't have FEES configured simply supply the BaseAmt and TotalAmt.

If you do Have Fees Configured you can call the method named: Calculate Annual Consent Fees prior to calling this method.

You can specify fee values up to and including those determined using the above method.

If you specify values greater than those calculated above, then your value will be clamped.

IMPORTANT : Always check your response to determine the fees which are APPROVED as this may differ from what was REQUESTED.

User Here you can assign a user to the sale so that we record the person which is initiating the sale within the integrator software.

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 (or stored card data)

Example: 8
AlternateMerchIDintegerOptional

Use 0 for the original merchant record or a positive integer for a different merchant record

Example: 0
UserstringOptional

The user initiating the sale. Used for reporting.

Example: Samuel
Responses
200
Successful charge of the stored card
application/json
post
POST /APIcardProcREST/v1.0.0/ConsentAnnual/ChargeStoredCard HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 205

{
  "ConsentID": 8,
  "Amounts": {
    "BaseAmt": 52,
    "Surcharge": 1.04,
    "TotalAmt": 53.04
  },
  "purchDetails": {
    "ServiceDescrip": "Annual Checkup",
    "ClientRefID": "174356",
    "RPGUID": "99438332"
  },
  "AlternateMerchID": 0,
  "User": "Samuel"
}
200

Successful charge of the stored card

{
  "ConsentAnnual_ChargeStoredCardResult": {
    "AVSresult": "Y",
    "AcquirerResponseEMV": null,
    "CVVresult": "",
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "IsPartialApproval": false,
    "RequiresVoiceAuth": false,
    "RespMsg": "APPROVED OK1400",
    "ResponseApprovedAmount": 0,
    "ResponseAuthorizedAmount": 53.04,
    "ResponseBalanceAmount": 0,
    "TxApproved": true,
    "TxID": 37,
    "TxnCode": "OK1400",
    "ApprovedAmounts": {
      "BaseAmt": 52,
      "Surcharge": 1.04,
      "TotalAmt": 53.04
    }
  }
}

Modify an 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 to be modified

Example: 10
Responses
200
Successful modification of annual consent
application/json
post
POST /APIcardProcREST/v1.0.0/ConsentAnnual/Modify HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 281

{
  "ConsentID": 10,
  "ConsentMods": {
    "ExpMonth": 10,
    "ExpYear": 22,
    "Email": "robert@easypaysolutions.com",
    "Zip": "04106",
    "CustomerRefID": "A1235456",
    "ServiceDescrip": "REST API Testor",
    "RPGUID": "adf98580-b4ab-42fc-bb99-01c89964afe9",
    "NumDays": 365,
    "LimitPerCharge": 10000,
    "LimitLifeTime": 100000
  }
}
200

Successful modification of annual consent

{
  "ConsentAnnual_ModifyResult": {
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "ModifySuccess": true,
    "RespMsg": "Success : Modified Consent ID : 10"
  }
}

Process a payment using a stored card consent

post

Use this call to process a payment using a stored card. You will need the ConsentID acquired from creating a consent. As usual you will monitor the FunctionOK flag (to ensure no exceptions were encountered), then take a look at the TxApproved Flag to determine your approval or declined status.

IMPORTANT: Duplicate Charges One of the most common issues we encounter is the DUPLICATE CHARGE: It is up to you to make sure the user cannot cause a stored card to get charged twice in a short period of time. Make sure your Button or other means of requesting an authorization is Immediately disabled in order to prevent the DOUBLE TAP. Merchants and Cardholders need to be protected against this nuisance. For Web Forms simply disable your button during processing and close out your session after you receive a response. In addition, you can take note of the ConsentID and amount so that you no longer process a charge for this SAME ConsentID and amount for some reasonable time period.

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 to be used for payment

Example: 21
ProcessAmountnumber · floatOptional

Amount to be processed

Example: 5
Responses
200
Successful processing of consent payment
application/json
post
POST /APIcardProcREST/v1.0.0/ConsentAnnual/ProcPayment HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 34

{
  "ConsentID": 21,
  "ProcessAmount": 5
}
200

Successful processing of consent payment

{
  "ConsentAnnual_ProcPaymentResult": {
    "AVSresult": "Y",
    "AcquirerResponseEMV": null,
    "CVVresult": "",
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "IsPartialApproval": false,
    "RequiresVoiceAuth": false,
    "RespMsg": "APPROVED 098853                 ",
    "ResponseApprovedAmount": -1,
    "ResponseAuthorizedAmount": -1,
    "ResponseBalanceAmount": -1,
    "TxApproved": true,
    "TxID": 65,
    "TxnCode": "098853"
  }
}

Process a payment using a stored card consent with an alternate merchant

post

Use this call to process a payment using a stored card. You will need the ConsentID acquired from creating a consent. As usual you will monitor the FunctionOK flag (to ensure no exceptions were encountered), then take a look at the TxApproved Flag to determine your approval or declined status.

IMPORTANT: Duplicate Charges One of the most common issues we encounter is the DUPLICATE CHARGE: It is up to you to make sure the user cannot cause a stored card to get charged twice in a short period of time. Make sure your Button or other means of requesting an authorization is Immediately disabled in order to prevent the DOUBLE TAP. Merchants and Cardholders need to be protected against this nuisance. For Web Forms simply disable your button during processing and close out your session after you receive a response. In addition, you can take note of the ConsentID and amount so that you no longer process a charge for this SAME ConsentID and amount for some reasonable time period.

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 to be used for payment

Example: 542
ProcessAmountnumber · floatOptional

Amount to be processed

Example: 1
AlternateMerchIDintegerOptional

ID of the alternate merchant

Example: 1
Responses
200
Successful processing of consent payment with alternate merchant
application/json
post
POST /APIcardProcREST/v1.0.0/ConsentAnnual/ProcPayment_Alt HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 56

{
  "ConsentID": 542,
  "ProcessAmount": 1,
  "AlternateMerchID": 1
}
200

Successful processing of consent payment with alternate merchant

{
  "ConsentAnnual_ProcPayment_AltResult": {
    "AVSresult": "Y",
    "AcquirerResponseEMV": null,
    "CVVresult": "",
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "IsPartialApproval": false,
    "RequiresVoiceAuth": false,
    "RespMsg": "APPROVAL",
    "ResponseApprovedAmount": 0,
    "ResponseAuthorizedAmount": 0,
    "ResponseBalanceAmount": 0,
    "TxApproved": true,
    "TxID": 2875,
    "TxnCode": "TAS018"
  }
}

Retrieve statistics for a specific consent

post
Body
ConsentIDintegerOptional

ID of the consent for which to retrieve statistics

Example: 10
Responses
200
Successfully retrieved consent statistics
application/json
parameters
post
POST /APIcardProcREST/v1.0.0/ConsentAnnual/Stats HTTP/1.1
Host: easypay5.com
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "ConsentID": 10
}
{
  "ConsentAnnual_StatsResult": {
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "RespMsg": "Successfully Returned Stats For Consent ID : 10",
    "Stats": {
      "FirstChargeAttempt": "2024-12-01 11:19:01",
      "ID": 10,
      "IsEnabled": false,
      "LastChargeAmount": 0,
      "LastChargeAttempt": "2024-12-01 11:19:01",
      "LastSettledAmount": 0,
      "LimitLifeTime": 100000,
      "NumChargeAttempts": 0,
      "NumFailed": 0,
      "NumFailedAttempts": 0,
      "NumOpen": 0,
      "NumSettled": 0,
      "NumTx": 0,
      "RemainingInConsent": 100000,
      "TotalDollarsOpen": 0,
      "TotalDollarsSettled": 0
    }
  }
}