{ "swagger": "2.0", "info": { "version": "0.1", "title": "Comcarde Bridge Payment Development API Definition", "description": "The REST Payment Development API that provides access to specified payment commands. Please contact Comcard for more details and access to the system." }, "basePath": "/dev/v0", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "bearer": [] } ], "tags": [ { "name": "general", "description": "Functions in the API" }, { "name": "payments", "description": "Functions related to taking payment in various manners" }, { "name": "instruments" }, { "name": "paycodes" }, { "name": "receivecodes" }, { "name": "request to pay (RTPs)" } ], "securityDefinitions": { "bearer": { "type": "apiKey", "name": "Authorization", "in": "header", "description": "Bearer token for the specific integration partner. The bearer token **MUST** be kept secure as it provides access to the controlled functionality. The token should be sent in the `\"Authorization\"` header as `\"Bearer \"` following [Section 2.1 of RFC 6750](https://tools.ietf.org/html/rfc6750#section-2.1). Contact Comcarde to request a token for use with this API." } }, "parameters": { "instrumentID": { "name": "instrumentID", "in": "path", "required": true, "description": "Unique identifier for payments instrument", "type": "string", "pattern": "[0-9a-f]{24}", "maxLength": 24, "minLength": 24 }, "bridgecode": { "name": "bridgecode", "in": "path", "required": true, "description": "Bridgecode string. 0-9A-Z except for I, O and Q", "type": "string", "minLength": 5, "maxLength": 10, "pattern": "^([0-9ABCDEFGHJKLMNPRSTUVWXYZ]*)$", "x-invalid-pattern": "[^0-9ABCDEFGHJKLMNPRSTUVWXYZ]" } }, "responses": { "AddedPaymentCard": { "description": "Success. The card has been stored.", "schema": { "$ref": "#/definitions/AddedCardInfo" } }, "badParameterError": { "description": "Parameter validation failed", "schema": { "$ref": "#/definitions/badParametersInfo" } }, "GeneralError": { "description": "General error response format", "schema": { "$ref": "#/definitions/ErrorInfo" } } }, "paths": { "/test": { "x-swagger-router-controller": "test_controller", "get": { "summary": "Test function", "description": "Tests that communication with the API works, and the supplied bearer token is valid", "tags": [ "general" ], "operationId": "test", "responses": { "default": { "$ref": "#/responses/GeneralError" }, "200": { "description": "Successful request: bearer token is valid", "schema": {} }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } } } } }, "/payments/worldpay": { "x-swagger-router-controller": "worldpay_transaction_controller", "post": { "summary": "Make a worldpay payment.", "description": "Create a WorldPay transaction by making a card payment for an amount in pennies.", "tags": [ "payments" ], "operationId": "worldpayPayment", "parameters": [ { "name": "body", "in":"body", "description": "Create WorldPay transaction body", "required": true, "schema": { "$ref": "#/definitions/worldpay-params" } } ], "responses": { "200": { "description": "Success. The payment has been made.", "schema": { "$ref": "#/definitions/TransactionSucceededInfo" } }, "400": { "$ref": "#/responses/badParameterError" }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/payment-instruments/worldpay-merchants": { "x-swagger-router-controller": "payment_instruments_controller", "post": { "summary": "Save a worldpay receiving account.", "description": "Save the encrypted details of a worldpay receiving account.", "tags": [ "instruments" ], "operationId": "saveWorldpayReceivingAccount", "parameters": [ { "name": "body", "in":"body", "description": "Save receiving account details.", "required": true, "schema": { "$ref": "#/definitions/worldpay-receiving-account-params" } } ], "responses": { "201": { "description": "Success. The account has been stored.", "schema": { "$ref": "#/definitions/AddedReceiveAccountInfo" } }, "400": { "$ref": "#/responses/badParameterError" }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/payment-instruments/cards": { "x-swagger-router-controller": "payment_instruments_controller", "post": { "summary": "Save card details.", "description": "Save the details of a banking card for future use in payments.", "tags": [ "instruments" ], "operationId": "saveCardDetails", "parameters": [ { "name": "body", "in":"body", "description": "Save card details.", "required": true, "schema": { "$ref": "#/definitions/payment-instrument-no-cv2-params" } } ], "responses": { "201": { "description": "Success. The card has been stored.", "schema": { "$ref": "#/definitions/AddedCardInfo" } }, "400": { "$ref": "#/responses/badParameterError" }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } }, "default": { "$ref": "#/responses/GeneralError" } } }, "get": { "summary": "List card payment instruments", "description": "Return a list of the card payment instrument IDs of the user.", "tags": [ "instruments" ], "operationId": "listCards", "responses": { "200": { "description": "Successful request: users card IDs returned", "schema": { "$ref": "#/definitions/paymentInstrumentList" } }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/payment-instruments/cards/{instrumentID}/payments": { "x-swagger-router-controller": "payment_instruments_controller", "post": { "summary": "Pay using stored card.", "description": "Make payment with stored card using Worldpay.", "tags": [ "payments" ], "operationId": "makeWorldpayPaymentWithSavedCard", "parameters": [ { "$ref": "#/parameters/instrumentID" }, { "name": "body", "in":"body", "description": "Make payment with stored card using Worldpay.", "required": true, "schema": { "$ref": "#/definitions/transaction-details-stored-card" } } ], "responses": { "200": { "description": "Successfully made payment with stored card using Worldpay.", "schema": { "$ref": "#/definitions/TransactionSucceededInfo" } }, "400": { "$ref": "#/responses/badParameterError" }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/payment-instruments/worldpay-merchants/{instrumentID}/payments": { "x-swagger-router-controller": "payment_instruments_controller", "post": { "summary": "Pay to a stored merchant.", "description": "Make payment to a stored Worldpay merchant using a specified card.", "tags": [ "payments" ], "operationId": "makeWorldpayPaymentToSavedMerchant", "parameters": [ { "$ref": "#/parameters/instrumentID" }, { "name": "body", "in":"body", "description": "Make payment to stored Worldpay merchant from a card.", "required": true, "schema": { "$ref": "#/definitions/transaction-details-stored-merchant" } } ], "responses": { "200": { "description": "Successfully made payment to stored Worldpay merchant.", "schema": { "$ref": "#/definitions/TransactionSucceededInfo" } }, "400": { "$ref": "#/responses/badParameterError" }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/payments/paycode": { "x-swagger-router-controller": "paycode_controller", "post": { "summary": "Redeem a paycode.", "description": "Pay a stored merchant with the account defined by a paycode.", "tags": [ "payments" ], "operationId": "redeemPaycode", "parameters": [ { "name": "body", "in":"body", "description": "Pay a stored merchant with the account defined by a paycode.", "required": true, "schema": { "$ref": "#/definitions/redeem-paycode-params" } } ], "responses": { "201": { "description": "Successfully received payment from paycode payment instrument.", "schema": { "$ref": "#/definitions/TransactionSucceededInfo" } }, "400": { "$ref": "#/responses/badParameterError" }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/paycodes": { "x-swagger-router-controller": "paycode_controller", "post": { "summary": "Create a paycode.", "description": "Create a paycode that can be used later to make a payment.", "tags": [ "paycodes" ], "operationId": "createPaycode", "parameters": [ { "name": "body", "in":"body", "description": "Create a paycode.", "required": true, "schema": { "$ref": "#/definitions/instrument-id-and-key" } } ], "responses": { "201": { "description": "Successfully created a paycode.", "schema": { "$ref": "#/definitions/CreatePaycodeSucceededInfo" } }, "400": { "$ref": "#/responses/badParameterError" }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/rtps": { "x-swagger-router-controller": "rtp_controller", "post": { "summary": "Create a Request to Pay (RTP).", "description": "Create an RTP that can be used later to receive a payment by creating an Attempt to pay (ATP).", "tags": [ "request to pay (RTPs)" ], "operationId": "createRTP", "parameters": [ { "name": "body", "in":"body", "description": "Create an RTP.", "required": true, "schema": { "$ref": "#/definitions/create-rtp-params" } } ], "responses": { "201": { "description": "Successfully created an RTP.", "schema": { "$ref": "#/definitions/CreateRTPSucceededInfo" } }, "400": { "$ref": "#/responses/badParameterError" }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } }, "default": { "$ref": "#/responses/GeneralError" } } }, "get": { "summary": "List Requests to Pay (RTP).", "description": "Return a list of the RTPs of the user.", "tags": [ "request to pay (RTPs)" ], "operationId": "listRTP", "responses": { "200": { "description": "Successful request: Request To Pay (RTP) IDs returned", "schema": { "$ref": "#/definitions/rtpList" } }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/receivecodes": { "x-swagger-router-controller": "receivecode_controller", "post": { "summary": "Create a receivecode.", "description": "Create a receivecode that can be used later to receive a payment.", "tags": [ "receivecodes" ], "operationId": "createReceivecode", "parameters": [ { "name": "body", "in":"body", "description": "Create a receivecode.", "required": true, "schema": { "$ref": "#/definitions/instrument-id-and-key" } } ], "responses": { "201": { "description": "Successfully created a receivecode.", "schema": { "$ref": "#/definitions/CreateReceivecodeSucceededInfo" } }, "400": { "$ref": "#/responses/badParameterError" }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/receivecodes/{bridgecode}": { "x-swagger-router-controller": "receivecode_controller", "delete": { "summary": "Delete a receivecode.", "description": "Delete a receivecode", "tags": [ "receivecodes" ], "operationId": "deleteReceivecode", "parameters": [ { "$ref": "#/parameters/bridgecode" } ], "responses": { "200": { "description": "Successfully deleted the receivecode." }, "400": { "$ref": "#/responses/badParameterError" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/payments/receivecode": { "x-swagger-router-controller": "receivecode_controller", "post": { "summary": "Redeem a receivecode.", "description": "Pay a stored merchant to the account defined by a receivecode. If payerInstrument is provided, the payment is made from the saved payment instrument specified. Alternatively, if paymentDetails is specified, the payment is made from the card details specified.", "tags": [ "payments" ], "operationId": "redeemReceivecode", "parameters": [ { "name": "body", "in":"body", "description": "Pay a stored merchant to the account defined by a receivecode. If payerInstrument is provided, the payment is made from the saved payment instrument specified. Alternatively, if paymentDetails is specified, the payment is made from the card details specified.", "required": true, "schema": { "$ref": "#/definitions/redeem-receivecode-params" } } ], "responses": { "201": { "description": "Successfully received payment from receivecode payment instrument.", "schema": { "$ref": "#/definitions/TransactionSucceededInfo" } }, "400": { "$ref": "#/responses/badParameterError" }, "401": { "description": "Invalid key", "schema": { "$ref": "#/definitions/ErrorInfo" } }, "default": { "$ref": "#/responses/GeneralError" } } } } }, "definitions": { "worldpay-params": { "type": "object", "properties": { "paymentInstrument": { "$ref": "#/definitions/payment-instrument-params" }, "payee": { "$ref": "#/definitions/payee-params" }, "amount": { "$ref": "#/definitions/amount-params" }, "transactionDetails": { "$ref": "#/definitions/worldpay-transaction-details-params" } }, "required": [ "paymentInstrument", "payee", "amount", "transactionDetails" ] }, "payment-instrument-params": { "type": "object", "properties": { "payer": { "$ref": "#/definitions/payer" }, "card": { "$ref": "#/definitions/card-details-params" } }, "required": [ "payer", "card" ] }, "payee-params": { "type": "object", "properties": { "worldpay": { "type": "object", "properties": { "receivingAccountServiceKey": { "$ref": "#/definitions/worldpay-service-key" } }, "required": [ "receivingAccountServiceKey" ] } }, "required": [ "worldpay" ] }, "amount-params": { "type": "object", "properties": { "value": { "$ref": "#/definitions/total-amount" } }, "required": [ "value" ] }, "amount-value-currency-params": { "type": "object", "properties": { "value": { "$ref": "#/definitions/total-amount" }, "currency": { "$ref": "#/definitions/currency" } }, "required": [ "value" , "currency"] }, "worldpay-transaction-details-params": { "type": "object", "properties": { "worldpay": { "type": "object", "properties": { "orderDescription": {"$ref": "#/definitions/order-description"} }, "required": [ "orderDescription" ] } }, "required": [ "worldpay" ] }, "transaction-details-params": { "type": "object", "properties": { "orderDescription": {"$ref": "#/definitions/order-description"} }, "required": [ "orderDescription" ] }, "transaction-details-stored-card": { "type": "object", "properties": { "paymentInstrument": {"$ref": "#/definitions/payment-instrument-data"}, "payee": {"$ref": "#/definitions/payee-params"}, "amount": {"$ref": "#/definitions/amount-params"}, "transactionDetails": {"$ref": "#/definitions/worldpay-transaction-details-params"} }, "required": [ "paymentInstrument", "payee", "amount", "transactionDetails" ] }, "transaction-details-stored-merchant": { "type": "object", "properties": { "paymentInstrument": {"$ref": "#/definitions/payment-instrument-params"}, "receiveInstrument": {"$ref": "#/definitions/instrument-ref-data"}, "amount": {"$ref": "#/definitions/amount-params"}, "transactionDetails": {"$ref": "#/definitions/worldpay-transaction-details-params"} }, "required": [ "paymentInstrument", "receiveInstrument", "amount", "transactionDetails" ] }, "redeem-paycode-params": { "type": "object", "properties": { "paycode": {"$ref": "#/definitions/bridgecodeString"}, "payee": {"$ref": "#/definitions/instrument-id-and-key"}, "amount": {"$ref": "#/definitions/amount-params"}, "transactionDetails": {"$ref": "#/definitions/worldpay-transaction-details-params"} }, "required": [ "paycode", "payee", "amount", "transactionDetails" ] }, "redeem-receivecode-params": { "type": "object", "properties": { "receivecode": {"$ref": "#/definitions/bridgecodeString"}, "payerInstrument": {"$ref": "#/definitions/instrument-id-and-key"}, "paymentDetails": {"$ref": "#/definitions/payment-instrument-params" }, "amount": {"$ref": "#/definitions/amount-params"}, "transactionDetails": {"$ref": "#/definitions/worldpay-transaction-details-params"} }, "required": [ "receivecode", "amount", "transactionDetails" ] }, "create-rtp-params": { "type": "object", "properties": { "payeeInstrument": {"$ref": "#/definitions/instrument-id-and-key"}, "amount": {"$ref": "#/definitions/amount-value-currency-params"}, "counterparty":{ "type": "object", "properties": { "userID": {"$ref": "#/definitions/object-id"} }, "required": ["userID"] }, "transactionDetails": {"$ref": "#/definitions/transaction-details-params"} }, "required": ["payeeInstrument", "amount", "counterparty", "transactionDetails" ] }, "instrument-id-and-key": { "type": "object", "properties": { "ID": {"$ref": "#/definitions/object-id"}, "key": {"$ref": "#/definitions/instrument-decrypt-key"} }, "required": ["ID", "key"] }, "address": { "description": "Postal address of payment party.", "type": "object", "properties": { "address1": { "$ref": "#/definitions/address-line1" }, "address2": { "$ref": "#/definitions/address-line2" }, "address3": { "$ref": "#/definitions/address-line3" }, "town": { "$ref": "#/definitions/town" }, "county": { "$ref": "#/definitions/county" }, "postcode": { "$ref": "#/definitions/postcode" }, "phoneNumber": { "$ref": "#/definitions/phone-number" } }, "required": [ "address1", "town", "postcode" ] }, "payment-instrument-data": { "description": "Data require to use the specified payment instrument", "type": "object", "properties": { "encryptionKey": {"$ref": "#/definitions/instrument-decrypt-key"}, "CV2": {"$ref": "#/definitions/card-CV2"} }, "required": [ "encryptionKey" ] }, "instrument-ref-data": { "description": "Data required to use the specified payment instrument", "type": "object", "properties": { "encryptionKey": { "$ref": "#/definitions/instrument-decrypt-key" } }, "required": [ "encryptionKey" ] }, "payer": { "description": "Details of the paying party.", "type": "object", "properties": { "email": { "allOf": [ {"$ref": "#/definitions/email"}, { "description": "Email of party making payment"} ] }, "firstName": { "allOf": [ {"$ref": "#/definitions/name-field"}, {"example": "John"} ] }, "lastName": { "allOf": [ {"$ref": "#/definitions/name-field"}, {"example": "Doe"} ] } }, "required": [ "email", "firstName", "lastName" ] }, "payment-instrument-no-cv2-params": { "type": "object", "properties": { "payer": { "$ref": "#/definitions/payer" }, "description": { "$ref": "#/definitions/instrument-description" }, "card": { "$ref": "#/definitions/card-details-params-no-cv2" } }, "required": [ "payer", "card" ] }, "worldpay-receiving-account-params": { "type": "object", "properties": { "description": { "$ref": "#/definitions/instrument-description" }, "receivingAccountServiceKey": { "$ref": "#/definitions/worldpay-service-key" } }, "required": [ "receivingAccountServiceKey" ] }, "card-details-params-no-cv2": { "description": "Details of the paying card.", "type": "object", "properties": { "nameOnCard": { "$ref": "#/definitions/full-name-field" }, "PAN": { "$ref": "#/definitions/card-PAN" }, "expiryDate": { "allOf": [ {"$ref": "#/definitions/card-date"}, {"description": "Expiry date (MM-YY) of card making payment"} ] }, "startDate": { "allOf": [ {"$ref": "#/definitions/card-date"}, {"description": "Start date (MM-YY) of card making payment"} ] }, "issueNumber": { "$ref": "#/definitions/issue-number" }, "address": { "$ref": "#/definitions/address" } }, "required": [ "nameOnCard", "PAN", "expiryDate", "address" ] }, "card-details-params": { "description": "Details of the paying card.", "type": "object", "properties": { "nameOnCard": { "$ref": "#/definitions/full-name-field" }, "PAN": { "$ref": "#/definitions/card-PAN" }, "expiryDate": { "allOf": [ {"$ref": "#/definitions/card-date"}, {"description": "Expiry date (MM-YY) of card making payment"} ] }, "startDate": { "allOf": [ {"$ref": "#/definitions/card-date"}, {"description": "Start date (MM-YY) of card making payment"} ] }, "issueNumber": { "$ref": "#/definitions/issue-number" }, "CV2": { "$ref": "#/definitions/card-CV2" }, "address": { "$ref": "#/definitions/address" } }, "required": [ "nameOnCard", "PAN", "expiryDate", "address" ] }, "order-description": { "allOf": [ {"$ref": "#/definitions/general-text"}, { "description": "Order description", "minLength": 1, "example": "2 Calling Birds, 1 Partridge in a Pear tree" } ] }, "address-line1": { "allOf": [ {"$ref": "#/definitions/address-line"}, {"description": "First line of address."}, {"example": "Flat 20"}, {"minLength": 1} ] }, "address-line2": { "allOf": [ {"$ref": "#/definitions/address-line"}, {"description": "Second line of address."}, {"example": "Victoria House"} ] }, "address-line3": { "allOf": [ {"$ref": "#/definitions/address-line"}, {"description": "Third line of address"}, {"example": "15 The Street"} ] }, "town": { "allOf": [ {"$ref": "#/definitions/area-description"}, {"description": "Town name address."}, {"example": "Christchurch"}, {"minLength": 1} ] }, "county": { "allOf": [ {"$ref": "#/definitions/area-description"}, {"description": "County name of address."}, {"example": "Dorset"}, {"minLength": 1} ] }, "email": { "example": "a@b.com", "type": "string", "pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", "x-invalid-pattern": "[^a-zA-Z0-9.%+-.@]", "minLength": 7, "maxLength": 255 }, "name-field": { "description": "Single part of a personal name (no spaces).", "type": "string", "pattern": "^([A-Za-z]*)$", "x-invalid-pattern": "[^A-Za-z]", "minLength": 2, "maxLength": 255, "example": "John" }, "full-name-field": { "description": "All parts of a personal name separated by spaces.", "type": "string", "pattern": "^([A-Za-z ]*)$", "x-invalid-pattern": "[^A-Za-z]", "minLength": 2, "maxLength": 255, "example": "John E Doe" }, "object-id": { "description": "Unique Identifier", "type": "string", "example": "000000000000000000000000", "pattern": "[0-9a-f]{24}", "maxLength": 24, "minLength": 24 }, "instrument-decrypt-key": { "allOf": [ {"$ref": "#/definitions/uuid"}, {"description": "Decryption key required to use instrument."} ] }, "transaction-id": { "allOf": [ {"$ref": "#/definitions/uuid"}, {"description": "ID of transaction."} ] }, "card-PAN": { "description": "PAN (long number) of card.", "type": "string", "pattern": "^[0-9][0-9 ]*[0-9]+$", "minLength": 8, "maxLength": 255, "example": "4444 3333 2222 1111" }, "obfuscated-card-pan": { "description": "Obfuscated PAN (long number) of card.", "type": "string", "pattern": "^[0-9][0-9* ]*[0-9]+$", "minLength": 8, "maxLength": 255, "example": "4*** **** **** *111" }, "total-amount": { "description": "Total amount in pence (100 = £1.00)", "type": "integer" }, "currency": { "description": "Currency code (e.g. GBP)", "type": "string", "enum": ["GBP"], "example": "GBP" }, "card-date": { "example": "01-00", "description": "Date (MM-YY)", "type": "string", "pattern": "^(?:0[1-9]|1[0-2])-[0-9][0-9]$", "x-invalid-pattern": "[^0-9\\-]" }, "postcode": { "description": "Postal code for address.", "type": "string", "pattern": "^([A-Za-z0-9\\- ]*)$", "x-invalid-pattern": "[^a-zA-Z0-9\\- ]", "example": "BH23 6AA", "minLength": 4, "maxLength": 15 }, "issue-number": { "description": "Issue number on the bank card. Only applies to some cards", "type": "integer", "minimum": 0, "maximum": 9999999, "example": 1 }, "card-CV2": { "example":"000", "description": "CVV of bank card", "type": "string", "pattern": "^[0-9]*$", "minLength": 3, "maxLength": 255 }, "worldpay-service-key": { "description": "The Worldpay Service Key format.", "type": "string", "pattern": "^(?:T_S_|T_C_|L_S_|L_C_)[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", "example": "T_S_4db79f58-b8e8-4485-9346-1aafe16ffc57", "x-invalid-pattern": "[^0-9a-f\\-_TLSC]" }, "phone-number": { "description": "Phone number.", "type": "string", "pattern": "^[+]?[0-9 ]+[0-9]$", "minLength": 5, "maxLength": 255, "example": "+44 123 1110000" }, "area-description": { "allOf": [ {"$ref": "#/definitions/general-text"}, {"description": "General area format: town, county and so on."}, {"example": "Dorset"}, {"maxLength": 255} ] }, "address-line": { "allOf": [ {"$ref": "#/definitions/general-text"}, {"description": "General address line."}, {"example": "Dorset"}, {"maxLength": 255}, {"example": "1 Second Street"} ] }, "instrument-description": { "allOf": [ {"$ref": "#/definitions/general-text"}, {"description": "Description of the payment instrument."}, {"example": "BloggsCo Inc. account."}, {"minLength": 1}, {"maxLength": 255} ] }, "payment-instrument-list-item": { "type": "object", "properties": { "cardID": { "$ref": "#/definitions/object-id" }, "description": {"$ref": "#/definitions/instrument-description"}, "obfuscatedCardPAN": {"$ref": "#/definitions/obfuscated-card-pan"} }, "required": ["cardID"] }, "bridgecodeString": { "description": "Bridgecode string. 0-9A-Z except for I, O and Q", "type": "string", "minLength": 5, "maxLength": 10, "pattern": "^([0-9ABCDEFGHJKLMNPRSTUVWXYZ]*)$", "x-invalid-pattern": "[^0-9ABCDEFGHJKLMNPRSTUVWXYZ]", "example": "ABC12" }, "general-text": { "description": "General text with spaces + special chars", "type": "string", "pattern": "^([A-Za-z 0-9'[\\]()@?!\\-/.,_&*:;+=]*)$", "x-invalid-pattern": "[^a-zA-Z0-9'[\\]()@?!\\-/.,_&*:;+=]", "maxLength": 255, "example": "Some Text With Spaces And With'&','*',etc." }, "uuid": { "description": "Unique identifier", "type": "string", "example": "00000000-0000-0000-0000-000000000000", "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", "maxLength": 36, "minLength": 36 }, "sha256": { "description": "A SHA-256 value.", "allOf": [ { "$ref": "#/definitions/lowerCaseHex" }, { "example": "f0a1f0a1f0a1f0a1f0a1f0a1f0a1f0a1f0a1f0a1f0a1f0a1f0a1f0a1f0a1f0a1", "minLength": 64, "maxLength": 64 } ] }, "lowerCaseHex": { "description": "Lower case, hexadecimal string (for hashes etc.)", "type": "string", "pattern": "^([a-f0-9]*)$", "x-invalid-pattern": "[^a-f0-9]" }, "paymentInstrumentList": { "type": "object", "description": "Successful listing", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/payment-instrument-list-item" } } }, "required": ["data"] }, "AddedCardInfo": { "description": "Reference information to use stored card", "type": "object", "properties": { "cardID": {"$ref": "#/definitions/object-id"}, "cardUsageKey": {"$ref": "#/definitions/instrument-decrypt-key"} }, "required": ["cardID", "cardUsageKey"] }, "AddedReceiveAccountInfo": { "allOf": [ {"$ref": "#/definitions/instrument-id-and-key"}, { "description": "Reference information to use stored instrument"} ] }, "TransactionSucceededInfo": { "description": "A payment has been successfully made", "type": "object", "properties": { "transaction": { "description": "Contains the transaction ID", "type": "object", "properties": { "id": { "allOf": [ {"$ref": "#/definitions/uuid"}, { "description": "Transaction Unique Identifier"} ] } }, "required": [ "id" ] } }, "required": ["transaction"] }, "CreatePaycodeSucceededInfo": { "description": "Paycode created successfully.", "type": "object", "properties": { "paycode": {"$ref": "#/definitions/bridgecodeString"} }, "required": ["paycode"] }, "CreateReceivecodeSucceededInfo": { "description": "Receivecode created successfully.", "type": "object", "properties": { "receivecode": {"$ref": "#/definitions/bridgecodeString"} }, "required": ["receivecode"] }, "CreateRTPSucceededInfo": { "description": "RTP created successfully.", "type": "object", "properties": { "requestToPayID": {"$ref": "#/definitions/uuid"} }, "required": ["requestToPayID"] }, "rtpList": { "type": "object", "description": "Successful list", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/uuid" } } }, "required": [ "data" ] }, "badParametersInfo": { "description": "Validation failed", "type": "object", "properties": { "code": { "description": "Error code", "type": "integer", "example": -1 }, "info": { "description": "Text description of the issue", "type": "string", "example": "Unknown Error" }, "response": { "description": "Optional additional information", "type": "object" } }, "required": ["code", "info"], "example": { "code": 1, "info": "Some error" } }, "ErrorInfo": { "description": "More information on the error reason", "type": "object", "properties": { "code": { "description": "Error code", "type": "integer", "example": -1 }, "info": { "description": "Text description of the issue", "type": "string", "example": "Unknown Error" } }, "required": ["code", "info"], "example": { "code": 1, "info": "Some error" } } } }