Sign and/or submit a payment

Sign a prepared payment transaction and/or submit a transaction to the XAG Ledger network. For signing, the sending account must match an account secret that the XAG-API server is configured with.

Warning: XAG-API is early alpha software. API methods and data formats are likely to change frequently in ways that break backwards compatibility.

Request Format

PUT /payments

{
    "Destination": "r4FNkJtbKvCTjcE4UaeAtgpHGf8mAbeCoL",
    "Flags": 2147483648,
    "Fee": "12",
    "LastLedgerSequence": 6279611,
    "Amount": "20000000",
    "TransactionType": "Payment",
    "Sequence": 1,
    "Account": "rNQao3Z1irwRjKWSs8heL4a8WKLPKfLrXs"
}

A transaction to sign and/or submit.

Media type: application/json

Response Formats

400 Bad Request

The request was not properly formatted.

Media type: application/json

Formatted as a RippleAPIError

The response uses the following fields:

Field Type Required? Description
errors Array of ErrorItem May be omitted A list of errors that occurred when processing this request.
message String May be omitted A human-readable error message summarizing the problem(s) that occurred.

200 OK

A successful response provides the native XAG Ledger format for the transaction, the transaction's identifying hash, and the preliminary result of processing the transaction.

Media type: application/json

Formatted as a TransactionStatus

The response uses the following fields:

Field Type Required? Description
open_ledger_cost String May be omitted The current open ledger cost before processing this transaction. Transactions with a lower cost are likely to be queued.
accepted Boolean May be omitted The value true indicates that the transaction was applied, queued, broadcast, or kept for later. The value false indicates that none of those happened, so the transaction cannot possibly succeed as long as you do not submit it again and have not already submitted it another time. (Requires rippled v1.5.0+)
queued Boolean May be omitted The value true indicates the transaction was put in the Transaction Queue, which means it is likely to be included in a future ledger version.
account_sequence_next Number May be omitted The next Sequence Number for the sending account after all transactions that have been provisionally applied, but not transactions in the queue.
engine_result_code Integer May be omitted Numeric code indicating the preliminary result of the transaction, directly correlated to engine_result.
engine_result String May be omitted Code indicating the preliminary result of the transaction, for example tesSUCCESS. Not final until included in a fully validated TransactionResult.
tx_json Object (Transaction Common Fields) May be omitted The fields that are common to all transactions.
tx_blob String May be omitted The complete transaction in hex string format.
applied Boolean May be omitted The value true indicates that this transaction was applied to the open ledger. In this case, the transaction is likely, but not guaranteed, to be validated in the next ledger version.
broadcast Boolean May be omitted The value true indicates that this transaction was applied to the open ledger. In this case, the transaction is likely, but not guaranteed, to be validated in the next ledger version.
kept Boolean May be omitted The value true indicates that the transaction was kept to be retried later.
account_sequence_available Number May be omitted The next Sequence Number available for the sending account after all pending and queued transactions.
engine_result_message String May be omitted Human-readable explanation of the transaction's preliminary result.
validated_ledger_index Integer May be omitted The ledger index of the newest validated ledger at the time of submission. This provides a lower bound on the ledger versions that the transaction can appear in as a result of this request. (The transaction could only have been validated in this ledger version or earlier if it had already been submitted before.)