Get payments for a contract
const url = 'https://apisandbox.puurk.com/contracts/example/payments';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apisandbox.puurk.com/contracts/example/payments \ --header 'Authorization: Bearer <token>'Returns all payments associated with a contract
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ID of the contract
Responses
Section titled “Responses”Successful operation
object
Unique identifier for the payment
Type of payment
Purpose of the payment (e.g. installment, tip, deposit)
User ID this payment belongs to
Organization ID
Location ID
Client ID this payment belongs to
Contract ID this payment is allocated to
Original contract ID if payment has been moved to a new contract
Offer ID this payment is allocated to
Plan title this payment is allocated to
Plan number this payment is allocated to
Scheduled payment ID
Method of payment
Payment account ID
Status of the payment
Payment amount
Amount refunded
Fee amount
Provider fee amount
Payout fee amount
Total amount
Premium amount
Provider premium amount
Puurk premium amount
Principal amount
Provider amount
Tip amount
Tax amount
Protection amount
Refund amount
Payment gateway used
Gateway ID
Whether payment is off session
Payment datetime
Source that created the payment (e.g. manual, checkout)
Settlement date
Date when payment was settled
Reverse settlement date
Date when payment was reverse settled
Failure code if payment failed
Failure message if payment failed
Stripe’s decline code for a declined card or a returned bank debit, when the gateway supplied one; null until the retry engine is enabled.
How Puurk classified the decline for retry purposes: insufficient_funds, do_not_honor, processor_error, expired_card, hard_decline, blocked, needs_customer_action, ach_nsf, ach_return, or platform_error; null until the retry engine is enabled.
1 for the scheduled attempt, incrementing per retry within the cycle; null until the retry engine is enabled.
ISO 8601, 00:00:00 UTC on the day of the next scheduled retry; null when none is scheduled, or until the retry engine is enabled.
Why Puurk stopped retrying, when it has: ineligible, manual, cap_reached, method_invalid, platform_error, or exhausted; null until the retry engine is enabled.
Payment memo
Related payment ID
User who created the payment
Instructions for payment allocation
Example
[ { "type": "client", "method": "ach", "status": "authorizing", "gateway": "stripe", "allocation_instructions": "leave_open" }]Unauthorized