Payments

get
All Payments

https://yourcompany.sport-keeper.com/api/v1/payments
Retrieve all payments
Request
Response
Path Parameters
page
optional
integer
Results are paginated.
Headers
Authorization
required
string
Auth token
200: OK
Returns an array of payments. Only the first 20 are returned. Passing the page param will paginate the results.
[
{
"id": 1,
"member_id": null,
"payment_method": "cash",
"payable_type": null,
"payable_id": null,
"created_at": "2019-01-24T17:16:35.934-05:00",
"updated_at": "2019-01-24T17:16:35.934-05:00",
"invoice_id": 1,
"sub_total_cents": 1000,
"tax_cents": 0,
"total_cents": 1000,
"transaction_id": null,
"paid": true,
"attempts": 0,
"ach_metadata": null,
"currency": null
},
{
"id": 2,
"member_id": null,
"payment_method": "card",
"payable_type": null,
"payable_id": null,
"created_at": "2019-01-25T08:46:33.915-05:00",
"updated_at": "2019-01-25T08:46:33.915-05:00",
"invoice_id": 5,
"sub_total_cents": 1000,
"tax_cents": 0,
"total_cents": 1000,
"transaction_id": "ch_1DwV0vL3HbPOywA6nlp24UQH",
"paid": true,
"attempts": 0,
"ach_metadata": null,
"currency": "USD"
}
]

get
Show Payment

https://yourcompany.sport-keeper.com/api/v1/payments/:id
Retrieve a single payment
Request
Response
Headers
Authorization
required
string
Auth token
200: OK
{
"id": 1,
"member_id": null,
"payment_method": "cash",
"payable_type": null,
"payable_id": null,
"created_at": "2019-01-24T17:16:35.934-05:00",
"updated_at": "2019-01-24T17:16:35.934-05:00",
"invoice_id": 1,
"sub_total_cents": 1000,
"tax_cents": 0,
"total_cents": 1000,
"transaction_id": null,
"paid": true,
"attempts": 0,
"ach_metadata": null,
"currency": null
}
404: Not Found
null

post
Create Payment

https://yourcompany.sport-keeper.com/v1/payments
Request
Response
Headers
Authorization
required
string
Auth Token
Form Data Parameters
paid
required
boolean
Whether or not the payment has been paid.
member_id
required
integer
ID of the member to attach the payment to.
payable_id
required
integer
The ID of the EventBooking, Membership, or Invoice.
payable_type
required
string
EventBooking, Membership, or Invoice
payment_method
required
integer
0 - card, 1 - cash, 2 - bank, 3 - credit, 4 - terminal
sub_total
required
integer
Sub total amount in cents.
tax
required
integer
Tax amount in cents.
total
required
integer
Total amount in cents.
transaction_id
optional
string
Unique id of the transaction, typically filled in by Stripe automatically.
200: OK
{
"id": 1,
"member_id": null,
"payment_method": "cash",
"payable_type": null,
"payable_id": null,
"created_at": "2019-01-24T17:16:35.934-05:00",
"updated_at": "2019-01-24T17:16:35.934-05:00",
"invoice_id": 1,
"sub_total_cents": 1000,
"tax_cents": 0,
"total_cents": 1000,
"transaction_id": null,
"paid": true,
"attempts": 0,
"ach_metadata": null,
"currency": null
}

patch
Update Payment

https://yourcompany.sport-keeper.com/v1/payments/:id
Update a single payment. All of the above properties in create payment are valid.
Request
Response
Headers
Authorization
optional
string
Auth token
200: OK
{
"id": 1,
"member_id": null,
"payment_method": "cash",
"payable_type": null,
"payable_id": null,
"created_at": "2019-01-24T17:16:35.934-05:00",
"updated_at": "2019-01-24T17:16:35.934-05:00",
"invoice_id": 1,
"sub_total_cents": 1000,
"tax_cents": 0,
"total_cents": 1000,
"transaction_id": null,
"paid": true,
"attempts": 0,
"ach_metadata": null,
"currency": null
}

delete
Delete a Payment

https://yourcompany.sport-keeper.com/v1/payments/:id
Delete a payment.
Request
Response
Headers
Authorization
required
string
Auth token.
200: OK
‚Äč