Payments
Get all payments
GET
https://wemx.app/api/v1/payments
Returns all payments made on your application
Available Relationships (optional)
Available relationships:
user
, order
, package
, price
Filters (optional)
Available Filters:
id
, payment_id
, price_id
, order_id
, user_id
, status
, type
, currency
, amount
, transaction_id
, gateway
, data
, options
Tip: To filter JSON columns such as gateway, data and options, you can specify the key using
?filter[gateway->driver]=PayPal
Sorting (optional)
Available Sorting Parameters:
description
, status
, type
, currency
, amount
, options
, created_at
Sorting operators
asc
, desc
, random
Dates (optional)
today
Get payments created today
yesterday
Get payments created yesterday
3days
, 7days
, 14days
, 30days
, 90days
Get payments created last x days
YYYY-MM-DD,YYY-MM-DD
Get payments created between a range of dates
Generate a payment
POST
https://wemx.app/api/v1/payments/generate
Generate a payment on your application and redirect the user to pay it
If the payment is generated successfully, the API responds with a list of links in the links object for each gateway that the user can use to directly pay the payment. You can display these links for the user to choose a gateway.
Request Body
user_id*
Numeric
ID of the user for which you want to create payment
description*
String
Short description of the payment
amount*
Numeric
The amount for the payment
data
Array
Pass custom data as an array
notes
String
Write a note about the payment
show_as_invoice
Boolean
Show the payment as an invoice on the application
Last updated
Was this helpful?