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.
CreatePayInDetailsCreatePayInDetailsRequestCreatePayInDetailsResponseNetwork asks the provider for possible pay-in options for a sender, in preparation for a pay-in process. This is optional, but if implemented, it should return a list of available pay-in methods.
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)

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.
currencystringIt is the currency of the entry. If the transaction contains entries with multiple currencies, the exchange_rate field should be provided to be used to convert the amounts to USD.
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.
exchange_ratetzero.v1.common.Decimalexchange_rate is the exchange rate of the currency to USD if the currency is not USD and the transaction contains entries with multiple currencies. Exchange rate for the base currency USD and the quote currency provided in the entry.

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.
pay_inAppendLedgerEntriesRequest.Transaction.PayIn
payout_reservationAppendLedgerEntriesRequest.Transaction.PayoutReservation
payoutAppendLedgerEntriesRequest.Transaction.Payout
provider_settlementAppendLedgerEntriesRequest.Transaction.ProviderSettlement
fee_settlementAppendLedgerEntriesRequest.Transaction.FeeSettlement
payout_reservation_releaseAppendLedgerEntriesRequest.Transaction.PayoutReservationRelease

AppendLedgerEntriesRequest.Transaction.FeeSettlement

FieldTypeLabelDescription
fee_settlement_iduint64

AppendLedgerEntriesRequest.Transaction.PayIn

FieldTypeLabelDescription
payment_iduint64

AppendLedgerEntriesRequest.Transaction.Payout

FieldTypeLabelDescription
payment_iduint64

AppendLedgerEntriesRequest.Transaction.PayoutReservation

FieldTypeLabelDescription
payment_iduint64

AppendLedgerEntriesRequest.Transaction.PayoutReservationRelease

FieldTypeLabelDescription
payment_iduint64

AppendLedgerEntriesRequest.Transaction.ProviderSettlement

FieldTypeLabelDescription
settlement_iduint64

AppendLedgerEntriesResponse

This message has no fields defined.

CreatePayInDetailsRequest

FieldTypeLabelDescription
payment_intent_idstringpayment_intent_id is a unique identifier for the payment intent, which is used to create a payment later.
senderCreatePayInDetailsRequest.SenderSender details for the pay-in process.

CreatePayInDetailsRequest.Sender

FieldTypeLabelDescription
private_personCreatePayInDetailsRequest.Sender.PrivatePerson

CreatePayInDetailsRequest.Sender.PrivatePerson

FieldTypeLabelDescription
private_person_idstringcan be used to get KYC data

CreatePayInDetailsResponse

FieldTypeLabelDescription
pay_in_methodtzero.v1.common.PaymentMethodrepeatedList of available pay-in methods for the sender. This is used to present the user with options for how they can pay in.

PayoutRequest

FieldTypeLabelDescription
payment_idint64payment id assigned by the network (provider should store this id to provide details in UpdatePayout later)
payout_idint64payout 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_methodtzero.v1.common.PaymentMethodpayout_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.

PayoutResponse

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.
creditor_idint32the Id of the counterparty (creditor) 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 maid 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.
successUpdatePaymentRequest.SuccessSuccess response - means 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.
failureUpdatePaymentRequest.FailureFailure response - means the payout was not executed successfully, e.g. the payout provider could not process the payout.

UpdatePaymentRequest.Failure

This message has no fields defined.

UpdatePaymentRequest.Success

FieldTypeLabelDescription
payout_amounttzero.v1.common.Decimalamount in currency of the payout
paid_out_atgoogle.protobuf.Timestamptime of the payout

UpdatePaymentResponse

This message has no fields defined.

AppendLedgerEntriesRequest.AccountType

NameNumberDescription
ACCOUNT_TYPE_UNSPECIFIED0
ACCOUNT_TYPE_USER_PAYABLE1Reflects the user’s payable balance, the amount that the provider owes to the user.
ACCOUNT_TYPE_CASH2Reflects the cash balance of the provider.
ACCOUNT_TYPE_RESERVE3This is the reserve account of the provider, which reflects the reserve of balance to reduce the limit available from one provider to another.
ACCOUNT_TYPE_RESERVE_USAGE4This is the mirror account for the reserve. To keep the double entry accounting principle.
ACCOUNT_TYPE_PROVIDER_PAYABLE5Reflects how much the provider owes to the network or other participants.
ACCOUNT_TYPE_PROVIDER_RECEIVABLE6Reflects how much the provider is owed by the network or other participants.
ACCOUNT_TYPE_FEE_PAYABLE7Reflects the fees that the provider owes to the network.
ACCOUNT_TYPE_FEE_RECEIVABLE8Reflects the fees that the network is owed by the provider.
ACCOUNT_TYPE_FEE_EXPENSE9Reflects the fees that the provider has to pay for the services provided by the network.
ACCOUNT_TYPE_PROVIDER_SETTLEMENT10Reflects the settlement balance of the provider with the network or other participants.

UpdatePaymentRequest.Failure.Reason

NameNumberDescription
REASON_UNSPECIFIED0

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)