P
P
peanutmeta2021-08-22 09:56:43
API
peanutmeta, 2021-08-22 09:56:43

Bad Request Qiwi how to fix?

Error 400, I don’t understand how to solve it, I write in GLua.

HTTP ({

    url = "https://api.qiwi.com/partner/bill/v1/bills/" .. billid ,

    method = "PUT",

    parameters = util.TableToJSON({
        billId = billid 
        amount = {
            value = "5.00",
            currency = "RUB",
        },
        expirationDateTime = "2022-12-10T09:02:00+03:00",
        comment = "test bill"
    }),

    headers = {
        ["Authorization"] ="Bearer " .. my_secret_key,
        ["Content-Type"] = "application/json",
        ["Accept"] = "application/json",
    },

    failed = function() print( "shit" ) end,
    success = function(code, body, headers ) print( code ) end,
    body = body,
    
    type = "text/plain; charset=utf-8",

})

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question