XRP Ledger Dev Portalをさまざまな言語で提供するよう取り組んでいますが、すべてのページがすべての言語で提供されているわけではありません。ご協力いただける場合は、ぜひ貢献をお願いいたします
Create, sign, and submit a payment
Create and a payment transaction, and submit it to the XRP Ledger network. The sending account must match an account address and secret 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
POST /payments
{
"submit": true,
"payment": {
"source_address": "rBEXjfD3MuXKATePRwrk4AqgqzuD9JjQqv",
"source_tag": 123,
"source_amount": {
"value": "5000000",
"currency": "drops"
},
"destination_address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"destination_tag": 456,
"destination_amount": {
"value": "5000000",
"currency": "drops"
}
}
}
A transaction object and instructions.
Media type: application/json
Formatted as a Payment object and instructions
The request uses the following fields:
Field | Type | Required? | Description |
---|---|---|---|
payment |
Object (Payment Object) | May be omitted | A payment object (specification). |
instructions |
Object (Transaction Instructions) | May be omitted | Indicates how to execute a transaction. Complements the transaction specification. |
submit |
Boolean | May be omitted | If false , the server will not submit the transaction to the network. Instead, it will only return the following additional fields in the response: tx_json , tx_blob , and id (hash). |
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. |