Skip to content
GitHub

Complete an Incoming Payment

POST
/incoming-payments/{id}/complete

A client with the appropriate permissions MAY mark a non-expired incoming payment as completed indicating that the client is not going to make any further payments toward this incoming payment, even though the full incomingAmount may not have been received.

This indicates to the receiving Account Servicing Entity that it can begin any post processing of the payment such as generating account statements or notifying the account holder of the completed payment.

Authorizations

Parameters

Path Parameters

id
required
string

Sub-resource identifier

Header Parameters

Signature-Input
required

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.

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

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

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

Responses

200

OK

An incoming payment resource represents a payment that will be, is currently being, or has been received by the account.

object
id
required

The URL identifying the incoming payment.

string format: uri
walletAddress
required

The URL of the wallet address this payment is being made into.

string format: uri
completed
required

Describes whether the incoming payment has completed receiving fund.

boolean
incomingAmount

The maximum amount that should be paid into the wallet address under this incoming payment.

object
value
required

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

string format: uint64
assetCode
required

The assetCode is a code that indicates the underlying asset. This SHOULD be an ISO4217 currency code.

string
assetScale
required

The scale of amounts denoted in the corresponding asset code.

integer
<= 255
receivedAmount
required

The total amount that has been paid into the wallet address under this incoming payment.

object
value
required

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

string format: uint64
assetCode
required

The assetCode is a code that indicates the underlying asset. This SHOULD be an ISO4217 currency code.

string
assetScale
required

The scale of amounts denoted in the corresponding asset code.

integer
<= 255
expiresAt

The date and time when payments under this incoming payment will no longer be accepted.

string format: date-time
metadata

Additional metadata associated with the incoming payment. (Optional)

object
createdAt
required

The date and time when the incoming payment was created.

string format: date-time
updatedAt
required

The date and time when the incoming payment was updated.

string format: date-time
Examples
{
"id": "https://ilp.rafiki.money/incoming-payments/016da9d5-c9a4-4c80-a354-86b915a04ff8",
"walletAddress": "https://ilp.rafiki.money/alice/",
"incomingAmount": {
"value": "250",
"assetCode": "USD",
"assetScale": 2
},
"receivedAmount": {
"value": "250",
"assetCode": "USD",
"assetScale": 2
},
"completed": true,
"expiresAt": "2022-04-12T23:20:50.52Z",
"createdAt": "2022-03-12T23:20:50.52Z",
"updatedAt": "2022-04-01T10:24:36.11Z",
"metadata": {
"description": "Hi Mo, this is for the cappuccino I bought for you the other day.",
"externalRef": "Coffee w/ Mo on 10 March 2"
}
}

401

Authorization required

Headers

WWW-Authenticate
string

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

403

Forbidden

404

Incoming Payment Not Found