๐ณ Payment API Documentation
๐ Authorizationโ
All API requests must include the following body:
public_key: <Website Public Key>
Base Url
https://api.listopays.com
๐งพ Create a Paymentโ
POST payments
Requestโ
{
"customer": "9e4d09cb-2913-4020-a0b5-a905dcc9f35c",
"order": "Something about order",
"amount": 128,
"public_key": <Website Public Key>
}
Responseโ
{
"success": true,
"error": null,
"data": {
"url": "https://pay.listopays.com/payment/0MvVe7YnAEnoXJIaboADpF4rocb2AknJ"
}
}
โฉ๏ธ Refund a Paymentโ
POST payment/{payment_token}/refund
Requestโ
{
"public_key": <Website Public Key>
}
Responseโ
{
"success": true
}
๐ค Create a Customerโ
POST customers
Requestโ
{
"name": "John",
"email": "[email protected]",
"public_key": <Website Public Key>
}
Responseโ
{
"success": true,
"data": {
"uuid": "2dcace1d-2846-4242-8596-0ebfbd1a8379"
}
}
๐ฅ Get All Customersโ
GET customers
Requestโ
{
"public_key": <Website Public Key>
}
Responseโ
{
"success": true,
"data": [
{
"uuid": "2dcace1d-2846-4242-8596-0ebfbd1a8379",
"name": "John",
"email": "[email protected]"
}
]
}
Customer Chargeโ
POST charge
Requestโ
{
"customer": "9e4d09cb-2913-4020-a0b5-a905dcc9f35c",
"order": "Something about order",
"amount": 128,
"public_key": <Website Public Key>
}
Responseโ
{
"success": true,
"error": null,
"data": null
}
โน๏ธ Notesโ
- All responses contain a
successfield indicating operation result. - On error, an
errorfield may be included with the description. - All requests require a valid
X-PUBLIC-KEYheader.