Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions sdk/src/t0_provider_sdk/proto/ivms101/v1/ivms/ivms101.proto
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ message LocalNaturalPersonNameId {

// Constraint: ValidAddress
// There must be at least one occurrence of the element addressLine or (streetName and
// buildingName and/or buildingNumber).
// buildingName and/or buildingNumber)
message Address {

// Definition: Identifies the nature of the address.
Expand Down Expand Up @@ -250,7 +250,7 @@ message Address {
max_items: 7,
items: {
string: {
max_len: 70,
max_len: 255,
pattern: "^$|^.*\\S.*$" // allow empty, disallow whitespace-only
}
}
Expand Down Expand Up @@ -338,7 +338,10 @@ message LegalPerson {
LegalPersonName name = 1 [(buf.validate.field).required = true];

// Definition: The address of the legal person.
repeated Address geographic_addresses = 2 [json_name = "geographicAddress"];
repeated Address geographic_addresses = 2 [
json_name = "geographicAddress",
(buf.validate.field).repeated.min_items = 1
];

// Definition: The unique identification number applied by the VASP to customer.
// NOTE The specification has a descrepency in that 5.2.9.3.3 specifies an element
Expand Down
19 changes: 10 additions & 9 deletions sdk/src/t0_provider_sdk/proto/tzero/v1/common/payment_method.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ enum PaymentMethodType {
PAYMENT_METHOD_TYPE_SEPA = 10;
PAYMENT_METHOD_TYPE_SWIFT = 20;
PAYMENT_METHOD_TYPE_ACH = 50;
PAYMENT_METHOD_TYPE_WIRE = 60;
PAYMENT_METHOD_TYPE_DOMESTIC_WIRE = 60;
PAYMENT_METHOD_TYPE_FPS = 70;

PAYMENT_METHOD_TYPE_M_PESA = 80 [deprecated = true]; // deprecated in favor of PAYMENT_METHOD_TYPE_AFRICAN_MOBILE_MONEY
Expand Down Expand Up @@ -48,9 +48,9 @@ message PaymentDetails {
// United States
Ach ach = 50;

// Wire - Domestic electronic funds transfer
// DomesticWire - US domestic wire transfer
// United States
Wire wire = 60;
DomesticWire domestic_wire = 60;

// FPS (Faster Payments Service)
// United Kingdom
Expand Down Expand Up @@ -408,8 +408,8 @@ message PaymentDetails {
}
}

message Wire {
option (payment_method_type) = PAYMENT_METHOD_TYPE_WIRE;
message DomesticWire {
option (payment_method_type) = PAYMENT_METHOD_TYPE_DOMESTIC_WIRE;

string bank_name = 10 [(buf.validate.field).string = {
min_len: 1,
Expand All @@ -421,10 +421,11 @@ message PaymentDetails {
max_len: 140
}];

string swift_code = 30 [(buf.validate.field).string = {
min_len: 8,
max_len: 11,
pattern: "^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$"
// ABA routing number (9 digits)
string routing_number = 30 [(buf.validate.field).string = {
min_len: 9,
max_len: 9,
pattern: "^[0-9]{9}$"
}];

string account_number = 40 [(buf.validate.field).string = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import "buf/validate/validate.proto";
* All methods of this service are idempotent, meaning they are safe to retry and multiple calls with the same parameters will have no additional effect.
*/
service NetworkService {

/**
* Used by the provider to publish pay-in and pay-out quotes (FX rates) into the network.
* These quotes include tiered pricing bands and an expiration timestamp.
Expand Down
3 changes: 3 additions & 0 deletions sdk/src/t0_provider_sdk/proto/tzero/v1/payment/provider.proto
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ message AppendLedgerEntriesRequest {
ACCOUNT_TYPE_FEE_EXPENSE = 60; // Reflects the fees that the provider has to pay for the services provided by the network.
ACCOUNT_TYPE_SETTLEMENT_IN = 80;
ACCOUNT_TYPE_SETTLEMENT_OUT = 90;
ACCOUNT_TYPE_PAYMENT_INTENT_IN = 100;
ACCOUNT_TYPE_PAYMENT_INTENT_OUT = 110;
}
}

Expand Down Expand Up @@ -272,6 +274,7 @@ message UpdatePaymentRequest {
REASON_NO_QUOTE_AFTER_AML_APPROVAL = 1; // AML review completed, but the pay-out provider no longer has a valid quote available.
REASON_QUOTE_REJECTED_AFTER_AML_APPROVAL = 2; // AML review completed and a new quote was required, but the pay-in provider rejected the updated quote (e.g. due to rate change after AML delay).
REASON_AML_RISK_CHECK_FAILED = 3; // Payment was rejected by the pay-out provider because the AML / risk checks failed.
REASON_CREDIT_LIMIT_EXCEEDED_AFTER_AML_APPROVAL = 4; // AML review completed and a new quote was found, but the updated settlement amount exceeds the credit limit between the pay-in and pay-out providers.
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
syntax = "proto3";

package tzero.v1.payment_intent;

import "tzero/v1/common/common.proto";
import "tzero/v1/common/payment_method.proto";
import "buf/validate/validate.proto";

/**
* BeneficiaryService must be implemented by beneficiary providers to receive
* notifications about payment intent status changes.
*
* Beneficiary providers are those who:
* - Create payment intents via CreatePaymentIntent
* - Receive settlement (in settlement currency via configured blockchain network)
* - Need to be notified of payment status changes
*
* The network calls this service to notify the beneficiary when:
* - Funds have been received from the payer by pay-in provider
*/
service BeneficiaryService {
/**
* PaymentIntentUpdate notifies the beneficiary provider of status changes.
*
* Idempotency: This endpoint must be idempotent. The network may retry
* delivery in case of failures or timeouts.
*/
rpc PaymentIntentUpdate(PaymentIntentUpdateRequest) returns (PaymentIntentUpdateResponse) {
option idempotency_level = IDEMPOTENT;
};
}

/**
* Notification of a payment intent status change.
*/
message PaymentIntentUpdateRequest {
/**
* The payment intent ID this update relates to.
* Matches the ID returned in CreatePaymentIntentResponse.
*/
uint64 payment_intent_id = 10 [(buf.validate.field).uint64.gt = 0];

/**
* The type of update.
*/
oneof update {
/**
* Funds were received from the payer by pay-in provider.
*/
FundsReceived funds_received = 20;
}

/**
* Notification that funds were received from the payer by pay-in provider.
*
*/
message FundsReceived {
/**
* The settlement amount credited to your balance.
* This is calculated as: source_amount / rate
*
* Note: Fees are NOT deducted from this amount. Fees are tracked
* separately and settled in periodic fee settlements.
*/
tzero.v1.common.Decimal settlement_amount = 10;

/**
* The exchange rate used for settlement.
*/
tzero.v1.common.Decimal rate = 20;

/**
* The fiat amount received from the end-user.
* Matches the amount originally requested in CreatePaymentIntent.
*/
tzero.v1.common.Decimal payment_amount = 30;

/*
* The payment method used for the pay-in
*/
tzero.v1.common.PaymentMethodType payment_method = 40;

/*
* Unique transaction reference identifying the pay-in transaction
*/
string transaction_reference = 50;
}
}

/**
* Acknowledgment of receiving the payment intent update.
* Empty response indicates successful processing.
* Return an error status code if processing failed and retry is needed.
*/
message PaymentIntentUpdateResponse {}
Loading