PayIn
A PayIn object is created from a successful checkin request.
GET a list of payins
Query a list of payins. Parameters for pagination, query condition and sort order can be used for this method, see pagination and query pages for details.
Get a list of payins example
curl /v2/payins?page=1&per_page=20&filter=&sort= -H "X-Api-Key:.." -H "Authorization:JWT .."
Successful return object:
{
"page": 1,
"per_page": 20,
"data": []
}
GET a single payins by ID
Query a payins object by ID.
Status of a PayIn object:
| Status | Description |
|---|---|
| PP | Payment Pending |
| PA | Pre-authorised |
| PC | Payment Complete |
| PD | Payment Distributed (to sellers) |
| PX | Payment Expired |
- The field modified_at can be used to tell when a status change occurred, for example, when status = "PA", the modified_at shows when pre-authorisation is done.
Get a single payins example
curl /v2/payins/1 -H "X-Api-Key:.." -H "Authorization:JWT .."
Successful return object:
{
"id": 1,
"app_id": 20,
"request_id": 2,
"buyer_id": 3,
"seller_id": 2,
"item": "product name",
"currency": "GBP",
"amount": 99,
"preauth": "",
"status": "PP",
"created_at": "",
"modified_at": ""
}
POST a payins
Create a payins entity.
| Field | Type | Description |
|---|---|---|
| app_id | int | App.ID |
| request_id | int | Request.ID |
| buyer_id | int | User.ID |
| seller_id | int | Seller ID |
| item | string | product name |
| currency | string | |
| amount | int | amount to pay in pence |
POST to create a payins:
curl -X POST -d '{"app_id":100,"request_id":11}' /v2/payins -H "X-Api-Key:.." -H "Authorization:JWT .."
Successful return:
{
"status": "OK",
"id": 123
}
PUT a payins
Update a payins entity.
Update a payins example
curl -X PUT -d '{"amount":100}' /v2/payins/1 -H "X-Api-Key:.." -H "Authorization:JWT .."
Successful return:
{
"status": "OK"
}
DELETE a payins
Delete a payins entity. Only system admin role can make this request.
Delete a payins example
curl -X DELETE /v2/payins/1 -H "X-Api-Key:.." -H "Authorization:JWT .."
Successful return:
{
"status": "OK"
}