262 lines
7.9 KiB
Plaintext
262 lines
7.9 KiB
Plaintext
General Information
|
||
Information exchange with the SBP server is realized via RESTful API. All requests to the server must be executed via HTTPS using GET||POST||PUT||DELETE requests to the given ROOT address. Body of requests must be in JSON format. All not public requests must be signed by the client and the public key must be sent to the server for client identification and sign checking.
|
||
|
||
|
||
Header:
|
||
“Authorization”: {JSON WITH KEY AND PARTNERID}
|
||
|
||
|
||
Check if server is available
|
||
Client needs to periodically check if the server is available by sending “ping” to the client. On error corresponding message must be shown.
|
||
Protocol: https
|
||
Root Path: QR.VITANOVA.NETWORK
|
||
Type GET
|
||
Path /ping
|
||
Request Parameters:
|
||
{
|
||
|
||
|
||
}
|
||
Response (Error):
|
||
{
|
||
"message": "pong",
|
||
"status": "Wrong Header"
|
||
}
|
||
Response (OK):
|
||
{
|
||
"message": "pong",
|
||
"status": "Correct Header"
|
||
}
|
||
________________
|
||
|
||
|
||
Create New QR code
|
||
Create New QR for payment via SBP
|
||
Protocol: https
|
||
Root Path: QR.VITANOVA.NETWORK
|
||
Type POST
|
||
Path /qr
|
||
Request Parameters:
|
||
{
|
||
"amount": 10.00, //amount from 10Rub to 499.000 Rub
|
||
"qrDescription": "Item description",
|
||
"order": "540", //orderid at partner’s platform
|
||
"partnerID": 102 //same as in header
|
||
"Phonemask": 79xxxx66265 //User phone number mask, needed only for crypto based operations. Payment will be accepted only from phone numbers corresponding to the mask
|
||
"Namelastname": Hakxx Sargxxxx /Mask for User name, lastname in cyrilic, needed only for crypto based operations. Payment will be accepted only from the user corresponding to that mask.
|
||
}
|
||
|
||
|
||
Response !=200(Error):
|
||
{
|
||
"error": "wrong key"
|
||
}
|
||
Response =200(OK):
|
||
{
|
||
"qrId": "BD10002CI1V3JP1T8QR8TIQ8K35RBVQB",
|
||
"qrStatus": "NEW",
|
||
"qrExpirationDate": "2025-11-20T10:10:44Z",
|
||
"Payload": "https://qr.nspk.ru/BD10002CI1V3JP1T8QR8TIQ8K35RBVQB?type=02&bank=100000000007&sum=1000&cur=RUB&crc=8ACC",
|
||
"qrUrl": "https://e-commerce.raiffeisen.ru/api/sbp/v1/qr/BD10002CI1V3JP1T8QR8TIQ8K35RBVQB/image"
|
||
}
|
||
________________
|
||
|
||
|
||
Check Dynamic QR code
|
||
Check QR status
|
||
Protocol: https
|
||
Root Path: QR.VITANOVA.NETWORK
|
||
Type GET
|
||
Path /qr/dynamic/{qrId}
|
||
|
||
|
||
Request Parameters:
|
||
{
|
||
}
|
||
|
||
|
||
Response !=200(Error):
|
||
{
|
||
"error": "Error from the bank "
|
||
}
|
||
Response =200(OK):
|
||
{
|
||
`json:"nspkID"` //": "AD100060JFQF8FSB9Q28FFL88IH6SST0" `json:"amount"` // "1235"
|
||
`json:"currency" // "RUB"
|
||
`json:"order"` // "126" partner order id PaymentDetails
|
||
`json:"paymentDetails"` // "Назначение платежа 2",
|
||
`json:"qrType"` //"QRDynamic",
|
||
`json:"qrExpirationDate"` //: "2025-11-22T09:14:38+03:00" `json:"sbpBank"` // "raiffeisen"
|
||
`json:"sbpMerchant"` //"Dexar"
|
||
`json:"sbpMerchantId"` //"", uint64
|
||
`json:"sbpOperationId"` //0 Status
|
||
`json:"status"` //": "NEW", "APPROVED", "REJECTED", "COMPLETED"
|
||
`json:"nspkurl"` //"https://qr.nspk.ru/AD100060JFQF8FSB9Q28FFL88IH6SST0
|
||
`json:"statusurl"` // "https://partner.com/1234321/status" url for checking QR `json:"redirectUrl"` //"https://fastcheck.store/"
|
||
`json:"qrDescription"` //"QR для оплаты заказа"
|
||
`json:"additionalInfo"` // TTL
|
||
`json:"TTL"` //10 timeout in minutes
|
||
`json:"callbackUrl"` // https://partner.com/1234321 callback after QR get paid
|
||
`json:"retry"` //0 retry count for calling partner
|
||
`json:"partnerID"` //103 Partner created QR PartnerqrID `json:"partnerqrID"` //QR ID in partner system RequestIP
|
||
`json:"requestIP"` //IP address of client requested QR
|
||
}
|
||
________________
|
||
|
||
|
||
Check Static QR code
|
||
Get all qr-s paid by static QR for today, skipping already read qr codes
|
||
Protocol: https
|
||
Root Path: QR.VITANOVA.NETWORK
|
||
Type GET
|
||
Path /qr/static/{qrId}?skip=25
|
||
Request Parameters:
|
||
{
|
||
}
|
||
|
||
|
||
Response =200(OK):
|
||
[{
|
||
`json:"nspkID"` //": "AD100060JFQF8FSB9Q28FFL88IH6SST0" `json:"amount"` // "1235"
|
||
`json:"currency" // "RUB"
|
||
`json:"order"` // "126" partner order id PaymentDetails
|
||
`json:"paymentDetails"` // "Назначение платежа 2",
|
||
`json:"qrType"` //"QRDynamic",
|
||
`json:"qrExpirationDate"` //: "2025-11-22T09:14:38+03:00" `json:"sbpBank"` // "raiffeisen"
|
||
`json:"sbpMerchant"` //"Dexar"
|
||
`json:"sbpMerchantId"` //"", uint64
|
||
`json:"sbpOperationId"` //0 Status
|
||
`json:"status"` //": "NEW", "APPROVED", "REJECTED", "COMPLETED"
|
||
`json:"nspkurl"` //"https://qr.nspk.ru/AD100060JFQF8FSB9Q28FFL88IH6SST0
|
||
`json:"statusurl"` // "https://partner.com/1234321/status" url for checking QR `json:"redirectUrl"` //"https://fastcheck.store/"
|
||
`json:"qrDescription"` //"QR для оплаты заказа"
|
||
`json:"additionalInfo"` // TTL
|
||
`json:"TTL"` //10 timeout in minutes
|
||
`json:"callbackUrl"` // https://partner.com/1234321 callback after QR get paid
|
||
`json:"retry"` //0 retry count for calling partner
|
||
`json:"partnerID"` //103 Partner created QR PartnerqrID `json:"partnerqrID"` //QR ID in partner system RequestIP
|
||
`json:"requestIP"` //IP address of client requested QR
|
||
}]
|
||
|
||
|
||
________________
|
||
|
||
|
||
Delete QR
|
||
Delete unused QR. If QR is not paid until expiration time, it will be automatically deleted.
|
||
Protocol: https
|
||
Root Path: QR.VITANOVA.NETWORK
|
||
Type DELETE
|
||
Path /qr/{qrId}
|
||
Request Parameters:
|
||
{
|
||
}
|
||
|
||
|
||
Response !=200(Error):
|
||
{
|
||
"error": "Error from the bank "
|
||
|
||
|
||
}
|
||
Response =200(OK):
|
||
{
|
||
}
|
||
________________
|
||
Check Partner
|
||
Returns partner status, with balance and transactions. Each transaction id is QR code, which can be checked additionally.
|
||
Root Path: API.VITANOVA.NETWORK
|
||
Type Get
|
||
Path /partners/{partnerID}
|
||
Request Parameters:
|
||
{
|
||
}
|
||
Response !=200(Error):
|
||
{
|
||
"error": "Not authorized "
|
||
}
|
||
Response =200(OK):
|
||
{
|
||
"telegram_id": 8285633,
|
||
"username": "ZZZ",
|
||
"first_name": "АMAN",
|
||
"last_name": "",
|
||
"balance": 22,
|
||
"transaction": [
|
||
{
|
||
"additionalInfo": "Ручка",
|
||
"paymentPurpose": "Ручка",
|
||
"amount": 22,
|
||
"code": "SUCCESS",
|
||
"createDate": "2025-11-22T15:57:40.925104+03:00",
|
||
"currency": "RUB",
|
||
"order": "8285633735_301",
|
||
"paymentStatus": "SUCCESS",
|
||
"qrId": "AD10004C1K9N71MN907RD56UOA0BHIBR",
|
||
"transactionDate": "2025-11-22T15:58:14.814187+03:00",
|
||
"transactionId": 771515533,
|
||
"qrExpirationDate": "2025-11-22T16:12:40+03:00"
|
||
}
|
||
],
|
||
"inn": 0
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
________________
|
||
|
||
|
||
Withdraw
|
||
Get amount from balance and Creates fastcheck, which then can be for buying usdt, transferring to bank account and to bank card. Fastcheck can be checked on site or via API only by Id, but can be used only with code.
|
||
Root Path: QR.VITANOVA.NETWORK
|
||
Type POST
|
||
Path/partners/withdraw/{partnerID}
|
||
Request Parameters:
|
||
{
|
||
“amount”: 10600.00
|
||
“currency”: “RUB”
|
||
“partnerId: “1023454”
|
||
“wallet”: “TBia4uHnb3oSSZm5isP284cA7Np1v15Vhi”
|
||
“”
|
||
“rate”:79.50
|
||
}
|
||
|
||
|
||
Response !=200(Error):
|
||
{
|
||
"error": "Not enough amount on balance "
|
||
}
|
||
Response !=200(Error):
|
||
{
|
||
"error": "Rate is not correct "
|
||
}
|
||
Response =200(OK):
|
||
{
|
||
“trxID”:”T5Mv2v8n9L7jY4k1pW3QhUoZfE9R1X3s7rY6tB0pA2C4D6E8F5H”
|
||
}
|
||
________________
|
||
RATE
|
||
Get currency exchange rate.
|
||
Root Path: QR.VITANOVA.NETWORK
|
||
Type GET
|
||
Path/partners/rate
|
||
Request Parameters:
|
||
|
||
|
||
|
||
|
||
Response !=200(Error):
|
||
{
|
||
"error": "Not Authorized "
|
||
}
|
||
|
||
|
||
Response =200(OK):
|
||
|
||
|
||
{
|
||
"rate": 78.5
|
||
} |