Home

Download this help site
(PDF 80MB)

Download

Payments API V2 call 

Icon

Wild Apricot does not provide technical support for its API. If you encounter difficulties using it, add a post describing the issue to our Designers and Developers forum. Wild Apricot staff or other users may be able to suggest a solution.

You can use the Payments API call to retrieve information for a particular payment, or for multiple payments, filtered by date, contact, or event. You can also create, edit, or delete a payment.

Icon

You can use the Payments API to migrate existing payment records to your Wild Apricot database.

Retrieving information for a particular payment

Syntax

Example

Retrieving multiple payments

You can use the Payments API call to retrieve multiple payments. You must include filter criteria to narrow the results. For details, see Filtering the results (below).

The payments IDs will be listed by document date in descending order.

Syntax

Example:

Parameters

The following parameters are used within the Payments API call:

Variable

Description

{baseAPIaddress}

The base address of the API. For more information, see API access options .

{version}The version number of the API. Versions 2 and 2.1 are supported for this call. To retrieve a list of API versions, use the base API call.

{accountID}

The account identifier that appears on the Account and billing screen and is returned by the Accounts API call.

{paymentID}The unique identifier for a payment. Invoices IDs are returned by the Payments API call.
{filterCriteria}The criteria used to filter the search results. This is a required parameter. For details, see Filtering the results (below).
Icon

Each API call must include an authentication information that verifies your account and prevents others from accessing your data. For more information, see Authenticating API access from a 3rd-party server or application or Authenticating API access from a Wild Apricot site page.

Filtering the results

When retrieving information for multiple payments, you must include filter criteria. You can filter the results by specifying a contact or event, by specifying a start and/or end date, and by specifying a set of payment ids. You can combine multiple filter criteria to further narrow the results.

Specifying a contact or event

You can filter the payments by specifying a particular contact and/or event.

Syntax

Example:

Specifying a start or end document date

You can filter the payments by specifying a start date and/or an end date (using the DocumentDate field).

Syntax

where date is the start or end date of the range (using the yyyy-mm-dd date format).

Example:

Specifying a set of payment IDs 

You can filter the payments by specifying a set of payment IDs. 

Syntax 

where id is the unique identifier of a payment.

Example: 

Retrieving just payment IDs 

You can retrieve just the payment IDs that match the filter criteria by including the idsOnly parameter. This parameter is only available when you specify v2.1 as the API version. The payment IDs will be listed by document date in descending order. 

Example 

Paging

Using the $skip and $top parameters, you can retrieve records in sets or pages. You use the $top parameter to specify the maximum number of records to be returned, and the $skip parameter to specify the number of records to skip. The $skip parameter is incremented each call to return the next set or page of records. 

 

Example  

You want to retrieve 50 records using an application that can only process 20 records at a time. Using the following calls, the application retrieves the first set of 20 records, then a second set of 20, and finally, the remaining 10 records.  

In this example, the $top specifies the maximum number of records to retrieve (20), and the $skip parameter is incremented from 0 to 20 to 40 to skip the recordsretrieved by the previous call(s).

Response fields

The Payments API call retrieves the following information for each payment.

Field

Description

TenderThe method used to make the payment.
CommentAny internal notes entered for the payment.
PublicCommentAny comments entered for the payer.
AllocatedValueThe portion of the payment that is allocated to invoices.
PaymentTypeThe type of payment. Possible values: InvoicePayment, DonationPayment. When creating a new payment through the API, the payment type is always InvoicePayment.
ValueThe amount of the payment. 
DocumentDateThe date and time the payment was made.
ContactThe contact who made the payment.
CreatedDateThe date the payment was created.
CreatedByThe contact who created the payment (if manually created).
UpdatedDateThe date the payment was last updated.
UpdatedByThe contact who updated the payment.
IDThe unique identifier of the payment.
URLThe address of the URL call for the payment.

Sample JSON response

Sample XML response

Creating a new payment

You can use a Payments API call to create a payment.

Syntax

where Value and Contact are required fields, and additional instances of paymentField can be Tender, Invoices, Comment, or PublicComment. Value must be greater than zero, and will be rounded to 2 decimal places. If, when specifying multiple invoices, the payment value is not enough to cover all specified invoices, the sum will be allocated to invoices in the order in which are specified. When creating a new payment, the payment Type is always InvoicePayment. The payment date will be automatically set to the current date.

Example: payment for specific invoice

 Example: payment without specifying an invoice 

If any of the required fields are missing, or if any of the fields include invalid data, a  400 Bad Request  error will be returned. For more information, see API V2 status codes.  

Modifying a payment

You can update an existing payment using a Payments API call.

Syntax

where paymentField is a field returned by the Payments API call.

Icon

The payment ID must be specified both as a field and within the requesting URL. All other fields are optional.

Example

If successful, the call returns an HTTP status code 200 without any data in the response body.

Deleting a payment 

Syntax 

Example


On this page:   

See also:

  • No labels