Seller
A Seller is a merchant registered on SocialPay to receive payments for their products and services.
GET a list of sellers
Query a list of sellers. 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 sellers example
curl /v2/sellers?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 sellers by ID
Query a sellers object by ID.
Get a single sellers example
curl /v2/sellers/1 -H "X-Api-Key:.." -H "Authorization:JWT .."
Successful return object:
{
"id": 12,
"xid": "1234",
"app_id": 20,
"name": "asyoulikeit",
"email": "",
"owner_id": 2,
"gateway_id": 1,
"descriptor": "statement descriptor",
"status": "A",
"created_at": ""
}
POST a sellers
Create a sellers entity. Permission: admin
| Field | Type | Description |
|---|---|---|
| xid | string | external provider's ID |
| app_id | int | App.ID |
| name | string | name of merchant |
| string | ||
| owner_id | int | User.ID |
| gateway_id | int | Gateway.ID |
| descriptor | string | bank statement descriptor |
| status | string | Active or Disabled |
| first_name | string | |
| last_name | string | |
| string | ||
| birthday | string | yyyy-mm-dd |
| country | string | country of residence like 'US' |
| nationality | string | 'US' |
| address | string | JSON text * |
- A seller is associated with a user called owner record for storing credentials.
- If the seller owner is an existing user, set owner_id to the user ID.
- For a new owner, provide the user-specific fields such as first_name to create the owner.
A seller example:
```
{% sample lang="bash" %}
POST to create a sellers:
```bash
curl -X POST -d '{"app_id":100,"name":"my-seller"}' /v2/sellers -H "X-Api-Key:.." -H "Authorization:JWT .."
Successful return:
{
"status": "OK",
"id": 123
}
PUT a sellers
Update a sellers entity.
Update a sellers example
curl -X PUT -d '{"descriptor":"makeitso"}' /v2/sellers/1 -H "X-Api-Key:.." -H "Authorization:JWT .."
Successful return:
{
"status": "OK"
}
DELETE a sellers
Delete a sellers entity. Only system admin role can make this request.
Delete a sellers example
curl -X DELETE /v2/sellers/1 -H "X-Api-Key:.." -H "Authorization:JWT .."
Successful return:
{
"status": "OK"
}