get-config.rst (6952B)
1 .. http:get:: /config 2 3 Return the protocol version and currency supported by this merchant backend. 4 5 **Response:** 6 7 :http:statuscode:`200 OK`: 8 The body is a `MerchantVersionResponse`. 9 10 **Details:** 11 12 .. ts:def:: MerchantVersionResponse 13 14 interface MerchantVersionResponse { 15 // libtool-style representation of the Merchant protocol version, see 16 // https://www.gnu.org/software/libtool/manual/html_node/Versioning.html#Versioning 17 // The format is "current:revision:age". 18 version: string; 19 20 // Name of the protocol. 21 name: "taler-merchant"; 22 23 // URN of the implementation (needed to interpret 'revision' in version). 24 // @since **v8**, may become mandatory in the future. 25 implementation?: string; 26 27 // Default (!) currency supported by this backend. 28 // This is the currency that the backend should 29 // suggest by default to the user when entering 30 // amounts. See ``currencies`` for a list of 31 // supported currencies and how to render them. 32 currency: string; 33 34 // Which Persona should be used by default by new clients in the SPA. 35 // Can be changed locally per browers under "Personalization". 36 // Possible values include "expert", "offline-vending-machine", 37 // "point-of-sale", "digital-publishing", "e-commerce" and "developer". 38 // @since **v23**. 39 default_persona: string; 40 41 // How services should render currencies supported 42 // by this backend. Maps 43 // currency codes (e.g. "EUR" or "KUDOS") to 44 // the respective currency specification. 45 // All currencies in this map are supported by 46 // the backend. Note that the actual currency 47 // specifications are a *hint* for applications 48 // that would like *advice* on how to render amounts. 49 // Applications *may* ignore the currency specification 50 // if they know how to render currencies that they are 51 // used with. 52 currencies: { currency : CurrencySpecification}; 53 54 // Maps available report generator configuration section names 55 // to descriptions of the respective report generator. 56 // Since **v25**. 57 report_generators: { section_name : string}; 58 59 // Posix regular expression for allowed phone numbers; 60 // applies when creating or patching an instance. 61 // Optional, can be NULL for no restrictions. 62 // Since **v26**. 63 phone_regex?: string; 64 65 // Array of exchanges trusted by the merchant. 66 // @since **v6**. 67 exchanges: ExchangeConfigInfo[]; 68 69 // Set when the merchant supports 70 // self-provisioning instances. 71 // Since protocol **v21** 72 have_self_provisioning: boolean; 73 74 // True if this merchant backend supports the Donau 75 // extension and can thus issue donation receipts. 76 // Should primarily be used to control the SPA's CRUD 77 // functionality for Donau. 78 // @since **v21** 79 have_donau: boolean; 80 81 // Tan channels that are required 82 // to be confirmed for an instance to 83 // be useable. 84 // @since **v21** 85 mandatory_tan_channels?: TanChannel[]; 86 87 // Space-separated list of enabled payment target types. 88 // Useful if the SPA should not show allow adding other 89 // types of bank accounts. "*" is used to represent no 90 // restriction. 91 // @since **v22** 92 payment_target_types: string; 93 94 // Regular expression representing further restrictions 95 // on allowed payment targets. Any "payto://"-URI supplied 96 // for a bank account must match the given regular expression. 97 // For example, "payto://iban/CH.*" would restrict the system 98 // to only Swiss bank accounts. 99 // Optional, no restrictions are imposed if the field is 100 // absent. 101 // @since **v22** 102 // CAUTION: Likely to be removed/deprecated, 103 // as we'll want an array of restrictions with the 104 // same format as the exchange uses, as this allows 105 // proper i18n and spec/code reuse. 106 payment_target_regex? string; 107 108 // Default payment delay for new instances. 109 // This is the default to use for new instances, see the instance value for 110 // the instance-specific default. 111 // A value of "forever" is not allowed. 112 // @since **v22** 113 default_pay_delay: RelativeTime; 114 115 // If the frontend does NOT specify a refund deadline, how long should 116 // refunds be allowed by default? 117 // This is the default to use for new instances, see the instance value for 118 // the instance-specific default. 119 // A value of "forever" is not allowed. 120 // @since **v22** 121 default_refund_delay: RelativeTime; 122 123 // Default wire transfer delay for new instances. 124 // This is the default to use for new instances, see the instance value for 125 // the instance-specific default. 126 // A value of "forever" is not allowed. 127 // @since **v22** 128 default_wire_transfer_delay: RelativeTime; 129 130 // Default interval to which wire deadlines computed by 131 // adding the wire_transfer_delay on top of the refund 132 // deadline should be rounded up to. 133 // @since **v23** 134 default_wire_transfer_rounding_interval: RoundingInterval; 135 136 // General object of SPA options from the 137 // ``GLOBAL_SPA_CONFIG_DATA`` configuration option. 138 // @since **v28**. 139 spa_options?: SpaConfigOptions; 140 } 141 142 .. ts:def:: TanChannel 143 144 enum TanChannel { 145 SMS = "sms", 146 EMAIL = "email" 147 } 148 149 .. ts:def:: RoundingInterval 150 151 enum RoundingInterval { 152 NONE = "NONE", 153 SECOND = "SECOND", 154 MINUTE = "MINUTE", 155 HOUR = "HOUR", 156 DAY = "DAY", 157 WEEK = "WEEK", 158 MONTH = "MONTH", 159 QUARTER = "QUARTER", 160 YEAR = "YEAR" 161 } 162 163 .. ts:def:: ExchangeConfigInfo 164 165 interface ExchangeConfigInfo { 166 167 // Base URL of the exchange REST API. 168 base_url: string; 169 170 // Currency for which the merchant is configured 171 // to trust the exchange. 172 // May not be the one the exchange actually uses, 173 // but is the only one we would trust this exchange for. 174 currency: string; 175 176 // Offline master public key of the exchange. The 177 // ``/keys`` data must be signed with this public 178 // key for us to trust it. 179 master_pub: EddsaPublicKey; 180 } 181 182 .. ts:def:: SpaConfigOptions 183 184 // Note that this object could contain many more fields, 185 // depending on the SPA. We describe here only some of the 186 // canonical fields that are supported by the default SPA. 187 interface SpaConfigOptions { 188 189 // How to contact the operator. 190 contact_email?: string; 191 192 // How to contact the operator. 193 contact_phone?: string; 194 195 // Where to find support. 196 support_url?: string; 197 198 // Legal address of the operator. 199 address?: Location; 200 201 // Legal tax information about the operator. 202 tax_info?: string; 203 204 }