openapi: 3.2.0 info: description: Javascript client to remove the PCI burden when taking payments online title: Connect-E Development Environment Access Token API version: 1.0.0 servers: - url: https://e.test.connect.paymentsense.cloud tags: - name: Access Token paths: /v1/access-tokens: post: description: Create a one time use access token to make a payment. tags: - Access Token operationId: /v1/access-tokens responses: '200': description: Access Token content: application/json: schema: $ref: '#/components/schemas/accessToken' '400': description: Bad Request - The request has failed validation by our servers. '401': description: Unauthorized - There is an issue authenticating the request. '500': description: Internal Server Error - An error has occured while processing the request. requestBody: $ref: '#/components/requestBodies/accessTokenRequest' security: - jwt: [] components: requestBodies: accessTokenRequest: content: application/json: schema: $ref: '#/components/schemas/accessTokenRequest' description: Details of the Payment to be made required: true schemas: address: type: object properties: address1: type: string example: 1 Test Street description: Line 1 of the address. address2: type: string description: Line 2 of the address. address3: type: string description: Line 3 of the address. address4: type: string description: Line 4 of the address. city: type: string example: London description: City of the address. state: type: string example: Greater London description: State of the address. postcode: type: string example: TR14 8PA description: postcode of the address. countryCode: type: string example: '826' description: CountryCode of the address. shippingDetails: type: object properties: name: type: string address: $ref: '#/components/schemas/address' accessToken: properties: id: type: string readOnly: true description: Id to track the payment. example: 5f1tYtm-I5X_fB4lxkD7vQqtHGCykdguffB9GWySCr73qtAnz-g_3KQqxxAQVUyViMgmGbplcYVraRnYz7ro_5PkbD64WIalEgY788Q1yNbYTIIXmD6t expiresAt: type: integer readOnly: true description: UTC timestamp when this token will expire (Number of seconds since Jan 01 1970. (UTC)) example: 1540457361 accessTokenRequest: type: object properties: merchantUrl: type: string example: MERCHANT_URL description: The URL of the merchant's website used ensure the correct JWT is used. This needs to match what it provided when setting up an account currencyCode: type: string pattern: ^\d\d\d$ description: The three digit ISO- 4217 currency code for the currency. eg 826 for the United Kingdom example: '826' amount: type: string pattern: ^\d+$ description: The amount in the minor unit e.g. '100' for 1.00 GBP example: '100' transactionType: type: string enum: - SALE - REFUND - PREAUTH - COLLECTION - REFUND - VOID pattern: ^(SALE)|(REFUND)|(PREAUTH)|(COLLECTION)|(REFUND)|(VOID)$ description: The type of transaction to be processed. If making a web payment only SALE and PREAUTH are supported. If making a cross reference payment only COLLECTION, REFUND, VOID, PREAUTH or SALE are supported example: SALE transactionSource: type: string enum: - MOTO - '' pattern: ^(MOTO)|()$ example: '' description: Specify if the source of the transaction is MOTO (via mail or over the phone) orderId: type: string description: A merchant side ID for the order example: ORD00001 merchantTransactionId: type: string description: Merchant generated transaction ID to uniquely identify the transaction. If included must be unique for each access token. example: 09f3fe11-b3fd-4866-b759-5b4ddee63c85 orderDescription: type: string example: Example description. userAgent: type: string description: Not supported for cross reference transactions. userEmailAddress: type: string format: email example: user@exmaple.com description: Not supported for cross reference transactions. userPhoneNumber: type: string example: '55512345' description: Not supported for cross reference transactions. userIpAddress: type: string example: 192.168.0.0.1 description: Not supported for cross reference transactions. userAddress1: type: string example: 1 Example st description: If any address field is provided for a cross reference transaction all address fields will be overridden. userAddress2: type: string example: Angel description: If any address field is provided for a cross reference transaction all address fields will be overridden. userAddress3: type: string description: If any address field is provided for a cross reference transaction all address fields will be overridden. userAddress4: type: string description: If any address field is provided for a cross reference transaction all address fields will be overridden. userCity: type: string example: London description: If any address field is provided for a cross reference transaction all address fields will be overridden. userState: type: string description: If any address field is provided for a cross reference transaction all address fields will be overridden. userPostcode: type: string example: N19PS description: If any address field is provided for a cross reference transaction all address fields will be overridden. userCountryCode: type: string pattern: ^(\d\d\d)|()$ example: '826' description: If any address field is provided for a cross reference transaction all address fields will be overridden. shippingDetails: $ref: '#/components/schemas/shippingDetails' newTransaction: type: boolean example: false description: Treat the transaction as a new transaction. Default is false and is only supported by cross reference transactions. crossReference: type: string example: 1234567890ABC description: The cross reference from a previous transaction to be used with customer present recurring transactions. webHookUrl: type: string example: https://www.example.com/order/1234/webhook description: Url to be called once the transaction is complete. metaData: type: object description: String key value pairs to associate with the transaction. Will be passed back on the Payment Details API. Not used in processing. additionalProperties: type: string example: item: t-shirt tax: '123.00' waitPreExecute: type: boolean example: true description: Pause the transaction before the payment is executed, after any payer authentication (such as 3DS) has been completed. customerId: type: string example: cust_test description: Customer Id used to enable save payment method feature. required: - currencyCode - transactionType - amount - orderId - merchantUrl securitySchemes: api_key: type: apiKey in: header name: Authorization access_token: type: apiKey in: header name: Authorization description: This authorization is deprecated and only used on the POST /v1/cross-reference-payments endpoint. Please only use the api_key for new integrations. jwt: type: http scheme: bearer bearerFormat: JWT