3.4. /api/v2/get-balance
Introduction
Get Balance is initiated through HTTPS POST request by using URLs and the parameters specified below. Use OAuth HMAC-SHA1 for authentication. See Statuses. Also can be viewed on UI. Please contact support managers to enable this feature.
API URLs
Integration |
Production |
---|---|
https://sandbox.gitpay.tech/paynet/api/v2/get-balance/ENDPOINTID |
https://gate.gitpay.tech/paynet/api/v2/get-balance/ENDPOINTID |
Request Parameters
Note
Request must have content-type=application/x-www-form-urlencoded and Authorization headers.
Parameter Name |
Description |
Value |
---|---|---|
balance-provider |
Input your balance provider. |
Necessity : RequiredType : StringLength : 128 |
Response Parameters
Note
Response has Content-Type: text/html;charset=utf-8 header. All fields are x-www-form-urlencoded, with (0xA) character at the end of each parameter’s value.
Response Parameters |
Description |
---|---|
balance-amount |
Current balance. |
Request Example
POST /paynet/api/v2/get-balance/ HTTP/1.1
Host: sandbox.gitpay.tech
User-Agent: curl/7.83.0
Accept: */*
Authorization: OAuth realm="",oauth_version="1.0",oauth_consumer_key="balance_test_merchant14",oauth_signature_method="HMAC-SHA1",oauth_signature="hSXMSUPP%2FIGYOOWpU4LVx0mu7SA%3D"
Content-Length: 108
Content-Type: application/x-www-form-urlencoded
Connection: close
balance-provider=Test
&oauth_consumer_key=balance_test_merchant14
&oauth_nonce=2xGTFuAgetE
&oauth_signature_method=HMAC-SHA1
&oauth_timestamp=1686923599
&oauth_version=1.0
Success Response Example
HTTP/1.1 200
Server: server
Date: Tue, 16 May 2023 08:06:05 GMT
Content-Length: 192
Connection: close
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000
Strict-Transport-Security: max-age=31536000
[
{
"balance-amount":29.99,
}
]
Fail Response Example
HTTP/1.1 200
Server: server
Date: Fri, 16 Jun 2023 13:53:43 GMT
Content-Length: 42
Connection: close
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000
Strict-Transport-Security: max-age=31536000
error-message=Unknown balance provider saa
Postman Collection
Request Builder
normalized parameters |
---|
signature base string |
---|
signature |
---|
authorization header |
---|
|