3.9. /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 Статусы. Also can be viewed on UI. Please contact support managers to enable this feature.

API URLs

Примечание

Путь API URL не должен быть жёстко задан, т.к. он может быть изменён позднее.

Integration

Production

https://sandbox.payneteasy.com/paynet/api/v2/get-balance/ENDPOINTID

https://gate.payneteasy.com/paynet/api/v2/get-balance/ENDPOINTID

Request Parameters

Примечание

Request must have content-type=application/x-www-form-urlencoded and Authorization headers.

Parameter Name

Description

Value

balance-provider

Input your balance provider.

Necessity: Required
Type: String
Length: 128

Response Parameters

Примечание

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.payneteasy.com
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

HTTP method
endpoint
url
parameters
version
consumer key
consumer secret
timestamp

nonce

signature method

normalized parameters
signature base string
signature
authorization header