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 often in ways that break backwards compatibility.
Request Format
PUT /payments
{
"TransactionType": "Payment",
"Account": "rNQao3Z1irwRjKWSs8heL4a8WKLPKfLrXs",
"Destination": "r4FNkJtbKvCTjcE4UaeAtgpHGf8mAbeCoL",
"Amount": "20000000",
"Flags": 2147483648,
"LastLedgerSequence": 6279611,
"Fee": "12",
"Sequence": 1
}
A transaction to sign and/or submit.
Media type: application/json
Response Formats
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 |
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 . |
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. |
tx_json |
Object (Transaction Common Fields) | May be omitted | The fields that are common to all transactions. |
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+) |
account_sequence_available |
Number | May be omitted | The next Sequence Number available for the sending account after all pending and queued transactions. |
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. |
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. |
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. |
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. |
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.) |
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. |