Create an Outgoing Payment
POST /outgoing-payments
An outgoing payment is a sub-resource of a wallet address. It represents a payment from the wallet address.
Once created, it is already authorized and SHOULD be processed immediately. If payment fails, the Account Servicing Entity must mark the outgoing payment as failed
.
Authorizations
Parameters
Header Parameters
The Signature-Input field is a Dictionary structured field containing the metadata for one or more message signatures generated from components within the HTTP message. Each member describes a single message signature. The member’s key is the label that uniquely identifies the message signature within the context of the HTTP message. The member’s value is the serialization of the covered components Inner List plus all signature metadata parameters identified by the label. The following components MUST be included: - “@method” - “@target-uri” - “authorization”. When the message contains a request body, the covered components MUST also include the following: - “content-digest” The keyid parameter of the signature MUST be set to the kid value of the JWK. See ietf-httpbis-message-signatures for more details.
The Signature-Input field is a Dictionary structured field containing the metadata for one or more message signatures generated from components within the HTTP message. Each member describes a single message signature. The member’s key is the label that uniquely identifies the message signature within the context of the HTTP message. The member’s value is the serialization of the covered components Inner List plus all signature metadata parameters identified by the label. The following components MUST be included: - “@method” - “@target-uri” - “authorization”. When the message contains a request body, the covered components MUST also include the following: - “content-digest” The keyid parameter of the signature MUST be set to the kid value of the JWK. See ietf-httpbis-message-signatures for more details.
The signature generated based on the Signature-Input, using the signing algorithm specified in the “alg” field of the JWK.
The signature generated based on the Signature-Input, using the signing algorithm specified in the “alg” field of the JWK.
Request Body required
A subset of the outgoing payments schema is accepted as input to create a new outgoing payment.
The debitAmount
must use the same assetCode
and assetScale
as the wallet address.
Either provide a quoteId
to create an outgoing payment based on a quote or provide incomingPayment
and debitAmount
to create an outgoing payment directly from an incoming payment.
object
URL of a wallet address hosted by a Rafiki instance.
The URL of the quote defining this payment’s amounts.
Additional metadata associated with the outgoing payment. (Optional)
object
object
URL of a wallet address hosted by a Rafiki instance.
The URL of the incoming payment this outgoing payment will fulfill.
The fixed amount that would be sent from the sending wallet address given a successful outgoing payment.
object
The value is an unsigned 64-bit integer amount, represented as a string.
The assetCode is a code that indicates the underlying asset. This SHOULD be an ISO4217 currency code.
The scale of amounts denoted in the corresponding asset code.
Additional metadata associated with the outgoing payment. (Optional)
object
Examples
Responses
201
Outgoing Payment Created
An outgoing payment resource represents a payment that will be, is currently being, or has previously been, sent from the wallet address.
object
The URL identifying the outgoing payment.
The URL of the wallet address from which this payment is sent.
The URL of the quote defining this payment’s amounts.
Describes whether the payment failed to send its full amount.
The URL of the incoming payment that is being paid.
The total amount that should be received by the receiver when this outgoing payment has been paid.
object
The value is an unsigned 64-bit integer amount, represented as a string.
The assetCode is a code that indicates the underlying asset. This SHOULD be an ISO4217 currency code.
The scale of amounts denoted in the corresponding asset code.
The total amount that should be deducted from the sender’s account when this outgoing payment has been paid.
object
The value is an unsigned 64-bit integer amount, represented as a string.
The assetCode is a code that indicates the underlying asset. This SHOULD be an ISO4217 currency code.
The scale of amounts denoted in the corresponding asset code.
The total amount that has been sent under this outgoing payment.
object
The value is an unsigned 64-bit integer amount, represented as a string.
The assetCode is a code that indicates the underlying asset. This SHOULD be an ISO4217 currency code.
The scale of amounts denoted in the corresponding asset code.
The total amount successfully deducted from the sender’s account using the current outgoing payment grant.
object
The value is an unsigned 64-bit integer amount, represented as a string.
The assetCode is a code that indicates the underlying asset. This SHOULD be an ISO4217 currency code.
The scale of amounts denoted in the corresponding asset code.
The total amount successfully received (by all receivers) using the current outgoing payment grant.
object
The value is an unsigned 64-bit integer amount, represented as a string.
The assetCode is a code that indicates the underlying asset. This SHOULD be an ISO4217 currency code.
The scale of amounts denoted in the corresponding asset code.
Additional metadata associated with the outgoing payment. (Optional)
object
The date and time when the outgoing payment was created.
The date and time when the outgoing payment was updated.
Examples
401
Authorization required
Headers
The address of the authorization server for grant requests in the format GNAP as_uri=<URI>
403
Forbidden