Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Swagger integration
openapi: 3.0.3
info:
  title: Globadyme-gateway
  version: v0.999 9999
  description:
    The Globadyme Gateway API facilitates Global Payment acceptance for businesses, enabling them to seamlessly process
    transactions across various Payment methods and currencies on a worldwide scale.  
  contact:
    email: onboarding@globadyme.com
    name: Globadyme
    url: https://globadyme.com/wp-content/uploads/2024/04/Globadyme-Integration-Guide.pdf
servers:
  - url: https://sandbox.globadyme.com/api
tags:
  - description: Payments 
    name: globadyme-gateway-api
paths:
  /globadymeGateway/transaction/requestPayment:
    post:
      tags:
      - Payment
      summary: Request a transaction
      description: Request a transaction to obtain a payment link.
      operationId: requestPayment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestPaymentRequestDTO'
        required: true

     responses:   description:      "200":
          description: Succesful operation
          content"The body must always contain the transaction and password."
      responses:
            application/json"200":
              schemadescription: |
               $ref: '#/components/schemas/OkDTO'Succesful operation<br/>
        "404":    The response contains the redirect URL and description:a Notunique foundrequestId.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTOOkDTO'
        "400":      examples:
    description: Property missing from JSON           contentpayment:
            application/json:      summary: Request a payment
     schema:             value: |
  $ref: '#/components/schemas/ErrorDTO'         "500":        {
  description: Unable to parse JSON or encode transaction.           content:  "message": "OK",
         application/json:               schema"details": {
               $ref: '#/components/schemas/ErrorDTO'   /globadymeGateway/transaction/qrcode:     post"requestId": "623277d0-464b-4e72-8632-2b9a284c699d",
     description: |         Request a qrcode image for the payment       tags:
      - Payment"redirectUrl": "https://localhost:8028/pay?data=0f628643a49a71ce...1d023822ec5f02f2587057fe"
         operationId: generateQRCodeImage       requestBody:     }
   content:           application/json:      }

     schema:           paymentLink:
   type: string         required: true    summary: Request a responses:payment link
       "200":           descriptionvalue: |
OK           content:         {
   image/png:               schema:    "message": "OK",
           type: array          "details": {
     items:                   type"requestId": string"129294ac-ec36-4155-addd-697be68ec8aa",
                  format: byte         "400redirectUrl":      "https://localhost:8028/api/link?id=BH3IiBlBN2XjaqWR"
    description: Invalid input provided           content:    }
        application/json:            }
  schema:                 $ref: '#/components/schemas/ErrorDTO'
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
  /globadymeGateway/transaction/initiatePayment:     post:       descriptionexamples:
|         Initiate a payment, using the payment link   UNKNOWN:
   tags:       - Payment       operationIdsummary: initiatePaymentWhenever the given merchant is   requestBody:unknown
        content:           application/jsonvalue: |
           schema:         {
     $ref: '#/components/schemas/InitiatePaymentRequestDTO'         required: true       responses"message": "Merchant not found with     "200":id 7699cab7-2dfa-4981-9c90-0d0c93c801ac",
          description: OK           content"httpStatus": 404,
           application/json:           "details": "Not Found"
  schema:                 $ref: '#/components/schemas/OkDTO' }
        "400401":
          description: Invalid inputUnauthorized
provided           content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
        "500":       examples:
   description: Technical error           contentpasswd:
            application/json:      summary: Wrong password provided
     schema:             value: |
  $ref: '#/components/schemas/ErrorDTO'    /globadymeGateway/refund/initiateRefund:     post:       tags: {
     - Refunds       summary: Initiate a refund       description: Initiate a refund on an earlier created and approve transaction"message": "Incorrect merchant password for merchant: x@yz.com",
               operationId: initiateRefund       requestBody"httpStatus": 401,
       content:           application/json:    "details": "Unauthorized"
       schema:             }
  $ref: '#/components/schemas/RefundRequestDTO'         required: true       responses:
        "200400":
          description: Succesful>-
operation           content: Bad Request
          plain/text: {} Property wrong or missing from JSON, for example "404":UUID string too large.
       description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
        "400":      examples: 
    description: Total refund amount exceeds original transaction amount     UUID:
     content:             application/jsonsummary: Wrong UUID provided
           schema:       value: |
         $ref: '#/components/schemas/ErrorDTO'         "401": {
         description: Authentication failure           content"message": "UUID string too large",
        '*/*':               schema"cause": "UUID string too large",
            $ref: '#/components/schemas/OkDTO'         "403httpStatus": 400,
         description: Autorisation failure           content"details": "/globadymeGateway/transaction/requestPayment"
           '*/*':         }

    schema:             JSON:
   $ref: '#/components/schemas/OkDTO'    /api/auth/sign-in:     post:       tagssummary: Invalid JSON provided
   - Authentication       operationId: signIn       requestBodyvalue: |
       content:           application/json:  {
          schema:            "message": "JSON parse $referror: Unexpected character '#/components/schemas/JwtRequest('}' (code 125)): was expecting double-quote to start field required:name",
true       responses:         "200":      "cause": "JSON parse   descriptionerror: OKUnexpected character          content:
('}' (code 125)): was expecting double-quote to start field name",
           '*/*':           "httpStatus": 400,
     schema:                 $ref"details": '#"/componentsglobadymeGateway/schemas/JwtResponse'transaction/requestPayment"
           "401":         }
 description: Authentication failure           content:    
        '*/*'"405":
          $ref: '#/components/responses/methodNotSupported'
  schema:      "406":
          $ref: '#/components/schemasresponses/OkDTOnotAcceptable'
  /api/auth/refresh-token:      post"415":

     tags:       - Authentication$ref: '#/components/responses/unsupportedMediaType'  
     operationId: refreshToken  "429":
    requestBody:      $ref: '#/components/responses/tooManyRequests'  content:           application/json:   
         schema"500":

             $ref: '#/components/schemasresponses/TokenRefreshRequestunexpectedError'
  /globadymeGateway/transaction/qrcode:
    post:
required: true     description: Request responses:a qrcode image for the payment
   "200":   security:
      - descriptionBearer: OK[]
      tags:
   content:   - Payment
      operationId: generateQRCodeImage
'*/*':      requestBody:
        schemacontent:
          application/json:
      $ref: '#/components/schemas/TokenRefreshResponse'     /globadymeGateway/transaction/getPaymentByRequestIdschema:
    get:          securitytype: string
     - Bearer: []     example: |
tags:       - Payment      id=BVvBVE41t7t1YnBQ
operationId: getPaymentByRequestId       parametersrequired: true
     - nameresponses:
getPaymentByRequestIdRequestDTO        "200":
in: query         requireddescription: OK
 true         schemacontent:
          $ref: '#/components/schemas/GetPaymentByRequestIdRequestDTO'  image/png:
           responses:   schema:
     "200":           description: OK
      Return a generated qr-code image for the payment as a binary string
   content:             application/json:type: array
                schemaitems:
                 $ref type: '#/components/schemas/OkDTO'string
  components:   securitySchemes:     bearerAuth:      type: http format: byte
   scheme: bearer    "400":
 name: JWT   schemas:     BillingAddressDTOdescription: Invalid input provided
   type: object       propertiescontent:
        attention:      application/json:
    type: string         emailschema:
          type:  string    $ref: '#/components/schemas/ErrorDTO'
   city:           typeexamples: string
        familyName:        UUID:
  type: string         givenName:      summary: Wrong UUID provided
 type: string         phoneNumber:       value: |
  type: string         postalCode:        {
  type: string         region:           type:"message": "UUID string too large",
       streetAddress1:           type: string   "cause": "UUID string too large",
 streetAddress2:           type: string         title"httpStatus": 400,
         type: string     KlarnaSpecDTO:       type: object
 "details": "/globadymeGateway/transaction/requestPayment"
    properties:         taxAmount:       }

  type: integer         orderItems:    JSON:
      uniqueItems: true           typesummary: arrayInvalid JSON provided
        items:          value: |
 $ref: '#/components/schemas/OrderItemDTO'         billingAddress:         {
 $ref: '#/components/schemas/BillingAddressDTO'     OrderItemDTO:       type: object       properties"message": "JSON parse error: Unexpected character ('}'   name(code 125)): was expecting double-quote to start field name",
   type: string         quantity:         "cause": "JSON parse typeerror: integer
          format: int32Unexpected character ('}' (code 125)): was expecting double-quote to start field name",
           totalAmount:           type: number"httpStatus": 400,
           unitPrice:           type"details": number"/globadymeGateway/transaction/requestPayment"
     RecurrenceDTO:       type: object       properties:}
        recurrenceFrequency"404":
          typedescription: Not stringfound
          enumcontent:
          - DAILY application/json:
         - WEEKLY    schema:
      - MONTHLY         $ref:  - QUARTERLY'#/components/schemas/ErrorDTO'
            - YEARLY examples:
       recurrenceStatus:           typeUNKNOWN:
string           enum:       summary: Whenever the given -merchant ACTIVEis unknown
         - PAUSED        value: |
 - FINISHED         startDate:          {
type: string           format: date         recurrenceAmount"message": "Merchant not found with id 7699cab7-2dfa-4981-9c90-0d0c93c801ac",
    type: number         transactionId:        "httpStatus": 404,
 type: string         description:           type"details": string"Not Found"
        id:           type: integer}
          format: int32     SepaSpecDTO:  
        type"405":
 object         properties$ref: '#/components/responses/methodNotSupported'
        iban"406":
          type$ref: string'#/components/responses/notAcceptable'
        emailAddress"415":
          type: string$ref: '#/components/responses/unsupportedMediaType'  
        postalAddress"429":
          type$ref: string'#/components/responses/tooManyRequests'     RequestPaymentRequestDTO:       type: object    
  properties:         transaction"500":
          $ref: '#/components/schemasresponses/RequestPaymentRequestTransactionDTOunexpectedError'
        password:  
  /globadymeGateway/transaction/initiatePayment:
    post:
type: string     RequestPaymentRequestTransactionDTOdescription: |
     type: object  Initiate a payment, using the properties:payment link
       merchantIdtags:
      - Payment
  type: string   operationId: initiatePayment
    amount:  requestBody:
        typecontent:
string          currencyapplication/json:
          type: string  schema:
              country$ref: '#/components/schemas/InitiatePaymentRequestDTO'
            typeexample: string|
        description:       {
   type: string         accountHolderName:   "encryptedTransaction": "0f628643a49a71cecb16d1a604008...2ecd4b64724abda392abd80f8388bae1b",
      type: string         emailAddress"paymentMethod": "IDEAL"
         type:  string   }
     recurrence:   required: true
      $refresponses:
'#/components/schemas/RecurrenceDTO'         klarnaSpec"200":
          $refdescription: '#/components/schemas/KlarnaSpecDTO'OK
          sepaSpeccontent:
          $ref:  '#/components/schemas/SepaSpecDTO'application/json:
        transactionRecurrenceType:      schema:
    type: string           enum$ref: '#/components/schemas/OkDTO'
         - ONETIME    example: |
     - FIRST          {
- RECURRING         redirectUrlSuccess:           type"message": string"payment",
        redirectUrlFailed:           type: string"details": {
         redirectUrlAborted:           type: string"redirectUrl": "https://r3.girogate.de/ti/simideal?tx=140250159191&rs=VT5S...6d231184",
        paymentLink:           type: boolean "id": "d549d14f-2827-4579-8a03-57077bc7cda7"
        linkValidityDays:          }
type: integer           format: int32   }
 OkDTO:       description"400":
 Common Success response       typedescription: objectInvalid input provided
    properties:      content:
  message:           description: A descriptive message for the consumerapplication/json:
              typeschema:
string         details:       $ref: '#/components/schemas/ErrorDTO'
  description: Key/value pair detailing the message results      examples:
    type: object           additionalPropertiesexpired:
            type: object     ErrorDTOsummary: The request for this payment has description:expired
Common Error response - In case of any error.       type   value: object|
      properties:         message:     {
     description: A descriptive error message for the consumer           type"message": string"The requested payment has expired",
       example: "Incorrect merchant password for merchant: x@yz.com"         cause:"httpStatus": 400,
          description:  Optional a Technical error       "details": "Bad Request"
 type: string         httpStatus:         }
 description: The http status code           typepaymentMethod:
integer                  formatsummary: No int32payment method provided
        example: 401         detailsvalue: |
         description: Optional a detailed description, e.g. which field was missing
          type: string      {
                      "message": "Missing or invalid payment method provided!",
                      "httpStatus": 400,
                      "details": "Bad Request"
                    }
        
        "405":
          $ref: '#/components/responses/methodNotSupported'
        "406":
          $ref: '#/components/responses/notAcceptable'
        "415":
          $ref: '#/components/responses/unsupportedMediaType'                  
        "500":
          $ref: '#/components/responses/unexpectedError'

  /globadymeGateway/refund/initiateRefund:
    post:
      tags:
      - Refunds
      summary: Initiate a refund
      description: Initiate a refund on an earlier created and approved transaction
      operationId: initiateRefund
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundRequestDTO'
            example: |
              {
                "transactionId": "9378c831-dac4-4169-9210-065a70ef7b13",
                "merchantId": "d549d14f-2827-4579-8a03-57077bc7cda7",
                "description": "Return this article",
                "amount": 123.45
              }

        required: true
      responses:
        "200":
          description: Succesful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkDTO'
              examples:
                success:
                  summary: refund succeeded
                  value: |
                    {
                      "message": "refund",
                      "details": {
                        "status": "SUCCEEDED"
                      }
                    }

        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
              examples:
                merchant:
                  summary: merchant not found
                  value: |
                    {
                      "message": "Refund no merchant found for merchantId",
                      "httpStatus": 404,
                      "details": "Not Found"
                    }
                transaction:
                  summary: transaction not found
                  value: |
                    {
                      "message": "Refund no transaction found for transactionId",
                      "httpStatus": 404,
                      "details": "Not Found"
                    }  
                exceeded:
                  summary: total amount exceeds original amount
                  value: |
                    {
                      "message": "Total refund amount: 200.12 exceeds original transactionId amount: 123.00",
                      "httpStatus": 400,
                      "details": "Bad Request"
                    }

        "400":
          description: Invalid input provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
              examples:
                desc:
                  summary: description empty
                  value: |
                    {
                      "message": "Refund description is empty.",
                      "httpStatus": 400,
                      "details": "Bad Request"
                    }
                merchant:
                  summary: merchant empty
                  value: |
                    {
                      "message": "Refund merchantId is empty.",
                      "httpStatus": 400,
                      "details": "Bad Request"
                    }
                transaction:
                  summary: transaction empty
                  value: |
                    {
                      "message": "Refund transactionId is empty.",
                      "httpStatus": 400,
                      "details": "Bad Request"
                    }
                amount:
                  summary: amount empty or negative
                  value: |
                    {
                      "message": "Refund amount is empty or less then 0.00.",
                      "httpStatus": 400,
                      "details": "Bad Request"
                    }

        "401":
          $ref: '#/components/responses/authenticationFailure'
        "405":
          $ref: '#/components/responses/methodNotSupported'
        "406":
          $ref: '#/components/responses/notAcceptable'
        "415":
          $ref: '#/components/responses/unsupportedMediaType'                  
        "500":
          $ref: '#/components/responses/unexpectedError'
          
  /api/auth/sign-in:
    post:
      tags:
      - Authentication
      operationId: signIn
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JwtRequest'
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JwtResponse'
        "401":
          description: Authentication failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
              example: |
                {
                  "message": "Could not sign in. User/password combination wrong",
                  "httpStatus": 401,
                  "details": "Unauthorized"
                }

        "405":
          $ref: '#/components/responses/methodNotSupported'
        "406":
          $ref: '#/components/responses/notAcceptable'
        "415":
          $ref: '#/components/responses/unsupportedMediaType'                  
        "500":
          $ref: '#/components/responses/unexpectedError'
                 
  /api/auth/refresh-token:
    post:
      tags:
      - Authentication
      operationId: refreshToken
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRefreshRequest'
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenRefreshResponse'
                         
        "405":
          $ref: '#/components/responses/methodNotSupported'
        "406":
          $ref: '#/components/responses/notAcceptable'
        "415":
          $ref: '#/components/responses/unsupportedMediaType'                  
        "500":
          $ref: '#/components/responses/unexpectedError'
 
  /globadymeGateway/transaction/getPaymentByRequestId:
    get:
      tags:
      - Payment
      operationId: getPaymentByRequestId
      parameters:
      - name: getPaymentByRequestIdRequestDTO
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/GetPaymentByRequestIdRequestDTO'
        example: |
          {
            "requestId": "04f5faf0-e46c-4a8e-82e6-d69c1ab434bc",
            "password": "merchantPassword",
            "merchantId": "9378c831-dac4-4169-9210-065a70ef7b13"
          }
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkDTO'
              examples:
                found:
                  summary: items found
                  value: |
                    {
                      "message": "PaymentByRequestId",
                      "details": {
                        "requestId": "04f5faf0-e46c-4a8e-82e6-d69c1ab434ac",
                        "transactions": [
                          {
                            "id": "9378c831-dac4-4169-9210-065a70ef7b13",
                            "created": "2024-06-17T14:24:31.801722Z",
                            "status": "PENDING",
                            "amount": 368.00,
                            "currency": "EUR",
                            "country": "NL",
                            "paymentMethod": "iDEAL",
                            "accountholderName": "Oebele de Rekeninghouder",
                            "requestId": "04f5faf0-e46c-4a8e-82e6-d69c1ab434ac"
                          }
                        ]
                       }
                     }
                  none:
                    summary: none found
                    value: |
                      {
                        "message": "PaymentByRequestId",
                        "details": {
                          "requestId": "04f5faf0-e46c-4a8e-82e6-d69c1ab434bc"
                        }
                      }

        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
              examples:
                passwd:
                  summary: Wrong password provided
                  value: |
                    {
                      "message": "Incorrect merchant password for merchant: x@yz.com",
                      "httpStatus": 401,
                      "details": "Unauthorized"
                    }

        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
              examples:
                UNKNOWN:
                  summary: Whenever the given merchant is unknown
                  value: |
                    {
                      "message": "Merchant not found with id 7699cab7-2dfa-4981-9c90-0d0c93c801ac",
                      "httpStatus": 404,
                      "details": "Not Found"
                    }

        "405":
          $ref: '#/components/responses/methodNotSupported'
        "406":
          $ref: '#/components/responses/notAcceptable'
        "415":
          $ref: '#/components/responses/unsupportedMediaType'                  
        "500":
          $ref: '#/components/responses/unexpectedError'
          
  /globadymeGateway/common/banks:
    get:
      security:
      - Bearer: []
      tags:
      - Payment
      - Common
      operationId: getBanks
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BankDTO'
              example: |
                [
                  {
                    "displayName": "Nationale Nederlanden",
                    "name": "NN",
                    "ibanAbbreviation": "NNBA",
                    "BIC": "NNBANL2G"
                  },
                  {
                    "displayName": "ING",
                    "name": "ING",
                    "ibanAbbreviation": "INGB",
                    "BIC": "INGBNL2A"
                  }
                ]

        "401":
          $ref: '#/components/responses/authenticationFailure'
        "405":
          $ref: '#/components/responses/methodNotSupported'
        "406":
          $ref: '#/components/responses/notAcceptable'
        "415":
          $ref: '#/components/responses/unsupportedMediaType'                  
        "500":
          $ref: '#/components/responses/unexpectedError'
components:
  securitySchemes:
    bearerAuth:
     type: http
     scheme: bearer
     name: JWT
     
  responses:
    authenticationFailure:
      description: Authentication failure
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDTO'
          example: |
            {
              "message": "Expired or invalid JWT token",
              "httpStatus": 401,
              "details": "Unauthorized"
            }
                       
    methodNotSupported:
      description: Method not supported.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDTO'
          example: |
            {
              "message": "Request method 'GET' is not supported",
              "cause": "Request method 'GET' is not supported",
              "httpStatus": 405,
              "details": "/globadymeGateway/transaction/requestPayment"
            }

    notAcceptable:
      description: Not acceptable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDTO'
  
    unsupportedMediaType:
      description: Media type not supported.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDTO'
          example: |
            {
              "message": "Content-Type 'text/plain;charset=UTF-8' is not supported",
              "cause": "Content-Type 'text/plain;charset=UTF-8' is not supported",
              "httpStatus": 415,
              "details": "/globadymeGateway/transaction/requestPayment"
            }

    tooManyRequests:
      description: Too many requests.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDTO'
          example: |
            {
              "message": "To many request at endpoint /globadymeGateway/transaction/requestPayment from IP 127.0.0.1! Please try again after 60000 milliseconds!",
              "cause": "To many request at endpoint /globadymeGateway/transaction/requestPayment from IP 127.0.0.1! Please try again after 60000 milliseconds!",
              "httpStatus": 429,
              "details": "/globadymeGateway/transaction/requestPayment"
            }

    unexpectedError:
      description: Internal Server Error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDTO'
     
  schemas:
    BillingAddressDTO:
      required:
      - attention
      - email
      - city
      - familyName
      - givenName
      - phoneNumber
      - postalCode
      - region
      - streetAddress1
      - title
      type: object
      properties:
        attention:
          description: the attention string, for example the department of the addressee
          type: string
        email:
          description: Customer e-mailaddress
          type: string
          example: 'customer@example.com'
        city:
          type: string
          example: 'Goirle'
        familyName:
          type: string
          example: 'Janssen'
        givenName:
          type: string
          example: 'Piet'
        phoneNumber:
          type: string
          example: '+1234567890'
        postalCode:
          type: string
          example: '1234AB'
        region:
          type: string
          example: 'North-East'
        streetAddress1:
          type: string
          example: 'Kasteelstraat 123'
        streetAddress2:
          type: string
          example: 'Apartment 13'
        title:
          type: string
          example: 'Mr.'
    KlarnaSpecDTO:
      description: In order to be able to process Klarna payments, this field and its sub elements must be filled.
      required:
      - orderItems
      - billingAddress
      type: object
      properties:
        taxAmount:
          type: integer
        orderItems:
          description: |
            A list of the items being ordered. Note that the sum of the totalAmounts must 
            add up to the total transaction amount. If not, the payment request wil be rejected
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/OrderItemDTO'
        billingAddress:
          $ref: '#/components/schemas/BillingAddressDTO'
    OrderItemDTO:
      required:
      - name
      - quantity
      - totalAmount
      - unitPrice
      type: object
      properties:
        name:
          type: string
        quantity:
          type: integer
          format: int32
        totalAmount:
          description: The total amount in cents
          type: number
        unitPrice:
          description: Unit price in cents
          type: number
    RecurrenceDTO:
      type: object
      properties:
        recurrenceFrequency:
          type: string
          enum:
          - DAILY
          - WEEKLY
          - MONTHLY
          - QUARTERLY
          - YEARLY
        recurrenceStatus:
          type: string
          enum:
          - ACTIVE
          - PAUSED
          - FINISHED
        startDate:
          type: string
          format: date
        recurrenceAmount:
          type: number
        transactionId:
          type: string
        description:
          type: string
        id:
          type: integer
          format: int32
    SepaSpecDTO:
      description: Container for SEPA payments.
      required:
      - iban
      - emailAddress
      - postalAddress
      type: object
      properties:
        iban:
          description: The buyer's IBAN.
          type: string
          example: 'ES9121000418450200051332'
        emailAddress:
          description: The buyer's email address.
          type: string
          example: 'customer@example.com'
        postalAddress:
          description: The buyer's postal address.
          type: string
          example: 'Customerstreet 13, 1234AB Customercity'
    RequestPaymentRequestDTO:
      type: object
      required:
      - transaction
      - password
      properties:
        transaction:
          $ref: '#/components/schemas/RequestPaymentRequestTransactionDTO'
        password:
          type: string
          description: Password to authenticate this merchant
          example: 'MerchantTestPassword'
    RequestPaymentRequestTransactionDTO:
      description: 
        Holds the detail for this payment
      required:
        - merchantId
        - amount
        - currency
        - country
        - description
        - accountHolderName
      type: object
      properties:
        merchantId:
          type: string
          description: UUID to identify this merchant
          example: '7699cab7-2dfa-4981-9c90-0d0c93c801ac'
        amount:
          type: string
          description: An amount for the payment. The decimal separator must be a dot '.'
          example: '123.45'
        currency:
          type: string
          pattern: '[A-Z]{3,3}'
          example: 'EUR'
          description: '3 Letter ISO Currency Code: ISO 4217 code'
        country:
          type: string
          pattern: '[A-Z]{2,2}'
          example: 'NL'
          description: '2 Letter ISO Country Code: ISO 3166 code'
        description:
          type: string
          description: 'A descriptive string for this transaction'
          example: 'Test payment' 
        accountHolderName:
          type: string
          description: 'Name of the account holder'
          example: 'Test account holder'
        emailAddress:
          type: string
          example: 'klant@yourshop.com'
        recurrence:
          $ref: '#/components/schemas/RecurrenceDTO'
        klarnaSpec:
          $ref: '#/components/schemas/KlarnaSpecDTO'
        sepaSpec:
          $ref: '#/components/schemas/SepaSpecDTO'
        transactionRecurrenceType:
          type: string
          enum:
          - ONETIME
          - FIRST
          - RECURRING
          description:
            This will default to ONETIME if not present. For recurring payments, 
            this field needs to be present and filled with FIRST. This will then 
            be the first in a series of recurring payments, also serving as the 
            mandate for future payments. Scheduling and execution of subsequent 
            recurrences are handled by Globadyme according to parameters set in 
            the next field.
        redirectUrlSuccess:
          type: string
          description: Optional specific url to redirect to in case of a successful transaction.
        redirectUrlFailed:
          type: string
          description: Optional specific url to redirect to in case of a failed transaction.
        redirectUrlAborted:
          type: string
          description: Optional specific url to redirect to in case of an aborted transaction.
        paymentLink:
          type: boolean
          description: 
           Flag to choose between a payment link and a one-time or recurring 
           payment. A value of true will return a payment link 
        linkValidityDays:
          type: integer
          format: int32
          description:
            The amount of days the payment link will be valid. Default value is 14.
    OkDTO:
      description: Common Success response
      type: object
      properties:
        message:
          description: A descriptive message for the consumer
          type: string
          example: 'OK'
        details:
          description: Key/value pair detailing the message results
          type: object
          additionalProperties:
            type: object
          example:
            redirectUrl: "https://dev.globadyme.com/pay?data=0f6286...ad990f4"
            requestId: "9694c0c8-d411-4d3d-af08-2b0d21ba9521"
              
    ErrorDTO:
      description: Common Error response - In case of any error.
      type: object
      properties:
        message:
          description: A descriptive error message for the consumer
          type: string
          example: "Error processing encoded transaction"
        cause:
          description: Optional a Technical error
          type: string
        httpStatus:
          description: The http status code
          type: integer
          format: int32
          example: 500
        details:
          description: Optional a detailed description, e.g. which field was missing
          type: string
          example: Internal Server Error 
      example: |
        {
          "message": "Error processing encoded transaction: Unable to deserialise",
          "httpStatus": 500,
          "details": "Internal Server Error"
        }

    InitiatePaymentRequestDTO:
      type: object
      required:
      - encryptedTransaction
      - paymentMethod
      properties:
        encryptedTransaction:
          description: The encrypted transaction as received in the return url from '/globadymeGateway/transaction/requestPayment'
          type: string
        bank:
          description: The name of the bank.
          exampletype: Unauthorizedstring
     InitiatePaymentRequestDTO:     example: 'ING'
type: object       propertiespaymentMethod:
        encryptedTransaction:  description: The payment method as chosen by the consumer.
type: string         paymentMethodtype: string
          typeenum:
 string     RequestPaymentResponseDTO:    - IDEAL
 type: object       properties: - PAYPAL
      redirectUrl:    - KLARNA
     type: string    - CREDITCARD
   requestId:       - EPS
  type: string     RefundRequestDTO:  - GIROPAY
   type: object      - properties:SOFORT
        refundId:  - PAYCONIQ
       type: string  - SEPA
     transactionId:     - BANCONTACT
    typeRefundRequestDTO:
string      description: Object to merchantId:request a   refund
      typerequired:
string      - transactionId
 description:     - merchantId
     type: string- description
      - amount:
      type: object
  type: number   properties:
 JwtRequest:       typerefundId:
object          propertiestype: string
        usertransactionId:
          $reftype: '#/components/schemas/User'string
    User:    merchantId:
  type: object       propertiestype: string
        usernamedescription:
          type: string
        passwordamount:
          type: stringnumber
    JwtResponseJwtRequest:
      typedescription: objectRequest an jwt token to authorise subsequent properties:requests
      required:
 accessToken:     - user
      type: string object
      properties:
        tokenTypeuser:
          type$ref: string
 '#/components/schemas/User'
      refreshTokenexample: |
        {
type: string         userId"user": {
         type: string  "username": "merchant@merchandise.shop",
     roles:       "password": "merchantPassword"
  type: array       }
   items:     }
       typeUser:
string      description: Object to identify a merchant/user
 enum:      required:
      - ROLE_ADMIN
username
           - ROLE_CLIENT
    TokenRefreshRequest:password
      type: object
      properties:
        refreshTokenusername:
          type: string
    TokenRefreshResponse:    password:
  type: object       propertiestype: string
       accessTokenJwtResponse:
      description: Object containing tokens type:to stringauthorise a  merchant/user
     refreshToken:   type: object
      typeproperties: string
        tokenTypeaccessToken:
          type: string
    GetPaymentByRequestIdRequestDTO:    tokenType:
  type: object       propertiestype: string
        requestIdrefreshToken:
          type: string
        passworduserId:
          type: string
        merchantIdroles:
          type: stringarray
    PaymentMethodDTO:       typeitems:
object       properties:     type: string
  name:          enum:
type: string         displayName:  - ROLE_ADMIN
       type: string    - ROLE_MERCHANT
   hasRecurring:         - ROLE_CLIENT
type: boolean         countriesexample: |
         uniqueItems: true  {
        type: array     "accessToken": "eyJhbGciOiJIUzI1NiJ...Bruizs7XwzPRzMBdQoKj2WNAJrZ9XlH8",
    items:          "tokenType": "Bearer",
 type:    string         overrideCountry"refreshToken": "c84e512...1128b62a2",
         type: boolean     TransactionSummaryDTO:"userId": "9694c0c8-d411-4d3d-af08-2b0d21ba9521",
      type: object       properties"roles": [
       id:         "ROLE_MERCHANT",
  type: string         created:    "ROLE_CLIENT"
      type: string       ]
   format: date-time        } status:         
 type: string  TokenRefreshRequest:
      amountdescription: Request a new accessToken
      typerequired:
 number     - refreshToken
  currency:    type: object
     type properties:
string         countryrefreshToken:
          type: string
        paymentMethodexample: |
        {
$ref: '#/components/schemas/PaymentMethodDTO'         description"refreshToken": "refreshToken"
         type: string}
    TokenRefreshResponse:
   iban:   type: object
      typeproperties:
string         accountholderNameaccessToken:
          type: string
        transactionRecurrenceTyperefreshToken:
          type: string
        failReasontokenType:
          type: string
        emailAddressexample: |
        {
type: string         linkId"accessToken": "eyJhbGciOiJIUzI1...Lw4VDWjcPBuN01IQZMIWDAdtLZLNfDdgAIM",
          type"refreshToken": string"78738b...7e085618",
    GetPaymentByRequestIdResponseTransactionDTO:       type"tokenType": object"Bearer"
      properties:  }
      id:
   GetPaymentByRequestIdRequestDTO:
      type: stringobject
        createdproperties:
          typerequestId:
string           formattype: date-timestring
        statuspassword:
          type: string
        amountmerchantId:
          type: numberstring
    BankDTO:
   currency:   type: object
      typeproperties:
string         countrydisplayName:
          type: string
        paymentMethodname:
          type: string
        accountholderNameibanAbbreviation:
          type: string
        requestIdBIC:
          type: string
 

Download

View file
nameglobadyme-gateway-api.yaml
specification.

...