Follow

PaymentAllocations API call

You can use the PaymentAllocations API call to retrieve information describing how payments are allocated among invoices. A single payment, for example, might be allocated to multiple invoices, and multiple payments can be allocated to a single invoice.

Wild Apricot's API is intended for use by developers with technical expertise. If you need assistance, we provide support via email or through our Developers forum.

Retrieving information for a particular invoice

Syntax
GET [baseAPIaddress]/v2/Accounts/[accountID]/PaymentAllocations?invoiceId=[invoiceID]
Example:
GET https://api.wildapricot.org/v2/Accounts/58293/PaymentAllocations?invoiceId=206311

Retrieving information for a particular payment

Syntax
GET [baseAPIaddress]/v2/Accounts/[accountID]/PaymentAllocations?paymentId=[paymentID]
Example:
GET https://api.wildapricot.org/v2/Accounts/58293/PaymentAllocations?paymentId=49492

Parameters

The following parameters are used within the PaymentAllocations API call:

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

accountID
The account identifier that is returned by the Accounts API call.

invoiceID
The unique identifier for an invoice. Invoices IDs are returned by the Invoices API call.

paymentID
The unique identifier for a payment. Payment IDs are returned by the Payments API call.

Each API call must include an authentication information that verifies your account and prevents others from accessing your data. For more information, see API access options.

Response fields

The PaymentAllocations API call retrieves the following information for each payment allocation.

ID
The unique identifier of the payment allocation.

Invoice
The ID and URL of the invoice to which the payment is being allocated.

Payment
The ID and URL of the payment being allocated.

Value
The value of the payment allocation.

Sample JSON response

 [
{
"Id": 81665,
"Value": 20,
"Invoice": {
"Id": 206304,
"Url": "http://api.wildapricot.org/v2/accounts/42353/Invoices/206304"
},
"Payment": {
"Id": 206306,
"Url": "http://api.wildapricot.org/v2/accounts/42353/Payments/206306"
}
},
{
"Id": 82600,
"Value": 32.05,
"Invoice": {
"Id": 206304,
"Url": "http://api.wildapricot.org/v2/accounts/42353/Invoices/206304"
},
"Payment": {
"Id": 207311,
"Url": "http://api.wildapricot.org/v2/accounts/42353/Payments/207311"
}
}
]

Sample XML response

<ArrayOfPaymentAllocation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bonasource.MembershipFS.PublicAPI.Model.V2.Finances">
<PaymentAllocation>
<Id>81665</Id>
<Invoice xmlns:d3p1="http://api.wildapricot.org">
<d3p1:Id>206304</d3p1:Id>
<d3p1:Url>http://api.wildapricot.org/v2/accounts/42353/Invoices/206304</d3p1:Url>
</Invoice>
<Payment xmlns:d3p1="http://api.wildapricot.org">
<d3p1:Id>206306</d3p1:Id>
<d3p1:Url>http://api.wildapricot.org/v2/accounts/42353/Payments/206306</d3p1:Url>
</Payment>
<Value>20.0000</Value>
</PaymentAllocation>
<PaymentAllocation>
<Id>82600</Id>
<Invoice xmlns:d3p1="http://api.wildapricot.org">
<d3p1:Id>206304</d3p1:Id>
<d3p1:Url>http://api.wildapricot.org/v2/accounts/42353/Invoices/206304</d3p1:Url>
</Invoice>
<Payment xmlns:d3p1="http://api.wildapricot.org">
<d3p1:Id>207311</d3p1:Id>
<d3p1:Url>http://api.wildapricot.org/v2/accounts/42353/Payments/207311</d3p1:Url>
</Payment>
<Value>32.0500</Value>
</PaymentAllocation>
</ArrayOfPaymentAllocation>

0 Comments

Please sign in to leave a comment.

Search: WildApricot.com 

About results ( seconds) Sort by: 
Sorry, an error occured when performing search.