Payments

get
All Payments

https://yoursite.mavenseed.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,
"customer_id": null,
"currency": "USD",
"transaction_id": "ch_EbQTtKjku1fMQJ",
"created_at": "2019-02-26T16:37:51.829-05:00",
"updated_at": "2019-02-26T16:37:51.829-05:00",
"payable_type": "Order",
"payable_id": null,
"sub_total_cents": 2995,
"tax_cents": 0,
"total_cents": 2995,
"paid": true,
"attempts": 0,
"payment_method": "stripe",
"tax_type": "no_tax",
"tax_rate": null
},
{
"id": 1744,
"customer_id": 1972,
"currency": "USD",
"transaction_id": "ch_G0HvNO6YQLdvT9",
"created_at": "2019-10-16T14:35:44.049-04:00",
"updated_at": "2019-10-16T14:35:44.049-04:00",
"payable_type": "Subscription",
"payable_id": 40,
"sub_total_cents": 2900,
"tax_cents": 0,
"total_cents": 2900,
"paid": true,
"attempts": 0,
"payment_method": "stripe",
"tax_type": "no_tax",
"tax_rate": null
}
]

get
Show Payment

https://yoursite.mavenseed.com/api/v1/payments/:id
Retrieve a single payment
Request
Response
Headers
Authorization
required
string
Auth token
200: OK
{
"id": 1745,
"customer_id": 1973,
"currency": "USD",
"transaction_id": "ch_G0JWRJXBLJ0VEF",
"created_at": "2019-10-16T16:14:47.103-04:00",
"updated_at": "2019-10-16T16:14:47.103-04:00",
"payable_type": "Subscription",
"payable_id": 41,
"sub_total_cents": 2900,
"tax_cents": 0,
"total_cents": 2900,
"paid": true,
"attempts": 0,
"payment_method": "stripe",
"tax_type": "no_tax",
"tax_rate": null
}
404: Not Found
null

post
Create Payment

https://yoursite.mavenseed.com/v1/payments
Create a payment.
Request
Response
Headers
Authorization
required
string
Auth Token
Form Data Parameters
customer_id
required
integer
ID of customer to attach the payment to
currency
required
string
Defaults to USD
transaction_id
optional
string
Typically the Stripe charge id
payable_type
required
string
Subscription, Order
payable_id
required
integer
ID of the Subscription or Order
sub_total_cents
required
integer
Sub total in cents
tax_cents
required
integer
Tax amount in cents
total_cents
required
integer
Total amount in cents
paid
required
boolean
Whether or not the payment is paid
attempts
optional
integer
Attempts made to pay this payment
payment_method
required
integer
0 - stripe, 1 - manual
tax_type
optional
string
0 - no_tax, 1 - sales, 2 - vat
tax_rate
optional
number
tax rate if tax_type is set as vat
200: OK
{
"id": 1745,
"customer_id": 1973,
"currency": "USD",
"transaction_id": "ch_G0JWRJXBLJ0VEF",
"created_at": "2019-10-16T16:14:47.103-04:00",
"updated_at": "2019-10-16T16:14:47.103-04:00",
"payable_type": "Subscription",
"payable_id": 41,
"sub_total_cents": 2900,
"tax_cents": 0,
"total_cents": 2900,
"paid": true,
"attempts": 0,
"payment_method": "stripe",
"tax_type": "no_tax",
"tax_rate": null
}

patch
Update Payment

https://yoursite.mavenseed.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": 1745,
"customer_id": 1973,
"currency": "USD",
"transaction_id": "ch_G0JWRJXBLJ0VEF",
"created_at": "2019-10-16T16:14:47.103-04:00",
"updated_at": "2019-10-16T16:14:47.103-04:00",
"payable_type": "Subscription",
"payable_id": 41,
"sub_total_cents": 2900,
"tax_cents": 0,
"total_cents": 2900,
"paid": true,
"attempts": 0,
"payment_method": "stripe",
"tax_type": "no_tax",
"tax_rate": null
}

delete
Delete a Payment

https://yoursite.mavenseed.com/v1/payments/:id
Delete a payment.
Request
Response
Headers
Authorization
required
string
Auth toke
200: OK
‚Äč