Ir al contenido
GitHub

Get spent amounts for current outgoing payment grant

GET
/outgoing-payment-grant

Returns the spent amounts for the current outgoing payment grant corresponding to the presented GNAP access token, if any. If a grant was created with an interval (recurring), the amounts returned are for the current interval.

Signature-Input
required
string

The Signature-Input field is a Dictionary structured field containing the metadata for one or more message signatures generated from components within the HTTP message. Each member describes a single message signature. The member’s key is the label that uniquely identifies the message signature within the context of the HTTP message. The member’s value is the serialization of the covered components Inner List plus all signature metadata parameters identified by the label. The following components MUST be included: - “@method” - “@target-uri” - “authorization”. When the message contains a request body, the covered components MUST also include the following: - “content-digest” The keyid parameter of the signature MUST be set to the kid value of the JWK. See ietf-httpbis-message-signatures for more details.

Signature
required
string

The signature generated based on the Signature-Input, using the signing algorithm specified in the “alg” field of the JWK.

OK

object
spentReceiveAmount
amount
object
value
required

The value is an unsigned 64-bit integer amount, represented as a string.

string format: uint64
assetCode
required
Asset code

The assetCode is a code that indicates the underlying asset. An ISO4217 currency code should be used whenever possible. The ISO4217 representation of the US Dollar is USD.

string
assetScale
required
Asset scale

The number of decimal places that defines the scale of the smallest divisible unit for the given asset code. It determines how an integer amount is scaled to derive the actual monetary value. For example, USD has an asset scale of 2 with the smallest unit being 0.01. An integer amount of 1000 with an assetCode of USD and assetScale of 2 translates to $10.00.

integer
<= 255
spentDebitAmount
amount
object
value
required

The value is an unsigned 64-bit integer amount, represented as a string.

string format: uint64
assetCode
required
Asset code

The assetCode is a code that indicates the underlying asset. An ISO4217 currency code should be used whenever possible. The ISO4217 representation of the US Dollar is USD.

string
assetScale
required
Asset scale

The number of decimal places that defines the scale of the smallest divisible unit for the given asset code. It determines how an integer amount is scaled to derive the actual monetary value. For example, USD has an asset scale of 2 with the smallest unit being 0.01. An integer amount of 1000 with an assetCode of USD and assetScale of 2 translates to $10.00.

integer
<= 255
Examples
{
"spentReceiveAmount": {
"value": "2500",
"assetCode": "USD",
"assetScale": 2
},
"spentDebitAmount": {
"value": "2600",
"assetCode": "USD",
"assetScale": 2
}
}

Authorization required

object
error
required
object
code
required
string
description
required
string
details

Additional details about the error.

object
key
additional properties
any
Examples
{
"error": {
"code": "invalid_request",
"description": "Error description",
"details": {
"anyKey": "anyValue"
}
}
}
WWW-Authenticate
string

The address of the authorization server for grant requests in the format GNAP as_uri=<URI>

Forbidden

object
error
required
object
code
required
string
description
required
string
details

Additional details about the error.

object
key
additional properties
any
Examples
{
"error": {
"code": "invalid_request",
"description": "Error description",
"details": {
"anyKey": "anyValue"
}
}
}