ProviderService

This service must be implemented by the provider.

All methods of this service must be idempotent, meaning they are safe to retry and multiple calls with the same parameters must not have additional effect.

Method NameRequest TypeResponse TypeDescription
PayOutPayoutRequestPayoutResponseNetwork instructs the provider to execute a payout to the recipient. This method should be idempotent, meaning that multiple calls with the same parameters will have no additional effect.
UpdatePaymentUpdatePaymentRequestUpdatePaymentResponseNetwork provides an update on the status of a payment. This can be either a success or a failure. This method should be idempotent, meaning that multiple calls with the same parameters will have no additional effect.
UpdateLimitUpdateLimitRequestUpdateLimitResponseThis rpc is used to notify the provider about the changes in credit limit and/or credit usage.
AppendLedgerEntriesAppendLedgerEntriesRequestAppendLedgerEntriesResponseNetwork can send all the updates about ledger entries of the provider’s accounts. It can be used to keep track of the provider’s exposure to other participants and other important financial events. (see the list in the message below)
ApprovePaymentQuotesApprovePaymentQuoteRequestApprovePaymentQuoteResponsePay-in provider approves the final pay-out quotes. This is the “Last Look” endpoint - it must be called after manual AML check completes (if one was required). It allows pay-in provider to verify and approve final rates before payment is executed.

Requests And Response Types

AppendLedgerEntriesRequest

FieldTypeLabelDescription
transactionsAppendLedgerEntriesRequest.TransactionrepeatedThis is a list of transactions that were appended to the ledger of the provider. The transaction_id should be used to identify the transaction and ensure that it is processed only once.

AppendLedgerEntriesRequest.LedgerEntry

FieldTypeLabelDescription
account_owner_iduint321 is network account, others are ids of participants
account_typeAppendLedgerEntriesRequest.AccountTypeaccount_type is the type of the account that the entry belongs to. It is used to categorize the entries and understand the nature of the financial event.
debittzero.v1.common.Decimaldebit is the amount that was debited from the account. If the entry is a credit, this field should be 0.
credittzero.v1.common.Decimalcredit is the amount that was credited to the account. If the entry is a debit, this field should be 0.

AppendLedgerEntriesRequest.Transaction

FieldTypeLabelDescription
transaction_iduint64transaction_id is an incrementally growing identifier for the transaction. It could have gaps and could be out of order, but it is unique for each transaction.
entriesAppendLedgerEntriesRequest.LedgerEntryrepeatedentries is a list of ledger entries that were appended to the ledger of the provider. Each entry represents a financial event that occurred in the provider’s accounts.
payoutAppendLedgerEntriesRequest.Transaction.Payout
provider_settlementAppendLedgerEntriesRequest.Transaction.ProviderSettlement
fee_settlementAppendLedgerEntriesRequest.Transaction.FeeSettlement

AppendLedgerEntriesRequest.Transaction.FeeSettlement

FieldTypeLabelDescription
fee_settlement_iduint64

AppendLedgerEntriesRequest.Transaction.Payout

FieldTypeLabelDescription
payment_iduint64

AppendLedgerEntriesRequest.Transaction.ProviderSettlement

FieldTypeLabelDescription
settlement_iduint64

AppendLedgerEntriesResponse

This message has no fields defined.

ApprovePaymentQuoteRequest

FieldTypeLabelDescription
payment_iduint64
pay_out_quote_idint64
pay_out_ratetzero.v1.common.Decimal
pay_out_amounttzero.v1.common.Decimal
settlement_amounttzero.v1.common.Decimal

ApprovePaymentQuoteResponse

FieldTypeLabelDescription
acceptedApprovePaymentQuoteResponse.Accepted
rejectedApprovePaymentQuoteResponse.Rejected

ApprovePaymentQuoteResponse.Accepted

This message has no fields defined.

ApprovePaymentQuoteResponse.Rejected

This message has no fields defined.

PayoutRequest

FieldTypeLabelDescription
payment_iduint64payment id assigned by the network (provider should store this id to provide details in UpdatePayout later)
payout_iduint64payout id assigned by the network (provider should store this id to provide details in UpdatePayout later)
currencystringcurrency of the payout (participant could support multiple currencies) This is the currency in which the payout should be made.
client_quote_idstringclient quote id of the quote used for this payout (the provider provides the quote IDs in the UpdateQuote rpc) This is the identifier of the quote that was used to calculate the payout amount.
amounttzero.v1.common.Decimalamount in currency of the payout This is the amount that should be paid out to the recipient.
payout_detailstzero.v1.common.PaymentDetailsoptionalpayout_method is the payment method for the payout, e.g. bank transfer, crypto transfer, etc. This is used to specify how the payout should be made.
pay_in_provider_iduint32Pay-in provider id which initiated the pay out.
travel_rule_dataPayoutRequest.TravelRuleDataoptional

PayoutRequest.TravelRuleData

FieldTypeLabelDescription
originatorivms101.Personrepeatedthe natural or legal person that requests payment with originating provider
beneficiaryivms101.Personrepeatedthe natural or legal person or legal arrangement who is identified by the originator as the receiver of the requested payment.
originator_providerivms101.Personoptional

PayoutResponse

FieldTypeLabelDescription
acceptedPayoutResponse.AcceptedAccepted response - means the payout was accepted by the pay-out provider and pay-out provider is obligated to make a pay-out.
failedPayoutResponse.FailedFailure response - means the payout was not executed successfully, e.g. the payout provider could not process the payout.
manual_aml_checkPayoutResponse.ManualAmlCheckManual AML check required - means the payout provider requires additional Anti-Money Laundering (AML) verification before the payment can proceed. The pay-out provider will need to perform the manual AML check and then call CompleteManualAmlCheck rpc with the result of the check.

PayoutResponse.Accepted

This message has no fields defined.

PayoutResponse.Failed

FieldTypeLabelDescription
reasonPayoutResponse.Failed.Reason

PayoutResponse.ManualAmlCheck

This message has no fields defined.

UpdateLimitRequest

All the amounts are in USD

FieldTypeLabelDescription
limitsUpdateLimitRequest.Limitrepeatedcan contain one or more Limit messages, each representing a credit limit for a specific counterparty provider.

UpdateLimitRequest.Limit

FieldTypeLabelDescription
versionint64Incrementally growing for the provider - same as in Ledger.
counterpart_idint32the Id of the counterparty provider, e.g. the provider that is providing the credit limit. It’s usually the payOut provider, which provides the credit line to the payIn provider.
payout_limittzero.v1.common.Decimalpayout_limit = credit_limit - credit_usage, negative value means credit limit is exceeded, e.g. if counterparty decreased credit limit
credit_limittzero.v1.common.DecimalThis is the credit limit that the counterparty is willing to extend to the provider.
credit_usagetzero.v1.common.DecimalThis is the credit usage that the provider has used so far. It is the sum of all payouts made by the provider minus the settlement net (settlement balance). It could be negative if the provider has received more in settlements than made payouts (pre-settlement).

UpdateLimitResponse

Empty message - means no response is needed.

This message has no fields defined.

UpdatePaymentRequest

FieldTypeLabelDescription
payment_iduint64payment_id is a payment id in the T-0 network.
payment_client_idstringpayment_client_id is a payment id assigned by the client, this is the same id that was provided in the CreatePaymentRequest.
acceptedUpdatePaymentRequest.AcceptedAccepted response - means the payout was accepted by the pay-out provider and pay-out provider is obligated to make a pay-out.
failedUpdatePaymentRequest.FailedPayment failed and would not be retried.
confirmedUpdatePaymentRequest.ConfirmedConfirmed response - final state meaning the payout was executed successfully and the payment is now complete. This happens when the payout is successfully processed by the payout provider, and the payment was made to the recipient.
manual_aml_checkUpdatePaymentRequest.ManualAmlCheckIn case of manual AML check, pay-out provider needs to perform additional checks and then call CompleteManualAmlCheck rpc with the result of the check.

UpdatePaymentRequest.Accepted

FieldTypeLabelDescription
payout_amounttzero.v1.common.Decimalamount in currency of the payout
travel_rule_dataUpdatePaymentRequest.Accepted.TravelRuleDataoptional

UpdatePaymentRequest.Accepted.TravelRuleData

FieldTypeLabelDescription
beneficiary_providerivms101.Personoptional

UpdatePaymentRequest.Confirmed

FieldTypeLabelDescription
paid_out_atgoogle.protobuf.Timestamptime of the payout
receipttzero.v1.common.PaymentReceiptPayment receipt might contain metadata about payment recognizable by pay-in provider.

UpdatePaymentRequest.Failed

FieldTypeLabelDescription
reasonUpdatePaymentRequest.Failed.Reason

UpdatePaymentRequest.ManualAmlCheck

This message has no fields defined.

UpdatePaymentResponse

This message has no fields defined.

AppendLedgerEntriesRequest.AccountType

NameNumberDescription
ACCOUNT_TYPE_UNSPECIFIED0
ACCOUNT_TYPE_BALANCE20
ACCOUNT_TYPE_PAY_IN40
ACCOUNT_TYPE_PAY_OUT50
ACCOUNT_TYPE_FEE_EXPENSE60Reflects the fees that the provider has to pay for the services provided by the network.
ACCOUNT_TYPE_SETTLEMENT_IN80
ACCOUNT_TYPE_SETTLEMENT_OUT90

PayoutResponse.Failed.Reason

NameNumberDescription
REASON_UNSPECIFIED0

UpdatePaymentRequest.Failed.Reason

NameNumberDescription
REASON_UNSPECIFIED0