Payments
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
GET
https://wemx.app/api/v1/payments
Returns all payments made on your application
{
"status": true,
"current_page": 1,
"data": [
{
"id": "21087b8f-532c-4a83-86ce-35d5406d5932",
"user_id": 1
https://wemx.app/api/v1/payments?include=user,order,price
user
, order
, package
, price
https://wemx.app/api/v1/payments?filter[transaction_id]=test
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
https://wemx.app/api/v1/payments?sort[created_at]=asc
description
, status
, type
, currency
, amount
, options
, created_at
asc
, desc
, random
https://wemx.app/api/v1/payments?date=30days
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
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.
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
{
"success": true,
"payment": "43d5c727-df50-4826-8c33-01d4e5213fd4",
"links": [
{
"Balance": "https://wemx.app/payment/invoice/43d5c727-df50-4826-8c33-01d4e5213fd4/pay?gateway=1"
},
{
"PayPal": "https://wemx.app/payment/invoice/43d5c727-df50-4826-8c33-01d4e5213fd4/pay?gateway=2"
},
{
"Tebex": "https://wemx.app/payment/invoice/43d5c727-df50-4826-8c33-01d4e5213fd4/pay?gateway=3"
},
{
"Tebex": "https://wemx.app/payment/invoice/43d5c727-df50-4826-8c33-01d4e5213fd4/pay?gateway=4"
},
{
"stripecheckout": "https://wemx.app/payment/invoice/43d5c727-df50-4826-8c33-01d4e5213fd4/pay?gateway=7"
},
{
"Pay By Link": "https://wemx.app/payment/invoice/43d5c727-df50-4826-8c33-01d4e5213fd4/pay?gateway=9"
}
]
}