Create a new outgoing payment at the payment pointer.

An outgoing payment and will transition through various states until it is either completed, expired or failed.

27842784

State transitions for an outgoing payment

Validation and Quoting

By default a new outgoing payment will have the state of pending while the sending account provider validates it. This includes verifying the receiving account and establishing the costs and exchange rate that will apply.

When the sending account provider is ready to begin sending the payment it MUST change the state to prepared and set the values of any amounts and the expiresAt property as described below.

If there is an error preparing the payment then it MUST change the state to failed.

Authorization

A client with permission to authorize an outgoing payment can do so by either creating it with the authorized property set to true or by updating it and setting authorized to true.

As soon as the outgoing payment has a state of prepared AND authorized is true the sending account provider MUST update the state to processing and then attempt to execute the payment.

Amounts

An outgoing payment MUST is either a fixed-send-amount or a fixed-receive-amount payment.

A fixed-send-amount payment is created when the client specifies a value for the sendAmount. A client MUST NOT specify a value for the receiveAmount in a fixed-send-amount payment. When the sending account provider has finished preparing the payment it will set the value of the receiveAmount and set a value for the expiresAt property.

A client MAY update the sendAmount value of fixed-send-amount payment that has a state of pending or prepared. The sending account provider MUST recalculate and update the values of the receiveAmount and expiresAt properties.

A fixed-receive-amount payment is created when the client specifies a value for the receiveAmount. A client MUST NOT specify a value for the sendAmount in a fixed-receive-amount payment. When the sending account provider has finished preparing the payment it will set the value of the sendAmount and set a value for the expiresAt property.

A fixed-receive-amount payment can also be created when the client specifies a value for the receivingPayment and the
value is the URL of an incoming payment that can be accessed by the sending account provider and has a value for incomingAmount. In this case the receiveAmount value MUST be set by the provider to the same value as the incomingAmount value of the incoming payment and the sendAmount and expiresAt values are calculated as if the client had specified that receiveAmount.

A client MAY update the receiveAmount value of fixed-receive-amount payment that has a state of pending or prepared. The sending account provider MUST recalculate and update the values of the sendAmount and expiresAt properties.

Expiry

The sending account provider MUST update the state to expired when its local system time exceeds the value of expiresAt.

Finality

When the sending account provider has finished executing the payment it MUST set the state to completed.

No updates are allowed to an outgoing payment with a state of either processing, completed, expired or failed.

Language
Authentication
Header
URL
Click Try It! to start a request and see the response here!