Rejects a payment from being locked.
This temporarily stops the payment and keeps it in a recoverable state so that user_info can be corrected. If the payment is incorrect for reasons outside of the user_info object, use Fail payment.
After a payment has been created by an Accept quote request, the beneficiary or an intermediary can choose to reject the payment, rather than Lock payment, with corrections to user_info in the reasons array. A rejected payment moves the payment state to LOCK_DECLINED from which it can be recovered by the originating institution with a Retry accept payment request.
If any one institution in the payment chain is configured to auto-fail, the payment automatically fails when the payment is rejected, moving to the FAILED state rather than the LOCK_DECLINED state.
- Mock serverhttps://docs.ripple.com/_mock/pt-br/products/payments-odl/api-docs/ripplenet/reference/openapi/payments/{payment_id}/reject
- https://[domainPrefix].ripplexcurrent.com/v4https://[domainPrefix].ripplexcurrent.com/v4/payments/{payment_id}/reject
curl -i -X POST \
'https://docs.ripple.com/_mock/pt-br/products/payments-odl/api-docs/ripplenet/reference/openapi/payments/{payment_id}/reject' \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"reasons": {
"type": "RECEIVER_DATA_VALIDATION",
"code": "AC03",
"reason": "Creditor account number invalid or missing"
}
}'Successfully rejected the request to lock a payment.
Unique identifier of a payment.
Hash of all values in the Contract object used to ensure immutability. Once a payment transitions to the LOCKED state, the values in this object cannot change.
State of the payment. For details about payment states, see Payment States in the RippleNet Developer Guide.
Date and time at which the payment was last modified, as an ISO-8601 timestamp in UTC.
Represents all immutable parts of a payment agreed upon by all participants as a part of the Lock payment flow. Once a payment transitions to the LOCKED state, the values in this object cannot change.
Application-provided data explaining actions taken by RippleNet applications.
A Base64-encoded execution condition for this payment, the fulfillment of which will be presented to the validator to complete this payment. This value must match the execution_condition in the associated crypto transaction.
Unique identifier of the crypto transaction associated with this payment.
Address of the validator that validated the payment.
If the payment_type is RETURN, provides the payment ID of the original payment that this payment returns. Otherwise, this field value is set to null.
If the payment_type is REGULAR and the payment has an associated return payment, provides the payment ID of the return payment. Otherwise, this field value is set to null.
Represents the actual movement of funds in a payment. Each execution result corresponds to a quote element and represents its execution in a payment.
Represents the actual movement of funds in a payment as part of liquidation of a Wallet Receive payment.
Represents the movement of funds after an On-Demand Liquidity payment fails at intermediary transfer or destination exchange.
Date and time at which the payment was last accepted, as an ISO-8601 timestamp in UTC.
Date and time at which the payment was last locked, as an ISO-8601 timestamp in UTC.
Date and time at which the payment was last executed, as an ISO-8601 timestamp in UTC.
Date and time at which the payment was last completed, as an ISO-8601 timestamp in UTC.
Date and time at which the payment was returned, as an ISO-8601 timestamp in UTC.
JSON object containing information that only the RippleNet instance that set it can view. This value can be set by the sender when accepting a payment and by an intermediary or receiver when locking the payment.
{ "payment_id": "d485f100-2af7-4e48-9ab1-3c7e28775691", "contract_hash": "ccb23bd87f13cc13b9d616a9723f76e112aeac8628b2082e0f8bf3b8c670b103", "payment_state": "COMPLETED", "modified_at": "2019-10-01T18:25:47.347Z", "contract": { "sender_end_to_end_id": "string", "created_at": "2019-10-01T18:18:13.665Z", "expires_at": "2019-10-01T18:55:22.824Z", "quote": { … }, "fee_info": { … } }, "ripplenet_info": [ { … } ], "execution_condition": "PrefixSha256Condition{subtypes=[ED25519-SHA-256], type=PREFIX-SHA-256, fingerprint=sfGGHCrkyaMsLQNB62w_4zarlPChHKm47JkXVQbs1z0, cost=132360}", "crypto_transaction_id": "4e05da26-7872-4a1f-b9b7-db7604757c37", "validator": "rn.us.ca.san_francisco", "payment_type": "REGULAR", "returns_payment_with_id": "a69b322f-faa4-4531-bcff-897e5839c130", "returned_by_payment_with_id": "c929a87b-81b8-4878-b21c-1aeaa4fe9276", "execution_results": [ { … } ], "liquidation_execution_results": [ { … } ], "liquidation_details": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "string", "failure_reason": "string", "failure_count": 0 }, "push_forward_execution_results": [ { … } ], "accepted_at": "2019-10-01T18:25:47.347Z", "locked_at": "2019-10-01T18:25:47.347Z", "executed_at": "2019-10-01T18:25:47.347Z", "completed_at": "2019-10-01T18:25:47.347Z", "returned_at": "2019-10-01T18:25:47.347Z", "internal_info": { "connector_role": "RECEIVING", "labels": [ … ], "internal_id": "string" }, "user_info": [ { … } ] }