Version 5.0
AdvertServe User Manual :: v5.0

Advertisers :: Payments API Module

Modules

Query Payments

Description

Allows you to retrieve a list of all payments that are applied to an existing advertiser.

Module URI

Hyperlink /servlet/control/api/advertisers/payments/query

Parameters

Parameter NameParameter TypeRequired?Example ValueDefault ValueValidation Rules (If Applicable)
secretStringYesa78bf24c5a23581aceba1c5f51ac4cad(None) Must be a String containing no more than 32 characters
outputStringNoxmlxml Must be a String equal to either json or xml
Parameter NameParameter TypeRequired?Example ValueDefault ValueValidation Rules (If Applicable)
advertiserIntegerYes123(None) Must be the ID# of an existing advertiser
accountStringYes1234(None) The last 4 digits of an account number associated with a payment
referenceStringYes1234(None) The reference number associated with a payment

XML Response

Hyperlink /servlet/control/api/advertisers/payments/query?secret=(key)&advertiser=123


<results>
  <payment trxnid="3" date="2017-01-25" amount="124.00" account="1234" reference="2148061801"/>
  <payment trxnid="5" date="2017-01-14" amount="128.00" account="1234" reference="2148061802"/>
  <payment trxnid="6" date="2017-01-14" amount="500.00" account="1234" reference="2148061803"/>
  <payment trxnid="1" date="2017-01-13" amount="250.00" account="1234" reference="2148061804"/>
</results>

JSON Response

Hyperlink /servlet/control/api/advertisers/payments/query?secret=(key)&output=json&advertiser=123


{
  "results": [
    {
      "trxnid": 3,
      "date": "2017-01-25",
      "amount": 124,
      "account": "1234",
      "reference": "2148061801"
    },
    {
      "trxnid": 5,
      "date": "2017-01-14",
      "amount": 128,
      "account": "1234",
      "reference": "2148061802"
    },
    {
      "trxnid": 6,
      "date": "2017-01-14",
      "amount": 500,
      "account": "1234",
      "reference": "2148061803"
    },
    {
      "trxnid": 1,
      "date": "2017-01-13",
      "amount": 250,
      "account": "1234",
      "reference": "2148061804"
    }
  ]
}

Add Payment

Description

Allows you to add a payment record to an existing advertiser.

Module URI

Hyperlink /servlet/control/api/advertisers/payments/add

Parameters

Parameter NameParameter TypeRequired?Example ValueDefault ValueValidation Rules (If Applicable)
secretStringYesa78bf24c5a23581aceba1c5f51ac4cad(None) Must be a String containing no more than 32 characters
outputStringNoxmlxml Must be a String equal to either json or xml
Parameter NameParameter TypeRequired?Example ValueDefault ValueValidation Rules (If Applicable)
advertiserIntegerYes123(None) Must be the ID# of an existing advertiser
dateDateYes2017-01-15Today Must be a Date in yyyy-MM-dd format
amountDoubleYes123.00(None) Must be a Double greater or less than, but not equal to 0.00
accountStringNo1234XXXX May optionally be a String containing the last 3 or 4 digits of the account number.
referenceStringNo2148061801(None) May optionally be a String containing no more than 32 characters, which allows saving the transaction reference number from the payment processor.

XML Response

Hyperlink /servlet/control/api/advertisers/payments/add?secret=(key)&advertiser=123&date=2017-01-15&amount=123.00


<success/>

JSON Response

Hyperlink /servlet/control/api/advertisers/payments/add?secret=(key)&output=json&advertiser=123&date=2017-01-15&amount=123.00


{ "success" : true }

Update Payment

Description

Allows you to modify the date and amount of a payment that's already applied to an existing advertiser.

Module URI

Hyperlink /servlet/control/api/advertisers/payments/update

Parameters

Parameter NameParameter TypeRequired?Example ValueDefault ValueValidation Rules (If Applicable)
secretStringYesa78bf24c5a23581aceba1c5f51ac4cad(None) Must be a String containing no more than 32 characters
outputStringNoxmlxml Must be a String equal to either json or xml
Parameter NameParameter TypeRequired?Example ValueDefault ValueValidation Rules (If Applicable)
advertiserIntegerYes123(None) Must be the ID# of an existing advertiser
trxnidIntegerYes123 Must be the transaction ID# of an existing payment
dateDateYes2017-01-15Today Must be a Date in yyyy-MM-dd format
amountDoubleYes123.00(None) Must be a Double greater or less than, but not equal to 0.00
accountStringNo1234XXXX May optionally be a String containing the last 3 or 4 digits of the account number.
referenceStringNo2148061801(None) May optionally be a String containing no more than 32 characters, which allows saving the transaction reference number from the payment processor.

XML Response

Hyperlink /servlet/control/api/advertisers/payments/update?secret=(key)&advertiser=123&trxnid=123&date=2017-01-15&amount=123.00


<success/>

JSON Response

Hyperlink /servlet/control/api/advertisers/payments/update?secret=(key)&output=json&advertiser=123&trxnid=123&date=2017-01-15&amount=123.00


{ "success" : true }

Remove Payment

Description

Allows you to remove a payment that's already applied to an existing advertiser.

Module URI

Hyperlink /servlet/control/api/advertisers/payments/remove

Parameters

Parameter NameParameter TypeRequired?Example ValueDefault ValueValidation Rules (If Applicable)
secretStringYesa78bf24c5a23581aceba1c5f51ac4cad(None) Must be a String containing no more than 32 characters
outputStringNoxmlxml Must be a String equal to either json or xml
Parameter NameParameter TypeRequired?Example ValueDefault ValueValidation Rules (If Applicable)
advertiserIntegerYes123(None) Must be the ID# of an existing advertiser
trxnidIntegerYes123 Must be the transaction ID# of an existing payment

XML Response

Hyperlink /servlet/control/api/advertisers/payments/remove?secret=(key)&advertiser=123&trxnid=123


<success/>

JSON Response

Hyperlink /servlet/control/api/advertisers/payments/remove?secret=(key)&output=json&advertiser=123&trxnid=123


{ "success" : true }