Create a Donation [POST]
Requirements
ℹ️ Before launching a donation, you need to have a Merchant created, as each payment will be related to a Merchant (merchant_id
).
Create a Donation
Create a donation request by sending simply the amount
to charge, the description
(optional) and the payment_type
(Bank or Crypto). For now, Sylq only supports EUR
or GBP
for bank payments. If you would like to use Sylq with other currencies please get in touch.
Endpoints
Staging environment
- Staging URL:
https://staging.sylq.io/api/v1/donations
Production/Live environment
- Production/Live URL:
https://app.sylq.io/api/v1/donations
Schema
{
"amount": 0,
"merchant_id": 0,
"crypto_currency": 0,
"platform_id": 0
}
Examples of returns
Success response (201)
{
"reference": "EFKV2RBEQU",
"amount": 100.5,
"underpaid_amount": "0.0000003835",
"currency": "EUR",
"payment_info": {
"payment_amount": "0.00628435",
"payment_amount_currency": "BTC",
"payment_amount_platform": "Bitcoin",
"payment_amount_address": "3Kp4qC4oUqnvuNPwxCdgYtEFgh6p7L7Zeb",
"payment_amount_memo": null
},
"status": "pending",
"merchant_id": 1,
"created_at": "2022-12-01T12:40:17.494Z"
}
Error response (422)
{
"errors": {
"crypto_currency": [
"is required"
],
"platform_id": [
"is required"
],
"merchant_id": [
"is required"
]
}
Retrieves a Donation [GET]
Endpoints
Staging environment
- Staging URL:
https://staging.sylq.io/api/v1/donations/{reference}
Production/Live environment
- Production/Live URL:
https://app.sylq.io/api/v1/donations/{reference}
Examples of returns
Success response (201)
{
"reference": "AITITOBD1Z",
"amount": 120.98,
"underpaid_amount": 0,
"currency": "EUR",
"payment_info": {
"payment_amount": null,
"payment_amount_currency": null,
"payment_amount_platform": null,
"payment_amount_address": null,
"payment_amount_memo": null
},
"status": "confirmed",
"merchant_id": 1,
"created_at": "2022-12-01T12:40:24.140Z"
}
Error response (422)
{
"errors": "Not found"
}
Validating a Crypto Donation
You can validate the crypto payment once the payment is launched, in the response among other values, you will see the checkout_url
and the QR code in image format qr_image
.
For the Crypto case, the Staging environment is connected to Blockchains on Production environments, which is why you will be able to make real payments with BTC, ETH, USDT, etc... the minimum is €0.10.
If you want to see an entire payment process with Crypto, here is an example.