On this page
Payment Intent Provider
NetworkService
NetworkService is used by provider in order to notify network on payment intent updates
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| ConfirmPayment | ConfirmPaymentRequest | ConfirmPaymentResponse | Notify network about a successful payment for the corresponding payment intent |
| RejectPaymentIntent | RejectPaymentIntentRequest | RejectPaymentIntentResponse | Notify network about a payment failure for the corresponding payment intent |
| ConfirmSettlement | ConfirmSettlementRequest | ConfirmSettlementResponse | Notify network about relation between payment intent and settlement transaction. This method is not essential but helps to keep track of payment flow |
ProviderService
ProviderService is implemented by provider to provide pay-in details fpr payment intents
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| CreatePaymentIntent | CreatePaymentIntentRequest | CreatePaymentIntentResponse | Network instructs provider to create payment details for the payment intent. Provide should return a list of supported payment method along with URL where payer should be redirected. |
| ConfirmPayout | ConfirmPayoutRequest | ConfirmPayoutResponse | Network notifies provider about successful payout for the corresponding payment intent |
Requests And Response Types
ConfirmPaymentRequest
| Field | Type | Label | Description |
|---|---|---|---|
| payment_intent_id | uint64 | payment_intent_id from CreatePaymentIntentRequest | |
| payment_method | tzero.v1.common.PaymentMethodType |
ConfirmPaymentResponse
| Field | Type | Label | Description |
|---|---|---|---|
| settlement_amount | tzero.v1.common.Decimal | settlement amount denominated in settlement currency | |
| payout_provider_id | uint32 |
ConfirmPayoutRequest
| Field | Type | Label | Description |
|---|---|---|---|
| payment_intent_id | uint64 | payment_intent_id from CreatePaymentIntentRequest | |
| payment_id | uint64 | corresponding payment_id for this payment intent |
ConfirmPayoutResponse
This message has no fields defined.
ConfirmSettlementRequest
| Field | Type | Label | Description |
|---|---|---|---|
| blockchain | tzero.v1.common.Blockchain | ||
| tx_hash | string | ||
| payment_intent_id | uint64 | repeated | list of payment_intent_id’s for this settlement (on-chain) transaction |
ConfirmSettlementResponse
This message has no fields defined.
CreatePaymentIntentRequest
| Field | Type | Label | Description |
|---|---|---|---|
| payment_intent_id | uint64 | idempotency key | |
| currency | string | pay-in currency | |
| amount | tzero.v1.common.Decimal | pay-in amount | |
| merchant_id | uint32 |
CreatePaymentIntentResponse
| Field | Type | Label | Description |
|---|---|---|---|
| payment_methods | CreatePaymentIntentResponse.PaymentMethod | repeated |
CreatePaymentIntentResponse.PaymentMethod
| Field | Type | Label | Description |
|---|---|---|---|
| payment_url | string | ||
| payment_method | tzero.v1.common.PaymentMethodType |
RejectPaymentIntentRequest
| Field | Type | Label | Description |
|---|---|---|---|
| payment_intent_id | uint64 | payment_intent_id from CreatePaymentIntentRequest | |
| reason | string |
RejectPaymentIntentResponse
This message has no fields defined.