|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | + "$id": "https://tbdex.dev/offering.schema.json", |
| 4 | + "type": "object", |
| 5 | + "properties": { |
| 6 | + "additionalProperties": false, |
| 7 | + "description": { |
| 8 | + "type": "string", |
| 9 | + "description": "Brief description of what is being offered." |
| 10 | + }, |
| 11 | + "payin": { |
| 12 | + "type": "object", |
| 13 | + "additionalProperties": false, |
| 14 | + "properties": { |
| 15 | + "currencyCode": { |
| 16 | + "type": "string", |
| 17 | + "description": "ISO 3166 currency code string" |
| 18 | + }, |
| 19 | + "min": { |
| 20 | + "$ref": "definitions.json#/definitions/decimalString", |
| 21 | + "description": "Minimum amount of currency that can be requested" |
| 22 | + }, |
| 23 | + "max": { |
| 24 | + "$ref": "definitions.json#/definitions/decimalString", |
| 25 | + "description": "Maximum amount of currency that can be requested" |
| 26 | + }, |
| 27 | + "methods": { |
| 28 | + "type": "array", |
| 29 | + "items": { |
| 30 | + "type": "object", |
| 31 | + "additionalProperties": false, |
| 32 | + "properties": { |
| 33 | + "kind": { |
| 34 | + "type": "string", |
| 35 | + "description": "The type of payment method. e.g. BITCOIN_ADDRESS, DEBIT_CARD, etc." |
| 36 | + }, |
| 37 | + "name": { |
| 38 | + "type": "string", |
| 39 | + "description": "Payment Method name. Expected to be rendered on screen." |
| 40 | + }, |
| 41 | + "description": { |
| 42 | + "type": "string", |
| 43 | + "description": "Blurb containing helpful information about the payment method. Expected to be rendered on screen. e.g. \"segwit addresses only\"" |
| 44 | + }, |
| 45 | + "group": { |
| 46 | + "type": "string", |
| 47 | + "description": "Value that can be used to group specific payment methods together (e.g. Mobile Money vs. Direct Bank Deposit)." |
| 48 | + }, |
| 49 | + "requiredPaymentDetails": { |
| 50 | + "$ref": "http://json-schema.org/draft-07/schema", |
| 51 | + "description": "A JSON Schema containing the fields that need to be collected in order to use this payment method" |
| 52 | + }, |
| 53 | + "min": { |
| 54 | + "$ref": "definitions.json#/definitions/decimalString", |
| 55 | + "description": "Minimum amount required to use this payment method." |
| 56 | + }, |
| 57 | + "max": { |
| 58 | + "$ref": "definitions.json#/definitions/decimalString", |
| 59 | + "description": "Maximum amount allowed when using this payment method." |
| 60 | + }, |
| 61 | + "fee": { |
| 62 | + "$ref": "definitions.json#/definitions/decimalString", |
| 63 | + "description": "Fee charged to use this payment method. Absence of this field implies that there is no _additional_ fee associated to the respective payment method." |
| 64 | + } |
| 65 | + }, |
| 66 | + "required": ["kind"] |
| 67 | + } |
| 68 | + } |
| 69 | + }, |
| 70 | + "required": ["currencyCode", "methods"] |
| 71 | + }, |
| 72 | + "payout": { |
| 73 | + "type": "object", |
| 74 | + "additionalProperties": false, |
| 75 | + "properties": { |
| 76 | + "currencyCode": { |
| 77 | + "type": "string", |
| 78 | + "description": "ISO 3166 currency code string" |
| 79 | + }, |
| 80 | + "min": { |
| 81 | + "$ref": "definitions.json#/definitions/decimalString", |
| 82 | + "description": "Minimum amount of currency that can be requested" |
| 83 | + }, |
| 84 | + "max": { |
| 85 | + "$ref": "definitions.json#/definitions/decimalString", |
| 86 | + "description": "Maximum amount of currency that can be requested" |
| 87 | + }, |
| 88 | + "methods": { |
| 89 | + "type": "array", |
| 90 | + "items": { |
| 91 | + "type": "object", |
| 92 | + "additionalProperties": false, |
| 93 | + "properties": { |
| 94 | + "kind": { |
| 95 | + "type": "string", |
| 96 | + "description": "The type of payment method. e.g. BITCOIN_ADDRESS, DEBIT_CARD, etc." |
| 97 | + }, |
| 98 | + "name": { |
| 99 | + "type": "string", |
| 100 | + "description": "Payment Method name. Expected to be rendered on screen." |
| 101 | + }, |
| 102 | + "description": { |
| 103 | + "type": "string", |
| 104 | + "description": "Blurb containing helpful information about the payment method. Expected to be rendered on screen. e.g. \"segwit addresses only\"" |
| 105 | + }, |
| 106 | + "group": { |
| 107 | + "type": "string", |
| 108 | + "description": "Value that can be used to group specific payment methods together (e.g. Mobile Money vs. Direct Bank Deposit)." |
| 109 | + }, |
| 110 | + "requiredPaymentDetails": { |
| 111 | + "$ref": "http://json-schema.org/draft-07/schema", |
| 112 | + "description": "A JSON Schema containing the fields that need to be collected in order to use this payment method" |
| 113 | + }, |
| 114 | + "min": { |
| 115 | + "$ref": "definitions.json#/definitions/decimalString", |
| 116 | + "description": "Minimum amount required to use this payment method." |
| 117 | + }, |
| 118 | + "max": { |
| 119 | + "$ref": "definitions.json#/definitions/decimalString", |
| 120 | + "description": "Maximum amount allowed when using this payment method." |
| 121 | + }, |
| 122 | + "fee": { |
| 123 | + "$ref": "definitions.json#/definitions/decimalString", |
| 124 | + "description": "Fee charged to use this payment method. absence of this field implies that there is no _additional_ fee associated to the respective payment method" |
| 125 | + }, |
| 126 | + "estimatedSettlementTime": { |
| 127 | + "type": "number", |
| 128 | + "description": "Estimated time in seconds for the payout to be settled. e.g. 3600 for 1 hour. 0 for instant settlement.", |
| 129 | + "minimum": 0 |
| 130 | + } |
| 131 | + }, |
| 132 | + "required": ["kind", "estimatedSettlementTime"] |
| 133 | + } |
| 134 | + } |
| 135 | + }, |
| 136 | + "required": ["currencyCode", "methods"] |
| 137 | + }, |
| 138 | + "payoutUnitsPerPayinUnit": { |
| 139 | + "type": "string", |
| 140 | + "description": "Number of payout currency units for one payin currency unit (i.e 290000 USD for 1 BTC)" |
| 141 | + }, |
| 142 | + "requiredClaims": { |
| 143 | + "type": "object", |
| 144 | + "description": "PresentationDefinition that describes the credential(s) the PFI requires in order to provide a quote." |
| 145 | + } |
| 146 | + }, |
| 147 | + "required": [ |
| 148 | + "description", |
| 149 | + "payin", |
| 150 | + "payout", |
| 151 | + "payoutUnitsPerPayinUnit" |
| 152 | + ] |
| 153 | +} |
0 commit comments