Sign and/or submit a payment

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

Warning: XRP-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

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

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
message String May be omitted A human-readable error message summarizing the problem(s) that occurred.
errors Array of ErrorItem May be omitted A list of errors that occurred when processing this request.

200 OK

A successful response provides the native XRP 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
engine_result_message String May be omitted Human-readable explanation of the transaction's preliminary result.
tx_blob String May be omitted The complete transaction in hex string format.
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.
engine_result_code Integer May be omitted Numeric code indicating the preliminary result of the transaction, directly correlated to engine_result.
tx_json Object (Transaction JSON) May be omitted The complete transaction in the XRP Ledger's native JSON format. If the transaction was submitted, get the transaction hash from here.
validated_ledger_index Integer May be omitted The ledger index of the latest validated ledger prior to submission. The earliest ledger index that the submitted transaction could appear in, as a result of this submission, is this value +1. Use this to bound your tx queries to find out the final status of this transaction. This is a validated ledger index because getting the latest current or closed ledger is not a guarantee—your transaction could make it into an earlier ledger index that also hasn't been validated yet.