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.99  
  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
  - url: https://dev.globadyme.com/api
tags:
  - description: Payments
    name: globadyme-gateway
paths:
  /globadymeGateway/transaction/requestPayment:
    post:
      tags:
      - TransactionPayment
      summary: Request a transaction
      description: Request a transaction to obtain a payment link.
      operationId: requestPayment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionRequestDTORequestPaymentRequestDTO'
        required: true
      responses:
        "200":
          description: Succesful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkDTO'
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
        "400":
          description: Property missing from JSON
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
        "500":
          description: Unable to parse JSON or encode transaction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
  /globadymeGateway/transaction/qrcode:
    post:
      description: |
        Request a qrcode image for the payment
      tags:
      - transaction-resourcePayment
      operationId: generateQRCodeImage
      requestBody:
        content:
          application/json:
            schema:
              type: string
        required: true
      responses:
        "200":
          description: OK
          content:
            image/png:
              schema:
                type: array
                items:
                  type: string
                  format: byte
  /globadymeGateway/transaction/initiatePayment:      post"400":
      tags:    description: Invalid input -provided
transaction-resource       operationId: initiatePayment  content:
    requestBody:
        content:
          application/json:
              schema:
                $ref: '#/components/schemas/InitiatePaymentRequestDTO'
        required: true
      responses:ErrorDTO'
        "200404":
          description: Not OKfound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkDTOErrorDTO'
   /globadymeGateway/refundtransaction/initiateRefundinitiatePayment:
    post:
      tagsdescription: |
     - Refunds  Initiate a payment, using the summary:payment Initiatelink
a refund     tags:
 description: Initiate a refund on an- earlierPayment
created and approve transaction       operationId: initiateRefundinitiatePayment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundRequestDTOInitiatePaymentRequestDTO'
        required: true
      responses:
        "200":
          description: Succesful operationOK
          content:
            plain/text: {}application/json:
              schema:
                $ref: '#/components/schemas/OkDTO'
        "404400":
          description: Invalid Notinput foundprovided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
        "400500":
          description: Technical Totalerror
refund amount exceeds original transaction amount     content:
     content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'

  /globadymeGateway/refund/initiateRefund:
    "401"post:
       tags:
  description: Authentication failure  - Refunds
       contentsummary: Initiate a refund
      description: Initiate  '*/*':
      a refund on an earlier created and approve transaction
       schemaoperationId: initiateRefund
      requestBody:
        $refcontent:
'#/components/schemas/OkDTO'          "403":
application/json:
         description: Autorisation failure schema:
         content:     $ref: '#/components/schemas/RefundRequestDTO'
      '*/*'  required: true
      responses:
      schema  "200":
          description: Succesful operation
   $ref: '#/components/schemas/OkDTO'       /api/auth/sign-incontent:
    post:        tagsplain/text: {}
     - jwt-resource   "404":
      operationId: signIn   description: Not found
 requestBody:         content:
            application/json:
              schema:
                $ref: '#/components/schemas/JwtRequestErrorDTO'
        required"400":
true       responses:         "200"description: Total refund amount exceeds original transaction   amount
 description: OK           content:
            '*application/*'json:
              schema:
                $ref: '#/components/schemas/JwtResponseErrorDTO'
  /api/auth/refresh-token:      post"401":
 
    tags:      description: -Authentication jwt-resourcefailure
      operationId: refreshToken   content:
   requestBody:         content'*/*':
          application/json:    schema:
        schema:               $ref: $ref: '#/components/schemas/TokenRefreshRequest'
        required: true
      responses:OkDTO'
        "200403":
          description: Autorisation OKfailure
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TokenRefreshResponseOkDTO'

   /globadymeGatewayapi/transactionauth/getPaymentByRequestIdsign-in:
    getpost:
      securitytags:
      - Bearer: []Authentication
      tagsoperationId: signIn
     - transaction-resourcerequestBody:
      operationId: getPaymentByRequestId content:
     parameters:     application/json:
 - name: getPaymentByRequestIdRequestDTO         inschema:
query          required: true         schema$ref: '#/components/schemas/JwtRequest'
         $refrequired: '#/components/schemas/GetPaymentByRequestIdRequestDTO'true
      responses:
        "200":
          description: OK
          content:
            application'*/json*':
              schema:
                $ref: '#/components/schemas/OkDTOJwtResponse'
   /globadymeGateway/common/banks:     get"401":
      security:    description: Authentication failure
 - Bearer: []       tagscontent:
       - common-resource    '*/*':
  operationId: getBanks       responses:    schema:
    "200":           description $ref: OK'#/components/schemas/OkDTO'
  /api/auth/refresh-token:
    post:
  content:    tags:
      -  application/json:Authentication
      operationId: refreshToken
      schemarequestBody:
          content:
     type: array    application/json:
            itemsschema:
  
               $ref: '#/components/schemas/BankDTOTokenRefreshRequest'
 components:    securitySchemes:   required: true
bearerAuth:      typeresponses:
http        scheme"200":
bearer      name: JWT   schemasdescription: OK
   BillingAddressDTO:       typecontent:
object       properties:     '*/*':
   attention:           typeschema:
 string          email:     $ref: '#/components/schemas/TokenRefreshResponse'
 
  type/globadymeGateway/transaction/getPaymentByRequestId:
string    get:
    city:  security:
      -  typeBearer: string[]
      tags:
 familyName:     - Payment
    type: string operationId: getPaymentByRequestId
      givenNameparameters:
      -    typename: stringgetPaymentByRequestIdRequestDTO
        phoneNumberin: query
         typerequired: stringtrue
        postalCodeschema:
          type$ref: string'#/components/schemas/GetPaymentByRequestIdRequestDTO'
      responses:
 region:       "200":
    type: string     description: OK
  streetAddress1:        content:
  type: string         streetAddress2:application/json:
              typeschema:
string          title:      $ref: '#/components/schemas/OkDTO'

  type/globadymeGateway/common/banks:
string     KlarnaSpecDTOget:
      typesecurity:
object      - propertiesBearer: []
       taxAmounttags:
      - Payment
  type: integer   - Common
    orderItems:  operationId: getBanks
       uniqueItemsresponses:
true           type"200":
array           itemsdescription: OK
          content:
$ref: '#/components/schemas/OrderItemDTO'         billingAddress:  application/json:
        $ref: '#/components/schemas/BillingAddressDTO'     OrderItemDTOschema:
      type: object       properties:  type: array
     name:           typeitems:
string          quantity:        $ref: '#/components/schemas/BankDTO'

typecomponents:
integer  securitySchemes:
    bearerAuth:
   format: int32 type: http
      totalAmountscheme: bearer
     name: JWT
  typeschemas:
number    BillingAddressDTO:
    unitPrice:  type: object
       typeproperties: number
    RecurrenceDTO:    attention:
  type: object       propertiestype: string
        recurrenceFrequencyemail:
          type: string
          enumcity:
          -type: DAILYstring
        familyName:
 - WEEKLY        type: string
 - MONTHLY      givenName:
    - QUARTERLY     type: string
    - YEARLY         recurrenceStatusphoneNumber:
          type: string
          enumpostalCode:
          -type: ACTIVEstring
        region:
 - PAUSED        type: string
 - FINISHED         startDatestreetAddress1:
          type: string
          format: date
        recurrenceAmountstreetAddress2:
          type: numberstring
        transactionIdtitle:
          type: string
    KlarnaSpecDTO:
   description:   type: object
      typeproperties: string
        idtaxAmount:
          type: integer
        orderItems:
    format: int32     SepaSpecDTOuniqueItems: true
     type: object    type: array
 properties:         ibanitems:
          type  $ref: string'#/components/schemas/OrderItemDTO'
        emailAddressbillingAddress:
          type$ref: string'#/components/schemas/BillingAddressDTO'
    OrderItemDTO:
     postalAddress type: object
      properties:
  type: string     TransactionRequestDTOname:
          type: string
 object       propertiesquantity:
         merchantId type: integer
         type format: stringint32
        amounttotalAmount:
          type: stringnumber
        currencyunitPrice:
          type: stringnumber
    RecurrenceDTO:
   country:   type: object
      typeproperties:
string         descriptionrecurrenceFrequency:
          type: string
          accountholderNameenum:
          type:- DAILY
string         emailAddress: - WEEKLY
        type: string - MONTHLY
      transactionRecurrenceType:    - QUARTERLY
     type: string    - YEARLY
   klarnaSpec:     recurrenceStatus:
     $ref: '#/components/schemas/KlarnaSpecDTO'     type: string
          sepaSpecDTOenum:
          - ACTIVE
 $ref: '#/components/schemas/SepaSpecDTO'        - recurrence:PAUSED
          $ref: '#/components/schemas/RecurrenceDTO'- FINISHED
        requestedstartDate:
          type: string
          format: date-time
        requestIdrecurrenceAmount:
          type: stringnumber
        redirectUrlSuccesstransactionId:
          type: string
        redirectUrlFaileddescription:
          type: string
        redirectUrlAbortedid:
          type: integer
string          paymentLinkformat: int32
    SepaSpecDTO:
      type: booleanobject
      properties:
 linkValidityDays:       iban:
   type: integer            formattype: int32string
        linkIdemailAddress:
          type: string
    OkDTO:    postalAddress:
  type: object       propertiestype: string
    RequestPaymentRequestDTO:
   message:   type: object
      typeproperties: string
        detailstransaction:
          type$ref: object'#/components/schemas/RequestPaymentRequestTransactionDTO'
          additionalPropertiespassword:

           type: objectstring
    ErrorDTORequestPaymentRequestTransactionDTO:
      type: object
      properties:
        messagemerchantId:
          type: string
        causeamount:
          type: string
        httpStatuscurrency:
          type: integerstring
        country:
 format: int32         detailstype: string
         typedescription:
string     InitiatePaymentRequestDTO:       type: objectstring
      properties:         encryptedTransactionaccountHolderName:
          type: string
        bankemailAddress:
          type: string
        paymentMethodrecurrence:
          type$ref: string'#/components/schemas/RecurrenceDTO'
    RequestPaymentRequestTransactionDTO:    klarnaSpec:
  type: object       properties:$ref: '#/components/schemas/KlarnaSpecDTO'
        merchantIdsepaSpec:
          type$ref: string'#/components/schemas/SepaSpecDTO'
        amounttransactionRecurrenceType:
          type: string
        currency:  enum:
          - ONETIME
 type: string        - country:FIRST
          type:- stringRECURRING
        descriptionredirectUrlSuccess:
          type: string
        accountHolderNameredirectUrlFailed:
          type: string
        emailAddressredirectUrlAborted:
          type: string
        paymentLink:
          type: boolean
        recurrencelinkValidityDays:
          $reftype: '#/components/schemas/RecurrenceDTO' integer
          klarnaSpecformat: int32
    OkDTO:
     $ref description: '#/components/schemas/KlarnaSpecDTO'
 Common Success response
      sepaSpectype: object
      properties:
    $ref: '#/components/schemas/SepaSpecDTO'    message:
          description: A descriptive message for the consumer
          type: string
        details:
          description: Key/value pair detailing the message results
          type: object
          additionalProperties:
            type: object
    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: "Incorrect merchant password for merchant: x@yz.com"
        cause:
          description: Optional a Technical error
          type: string
        httpStatus:
          transactionRecurrenceTypedescription: The http status code
          type: stringinteger
          enumformat: int32
         - ONETIMEexample: 401
        details:
- FIRST         description: Optional -a RECURRINGdetailed description, e.g. which field was    redirectUrlSuccess:missing
          type: string
          redirectUrlFailedexample: Unauthorized 
    InitiatePaymentRequestDTO:
      type: stringobject
        redirectUrlAbortedproperties:
        encryptedTransaction:
 type: string         paymentLinktype: string
        bank:
type: boolean         linkValidityDaystype: string
         typepaymentMethod:
integer           formattype: int32string
    RequestPaymentResponseDTO:
      type: object
      properties:
        redirectUrl:
          type: string
        requestId:
          type: string
    RefundRequestDTO:
      type: object
      properties:
        refundId:
          type: string
        transactionId:
          type: string
        merchantId:
          type: string
        description:
          type: string
        amount:
          type: number
    JwtRequest:
      type: object
      properties:
        user:
          $ref: '#/components/schemas/User'
    User:
      type: object
      properties:
        username:
          type: string
        password:
          type: string
    JwtResponse:
      type: object
      properties:
        accessToken:
          type: string
        tokenType:
          type: string
        refreshToken:
          type: string
        userId:
          type: string
        roles:
          type: array
          items:
            type: string
            enum:
            - ROLE_ADMIN
            - ROLE_CLIENT
    TokenRefreshRequest:
      type: object
      properties:
        refreshToken:
          type: string
    TokenRefreshResponse:
      type: object
      properties:
        accessToken:
          type: string
        refreshToken:
          type: string
        tokenType:
          type: string
    GetPaymentByRequestIdRequestDTO:
      type: object
      properties:
        requestId:
          type: string
        password:
          type: string
        merchantId:
          type: string
    BankDTO:
      type: object
      properties:
        displayName:
          type: string
        name:
          type: string
        ibanAbbreviation:
          type: string
        BIC:
          type: string
    PaymentMethodDTO:
      type: object
      properties:
        name:
          type: string
        displayName:
          type: string
        hasRecurring:
          type: boolean
        countries:
          uniqueItems: true
          type: array
          items:
            type: string
        overrideCountry:
          type: boolean
    TransactionSummaryDTO:
      type: object
      properties:
        id:
          type: string
        created:
          type: string
          format: date-time
        status:
          type: string
        amount:
          type: number
        currency:
          type: string
        country:
          type: string
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethodDTO'
        bank:
          $ref: '#/components/schemas/BankDTO'
        description:
          type: string
        iban:
          type: string
        accountholderName:
          type: string
        transactionRecurrenceType:
          type: string
        failReason:
          type: string
        emailAddress:
          type: string
        linkId:
          type: string
    GetPaymentByRequestIdResponseTransactionDTO:
      type: object
      properties:
        id:
          type: string
        created:
          type: string
          format: date-time
        status:
          type: string
        amount:
          type: number
        currency:
          type: string
        country:
          type: string
        paymentMethod:
          type: string
        accountholderName:
          type: string
        requestId:
          type: string