Constructors

Properties

Methods

  • Accept received Debit Note. Send Debit Note Accepted message to Debit Note Issuer. If Debit Note is binding (i.e. has non-null payment due date) trigger payment orchestration for this Debit Note using specified Allocation.

    This is a blocking operation. It will not return until the Requestor has acknowledged accepting the Invoice or timeout has passed.

    NOTE: An Accepted Debit Note cannot be Rejected later.

    Parameters

    • debitNoteId: string
    • requestBody: {
          allocationId: string;
          autoAcceptTo?: string;
          totalAmountAccepted: string;
      }
      • allocationId: string
      • Optional autoAcceptTo?: string
      • totalAmountAccepted: string
    • timeout: number = 5

      Timeout used in blocking calls waiting for eg. acknowledgement. How many seconds server should wait for response/acknowledgement of an action (0.0 means it should wait for other party's response indefinitely)

    Returns PaymentApi.CancelablePromise<any>

    any OK

    Throws

    ApiError

  • Accept received Invoice. Send Invoice Accepted message to Invoice Issuer. Trigger payment orchestration for this Invoice using specified Allocation.

    This is a blocking operation. It will not return until the Requestor has acknowledged rejecting the Invoice or timeout has passed.

    NOTE: An Accepted Invoice cannot be Rejected later.

    Parameters

    • invoiceId: string
    • requestBody: {
          allocationId: string;
          totalAmountAccepted: string;
      }
      • allocationId: string
      • totalAmountAccepted: string
    • timeout: number = 5

      Timeout used in blocking calls waiting for eg. acknowledgement. How many seconds server should wait for response/acknowledgement of an action (0.0 means it should wait for other party's response indefinitely)

    Returns PaymentApi.CancelablePromise<any>

    any OK

    Throws

    ApiError

  • Amend Allocation.

    Parameters

    • allocationId: string
    • requestBody: {
          deposit?: {
              validate?: Record<string, any>;
          };
          timeout?: string;
          totalAmount?: string;
      }
      • Optional deposit?: {
            validate?: Record<string, any>;
        }
        • Optional validate?: Record<string, any>
      • Optional timeout?: string
      • Optional totalAmount?: string

    Returns PaymentApi.CancelablePromise<{
        address?: string;
        allocationId: string;
        deposit?: {
            contract: string;
            id: string;
            validate?: Record<string, any>;
        };
        extendTimeout?: number;
        makeDeposit?: boolean;
        paymentPlatform?: string;
        remainingAmount: string;
        spentAmount: string;
        timeout?: string;
        timestamp: string;
        totalAmount: string;
    }>

    any OK

    Throws

    ApiError

  • Create Allocation. Allocate funds to make sure they are not spent elsewhere.

    Parameters

    • requestBody: {
          address?: string;
          allocationId: string;
          deposit?: {
              contract: string;
              id: string;
              validate?: Record<string, any>;
          };
          extendTimeout?: number;
          makeDeposit?: boolean;
          paymentPlatform?: string;
          remainingAmount: string;
          spentAmount: string;
          timeout?: string;
          timestamp: string;
          totalAmount: string;
      }
      • Optional address?: string
      • Readonly allocationId: string
      • Optional deposit?: {
            contract: string;
            id: string;
            validate?: Record<string, any>;
        }
        • contract: string
        • id: string
        • Optional validate?: Record<string, any>
      • Optional extendTimeout?: number

        in seconds, the time by which the allocation timeout is extended after it is last used.

      • Optional makeDeposit?: boolean
      • Optional paymentPlatform?: string
      • Readonly remainingAmount: string
      • Readonly spentAmount: string
      • Optional timeout?: string
      • Readonly timestamp: string
      • totalAmount: string
    • Optional afterTimestamp: string

      Apply only to records created later than the specified timestamp

    • maxItems: number = 10

      Maximum number of items that server should return at once.

    Returns PaymentApi.CancelablePromise<{
        address?: string;
        allocationId: string;
        deposit?: {
            contract: string;
            id: string;
            validate?: Record<string, any>;
        };
        extendTimeout?: number;
        makeDeposit?: boolean;
        paymentPlatform?: string;
        remainingAmount: string;
        spentAmount: string;
        timeout?: string;
        timestamp: string;
        totalAmount: string;
    }>

    any OK

    Throws

    ApiError

  • Get Allocation.

    Parameters

    • allocationId: string

    Returns PaymentApi.CancelablePromise<{
        address?: string;
        allocationId: string;
        deposit?: {
            contract: string;
            id: string;
            validate?: Record<string, any>;
        };
        extendTimeout?: number;
        makeDeposit?: boolean;
        paymentPlatform?: string;
        remainingAmount: string;
        spentAmount: string;
        timeout?: string;
        timestamp: string;
        totalAmount: string;
    }>

    any OK

    Throws

    ApiError

  • Get Allocations.

    Returns PaymentApi.CancelablePromise<{
        address?: string;
        allocationId: string;
        deposit?: {
            contract: string;
            id: string;
            validate?: Record<string, any>;
        };
        extendTimeout?: number;
        makeDeposit?: boolean;
        paymentPlatform?: string;
        remainingAmount: string;
        spentAmount: string;
        timeout?: string;
        timestamp: string;
        totalAmount: string;
    }[]>

    any OK

    Throws

    ApiError

  • Get Debit Note.

    Parameters

    • debitNoteId: string

    Returns PaymentApi.CancelablePromise<{
        activityId: string;
        agreementId: string;
        debitNoteId: string;
        issuerId: string;
        payeeAddr: string;
        payerAddr: string;
        paymentDueDate?: string;
        paymentPlatform: string;
        previousDebitNoteId?: string;
        recipientId: string;
        status: "ISSUED" | "RECEIVED" | "ACCEPTED" | "REJECTED" | "FAILED" | "SETTLED" | "CANCELLED";
        timestamp: string;
        totalAmountDue: string;
        usageCounterVector?: Record<string, any>;
    }>

    any OK

    Throws

    ApiError

  • Get Debit Note events. Listen for Debit Note-related events using long-polling. If there are any events the method will return them immediately. If there are none the method will wait until one appears or timeout passes. afterTimestamp parameter can be used in order to get just the 'new' events. Setting the parameter value to the timestamp of the last processed event ensures that no events will go unnoticed.

    NOTE: The events are persistent, ie. calling the API does not remove the event records from receiving queue.

    Parameters

    • timeout: number = 5

      Timeout used in long-polling calls (in seconds). How many seconds server should wait for response containing new events (0.0 means it should return immediately if there are no events)

    • Optional afterTimestamp: string

      Apply only to records created later than the specified timestamp

    • maxEvents: number = 10

      Maximum number of events that server should return at once.

    • Optional appSessionId: string

      A correlation/session identifier used for querying events related to an action where this appSessionId has been specified

    Returns PaymentApi.CancelablePromise<{
        debitNoteId: string;
        eventDate: string;
        eventType: string;
    }[]>

    any OK

    Throws

    ApiError

  • Get Debit Notes known by this node (either issued by this Provider or received by this Requestor).

    Parameters

    • Optional afterTimestamp: string

      Apply only to records created later than the specified timestamp

    • maxItems: number = 10

      Maximum number of items that server should return at once.

    Returns PaymentApi.CancelablePromise<{
        activityId: string;
        agreementId: string;
        debitNoteId: string;
        issuerId: string;
        payeeAddr: string;
        payerAddr: string;
        paymentDueDate?: string;
        paymentPlatform: string;
        previousDebitNoteId?: string;
        recipientId: string;
        status: "ISSUED" | "RECEIVED" | "ACCEPTED" | "REJECTED" | "FAILED" | "SETTLED" | "CANCELLED";
        timestamp: string;
        totalAmountDue: string;
        usageCounterVector?: Record<string, any>;
    }[]>

    any OK

    Throws

    ApiError

  • Obtain Demand elements specific to the given allocations, to be appended to a market Demand. Generate payment-related properties and constraints to be added to a demand published on the marketplace. As a parameter it accepts a list of IDs of allocations to be used to pay for invoices resulting from the decorated demand.

    Parameters

    • allocationIds: string[]

    Returns PaymentApi.CancelablePromise<{
        constraints: string[];
        properties: {
            key: string;
            value: string;
        }[];
    }>

    any OK

    Throws

    ApiError

  • Get Invoice.

    Parameters

    • invoiceId: string

    Returns PaymentApi.CancelablePromise<{
        activityIds?: string[];
        agreementId: string;
        amount: string;
        invoiceId: string;
        issuerId: string;
        payeeAddr: string;
        payerAddr: string;
        paymentDueDate: string;
        paymentPlatform: string;
        recipientId: string;
        status: "ISSUED" | "RECEIVED" | "ACCEPTED" | "REJECTED" | "FAILED" | "SETTLED" | "CANCELLED";
        timestamp: string;
    }>

    any OK

    Throws

    ApiError

  • Get Invoice events. Listen for Invoice-related events using long-polling. If there are any events the method will return them immediately. If there are none the method will wait until one appears or timeout passes. afterTimestamp parameter can be used in order to get just the 'new' events. Setting the parameter value to the timestamp of the last processed event ensures that no events will go unnoticed.

    NOTE: The events are persistent, ie. calling the API does not remove the event records from receiving queue.

    Parameters

    • timeout: number = 5

      Timeout used in long-polling calls (in seconds). How many seconds server should wait for response containing new events (0.0 means it should return immediately if there are no events)

    • Optional afterTimestamp: string

      Apply only to records created later than the specified timestamp

    • maxEvents: number = 10

      Maximum number of events that server should return at once.

    • Optional appSessionId: string

      A correlation/session identifier used for querying events related to an action where this appSessionId has been specified

    Returns PaymentApi.CancelablePromise<{
        eventDate: string;
        eventType: string;
        invoiceId: string;
    }[]>

    any OK

    Throws

    ApiError

  • Get Invoices known to this node (either issued by this Provider or received by this Requestor).

    Parameters

    • Optional afterTimestamp: string

      Apply only to records created later than the specified timestamp

    • maxItems: number = 10

      Maximum number of items that server should return at once.

    Returns PaymentApi.CancelablePromise<{
        activityIds?: string[];
        agreementId: string;
        amount: string;
        invoiceId: string;
        issuerId: string;
        payeeAddr: string;
        payerAddr: string;
        paymentDueDate: string;
        paymentPlatform: string;
        recipientId: string;
        status: "ISSUED" | "RECEIVED" | "ACCEPTED" | "REJECTED" | "FAILED" | "SETTLED" | "CANCELLED";
        timestamp: string;
    }[]>

    any OK

    Throws

    ApiError

  • Get Payment.

    Parameters

    • paymentId: string

    Returns PaymentApi.CancelablePromise<{
        activityPayments: {
            activityId: string;
            allocationId?: string;
            amount: string;
        }[];
        agreementPayments: {
            agreementId: string;
            allocationId?: string;
            amount: string;
        }[];
        amount: string;
        details: string;
        payeeAddr: string;
        payeeId: string;
        payerAddr: string;
        payerId: string;
        paymentId: string;
        paymentPlatform: string;
        timestamp: string;
    }>

    any OK

    Throws

    ApiError

  • Get Payments. Payments can be treated as events and this method can be used to listen for new payments by long-polling. If there are any payments the method will return them immediately. If there are none the method will wait until one appears or timeout passes. afterTimestamp parameter can be used in order to get just the 'new' payments. Setting the parameter value to the timestamp of the last processed payment ensures that no payments will go unnoticed. network and driver parameters can be used in order to filter payments.

    Parameters

    • timeout: number = 5

      Timeout used in long-polling calls (in seconds). How many seconds server should wait for response containing new events (0.0 means it should return immediately if there are no events)

    • Optional afterTimestamp: string

      Apply only to records created later than the specified timestamp

    • maxEvents: number = 10

      Maximum number of events that server should return at once.

    • Optional appSessionId: string

      A correlation/session identifier used for querying events related to an action where this appSessionId has been specified

    • Optional network: string

      Network identifier used for filtering payments made via the specified network

    • Optional driver: string

      Driver identifier used for filtering payments made with the selected driver

    Returns PaymentApi.CancelablePromise<{
        activityPayments: {
            activityId: string;
            allocationId?: string;
            amount: string;
        }[];
        agreementPayments: {
            agreementId: string;
            allocationId?: string;
            amount: string;
        }[];
        amount: string;
        details: string;
        payeeAddr: string;
        payeeId: string;
        payerAddr: string;
        payerId: string;
        paymentId: string;
        paymentPlatform: string;
        timestamp: string;
    }[]>

    any OK

    Throws

    ApiError

  • Parameters

    • debitNoteId: string
    • Optional afterTimestamp: string

      Apply only to records created later than the specified timestamp

    • maxItems: number = 10

      Maximum number of items that server should return at once.

    Returns PaymentApi.CancelablePromise<{
        activityPayments: {
            activityId: string;
            allocationId?: string;
            amount: string;
        }[];
        agreementPayments: {
            agreementId: string;
            allocationId?: string;
            amount: string;
        }[];
        amount: string;
        details: string;
        payeeAddr: string;
        payeeId: string;
        payerAddr: string;
        payerId: string;
        paymentId: string;
        paymentPlatform: string;
        timestamp: string;
    }[]>

    any OK

    Deprecated

    Get Payments for Debit Note. WARNING: Operation not implemented.

    Throws

    ApiError

  • Parameters

    • invoiceId: string
    • Optional afterTimestamp: string

      Apply only to records created later than the specified timestamp

    • maxItems: number = 10

      Maximum number of items that server should return at once.

    Returns PaymentApi.CancelablePromise<{
        activityPayments: {
            activityId: string;
            allocationId?: string;
            amount: string;
        }[];
        agreementPayments: {
            agreementId: string;
            allocationId?: string;
            amount: string;
        }[];
        amount: string;
        details: string;
        payeeAddr: string;
        payeeId: string;
        payerAddr: string;
        payerId: string;
        paymentId: string;
        paymentPlatform: string;
        timestamp: string;
    }[]>

    any OK

    Deprecated

    Get Payments for Invoice. WARNING: Operation not implemented.

    Throws

    ApiError

  • Get available accounts for sending payments.

    Returns PaymentApi.CancelablePromise<{
        address: string;
        driver: string;
        network: string;
        platform: string;
        receive: boolean;
        send: boolean;
        token: string;
    }[]>

    any OK

    Throws

    ApiError

  • Issue an Invoice.

    Parameters

    • requestBody: {
          activityIds?: string[];
          agreementId: string;
          amount: string;
          invoiceId: string;
          issuerId: string;
          payeeAddr: string;
          payerAddr: string;
          paymentDueDate: string;
          paymentPlatform: string;
          recipientId: string;
          status: "ISSUED" | "RECEIVED" | "ACCEPTED" | "REJECTED" | "FAILED" | "SETTLED" | "CANCELLED";
          timestamp: string;
      }
      • Optional activityIds?: string[]
      • agreementId: string
      • amount: string
      • Readonly invoiceId: string
      • Readonly issuerId: string
      • Readonly payeeAddr: string
      • Readonly payerAddr: string
      • paymentDueDate: string
      • Readonly paymentPlatform: string
      • Readonly recipientId: string
      • Readonly status: "ISSUED" | "RECEIVED" | "ACCEPTED" | "REJECTED" | "FAILED" | "SETTLED" | "CANCELLED"

        Accepted status indicates that the Requestor confirms the Amount/Total Amount Due on the Invoice/Debit Note, respectively. The Payment API Implementation is expected to proceed with the orchestration of the payment. Internals of the payment processing (e.g. payment processing internal states) are specific to the selected Payment Platform, and must be indicated as an attribute of the Accepted status. However, as they are specific - they shall not be standardized by the Payment API.

        A Rejected Invoice/Debit Note can subsequently be Accepted.

        An Accepted Invoice/Debit Note cannot be subsequently Rejected.

        There is a difference between Paid and Settled - depending on a Payment Platform. Paid indicates that the Requestor has ordered Payments of Total Amount Due as indicated by received/accepted Debit Notes/Invoice. Settled indicates that the Provider has reliably received the Payments.

        WARNING: 'Paid' status currently not implemented.

      • Readonly timestamp: string

    Returns PaymentApi.CancelablePromise<{
        activityIds?: string[];
        agreementId: string;
        amount: string;
        invoiceId: string;
        issuerId: string;
        payeeAddr: string;
        payerAddr: string;
        paymentDueDate: string;
        paymentPlatform: string;
        recipientId: string;
        status: "ISSUED" | "RECEIVED" | "ACCEPTED" | "REJECTED" | "FAILED" | "SETTLED" | "CANCELLED";
        timestamp: string;
    }>

    any OK

    Throws

    ApiError

  • Get status of the payment driver This only relates to the erc20 driver, not erc20legacy. The returned list contains individual status properties, which can be used to identify problems like missing funds or misconfigured max fee per gas on a per-chain (network) basis.

    Parameters

    • Optional network: string

      Network identifier used for filtering payments made via the specified network

    • Optional driver: string

      Driver identifier used for filtering payments made with the selected driver

    Returns PaymentApi.CancelablePromise<{
        address?: string;
        chainId?: number;
        driver: string;
        kind: "InsufficientGas" | "InsufficientToken" | "InvalidChainId" | "CantSign" | "TxStuck" | "RpcError";
        neededGasEst?: string;
        neededTokenEst?: string;
        network?: string;
    }[]>

    any OK

    Throws

    ApiError

  • Reject received Debit Note. WARNING: Operation not implemented.

    Send Debit Note Rejected message to Invoice Issuer. Notification of rejection is signalling that Requestor does not accept the Debit Note (for some reason).

    This is a blocking operation. It will not return until the Requestor has acknowledged rejecting the Invoice or timeout has passed.

    NOTE: A Rejected Debit Note can be Accepted subsequently (e.g. as a result of some arbitrage).

    Parameters

    • debitNoteId: string
    • requestBody: {
          message?: string;
          rejectionReason: "UNSOLICITED_SERVICE" | "BAD_SERVICE" | "INCORRECT_AMOUNT";
          totalAmountAccepted: string;
      }
      • Optional message?: string
      • rejectionReason: "UNSOLICITED_SERVICE" | "BAD_SERVICE" | "INCORRECT_AMOUNT"

        Possible reasons to reject a Debit Note or Invoice.

      • totalAmountAccepted: string
    • timeout: number = 5

      Timeout used in blocking calls waiting for eg. acknowledgement. How many seconds server should wait for response/acknowledgement of an action (0.0 means it should wait for other party's response indefinitely)

    Returns PaymentApi.CancelablePromise<any>

    any OK

    Throws

    ApiError

  • Reject received Invoice. WARNING: Operation not implemented.

    Send Invoice Rejected message to Invoice Issuer. Notification of rejection is signalling that Requestor does not accept Invoice (for some reason).

    This is a blocking operation. It will not return until the Requestor has acknowledged rejecting the Invoice or timeout has passed.

    NOTE: A Rejected Invoice can be Accepted subsequently (e.g. as a result of some arbitrage).

    Parameters

    • invoiceId: string
    • requestBody: {
          message?: string;
          rejectionReason: "UNSOLICITED_SERVICE" | "BAD_SERVICE" | "INCORRECT_AMOUNT";
          totalAmountAccepted: string;
      }
      • Optional message?: string
      • rejectionReason: "UNSOLICITED_SERVICE" | "BAD_SERVICE" | "INCORRECT_AMOUNT"

        Possible reasons to reject a Debit Note or Invoice.

      • totalAmountAccepted: string
    • timeout: number = 5

      Timeout used in blocking calls waiting for eg. acknowledgement. How many seconds server should wait for response/acknowledgement of an action (0.0 means it should wait for other party's response indefinitely)

    Returns PaymentApi.CancelablePromise<any>

    any OK

    Throws

    ApiError

  • Release Allocation. The Allocation of amount is released. Note that this operation releases currently allocated amount (which may have been reduced by subsequent Invoice Payments).

    WARNING: Deposits not implemented.

    If the Allocation was connected with a Deposit the release amount from Deposit shall be marked as pending to be paid back to Requestor - and eventually will be paid back, unless a subsequent Allocation with Deposit is made. The Payment Platform implementations may optimize unnecessary fund transfers (i.e. will not pay back the Deposit if released funds can be assigned to a new Allocation with Deposit).

    Parameters

    • allocationId: string

    Returns PaymentApi.CancelablePromise<any>

    any OK

    Throws

    ApiError