Chilkat Online Tools

PureBasic / Razorpay APIs / Issue an Invoice

Back to Collection Items

IncludeFile "CkHttp.pb"
IncludeFile "CkHttpResponse.pb"

Procedure ChilkatExample()

    ; This example assumes the Chilkat API to have been previously unlocked.
    ; See Global Unlock Sample for sample code.

    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success.i

    CkHttp::setCkBasicAuth(http, 1)
    CkHttp::setCkLogin(http, "username")
    CkHttp::setCkPassword(http, "password")

    resp.i = CkHttp::ckQuickRequest(http,"POST","https://api.razorpay.com/v1/invoices/{inv_id}/issue")
    If CkHttp::ckLastMethodSuccess(http) = 0
        Debug CkHttp::ckLastErrorText(http)
        CkHttp::ckDispose(http)
        ProcedureReturn
    EndIf

    Debug Str(CkHttpResponse::ckStatusCode(resp))
    Debug CkHttpResponse::ckBodyStr(resp)
    CkHttpResponse::ckDispose(resp)



    CkHttp::ckDispose(http)


    ProcedureReturn
EndProcedure

Curl Command

curl -X POST
	-u 'username:password'
https://api.razorpay.com/v1/invoices/{inv_id}/issue

Postman Collection Item JSON

{
  "name": "Issue an Invoice",
  "request": {
    "method": "POST",
    "header": [
    ],
    "url": {
      "raw": "https://api.razorpay.com/v1/invoices/{inv_id}/issue",
      "protocol": "https",
      "host": [
        "api",
        "razorpay",
        "com"
      ],
      "path": [
        "v1",
        "invoices",
        "{inv_id}",
        "issue"
      ]
    },
    "description": "Issue an invoice using this API.\n\nKnow more about the <a href=\"https://razorpay.com/docs/api/invoices/#issue-an-invoice\" target=\"_blank\">Issue an Invoice API</a>."
  },
  "response": [
  ]
}