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 
  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:
        "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:
      - Payment
      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
        "400":
          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:
      description: |
        Initiate a payment, using the payment link
      tags:
      - Payment
      operationId: initiatePayment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitiatePaymentRequestDTO'
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkDTO'
        "400":
          description: Invalid input provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
        "500":
          description: Technical error
          content:
            application/json:
              schema:
                $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
      operationId: initiateRefund
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundRequestDTO'
        required: true
      responses:
        "200":
          description: Succesful operation
          content:
            plain/text: {}
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
        "400":
          description: Total refund amount exceeds original transaction amount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
        "401":
          description: Authentication failure
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OkDTO'
        "403":
          description: Autorisation failure
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OkDTO'

  /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:
            '*/*':
              schema:
                $ref: '#/components/schemas/JwtResponse'
        "401":
          description: Authentication failure
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OkDTO'
  /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:
            '*/*':
              schema:
                $ref: '#/components/schemas/TokenRefreshResponse'
 
  /globadymeGateway/transaction/getPaymentByRequestId:
    get:
      security:
      - Bearer: []
      tags:
      - Payment
      operationId: getPaymentByRequestId
      parameters:
      - name: getPaymentByRequestIdRequestDTO
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/GetPaymentByRequestIdRequestDTO'
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkDTO'


 /globadymeGateway/common/bankscomponents:
  securitySchemes:
    getbearerAuth:
      securitytype: http
     - Bearerscheme: []bearer
     name: tags:JWT
  schemas:
   - PaymentBillingAddressDTO:
      -type: Commonobject
      operationIdproperties:
getBanks        responsesattention:
          "200"type: string
         descriptionemail:
OK           contenttype: string
        city:
  application/json:        type: string
     schema:   familyName:
          type: string
 type: array      givenName:
          itemstype: string
        phoneNumber:
        $ref: '#/components/schemas/BankDTO'

components type: string
 securitySchemes:     bearerAuth:  postalCode:
   type: http      schemetype: bearerstring
     name: JWT   schemasregion:

   BillingAddressDTO:       type: objectstring
      properties:         attentionstreetAddress1:
          type: string
        emailstreetAddress2:
          type: string
        citytitle:
          type: string
    KlarnaSpecDTO:
   familyName:   type: object
      typeproperties:
string         givenNametaxAmount:
          type: stringinteger
        phoneNumberorderItems:
          typeuniqueItems: stringtrue
        postalCode:  type: array
       type: string  items:
      region:           type: string$ref: '#/components/schemas/OrderItemDTO'
         streetAddress1billingAddress:
          type$ref: string'#/components/schemas/BillingAddressDTO'
    OrderItemDTO:
   streetAddress2:   type: object
      typeproperties:
string         titlename:
          type: string
        KlarnaSpecDTOquantity:
          type: integer
   object       propertiesformat: int32
       taxAmount totalAmount:
          type: integernumber
        orderItemsunitPrice:
          uniqueItemstype: truenumber
    RecurrenceDTO:
      type: object
array      properties:
    items:    recurrenceFrequency:
        $ref: '#/components/schemas/OrderItemDTO'
  type: string
      billingAddress:    enum:
      $ref: '#/components/schemas/BillingAddressDTO'   - DAILY
OrderItemDTO:       type: object  - WEEKLY
   properties:       - MONTHLY
name:          - type:QUARTERLY
string         quantity: - YEARLY
        typerecurrenceStatus:
integer          type: string
format: int32         totalAmountenum:
          type:- numberACTIVE
        unitPrice:  - PAUSED
       type: number  - FINISHED
 RecurrenceDTO:       typestartDate:
object          propertiestype: string
       recurrenceFrequency   format: date
         typerecurrenceAmount:
string          type: enum:number
        transactionId:
 - DAILY        type: string
 - WEEKLY      description:
    - MONTHLY     type: string
    - QUARTERLY   id:
       - YEARLY  type: integer
     recurrenceStatus:     format: int32
    typeSepaSpecDTO:
string      type: object
   enum:   properties:
       - ACTIVEiban:
          -type: PAUSEDstring
        emailAddress:
 - FINISHED         startDatetype: string
         typepostalAddress:
string           formattype: datestring
    RequestPaymentRequestDTO:
   recurrenceAmount:   type: object
      typeproperties: number
        transactionIdtransaction:
          type$ref: string'#/components/schemas/RequestPaymentRequestTransactionDTO'
        descriptionpassword:
          type: string
    RequestPaymentRequestTransactionDTO:
   id:   type: object
      typeproperties:
integer           format: int32merchantId:
    SepaSpecDTO:       type: object
 string
    properties:         ibanamount:
          type: string
        emailAddresscurrency:
          type: string
        postalAddresscountry:
          type: string
    RequestPaymentRequestDTO:    description:
  type: object       propertiestype: string
        transactionaccountHolderName:
          $reftype: '#/components/schemas/RequestPaymentRequestTransactionDTO'string
        passwordemailAddress:
          type: string
    RequestPaymentRequestTransactionDTO:    recurrence:
  type: object       properties:$ref: '#/components/schemas/RecurrenceDTO'
        merchantIdklarnaSpec:
          type$ref: string'#/components/schemas/KlarnaSpecDTO'
        amountsepaSpec:
          type$ref: string'#/components/schemas/SepaSpecDTO'
        currencytransactionRecurrenceType:
          type: string
          countryenum:
          type: string- ONETIME
          - description:FIRST
          type:- stringRECURRING
        accountHolderNameredirectUrlSuccess:
          type: string
        emailAddressredirectUrlFailed:
          type: string
        recurrenceredirectUrlAborted:
          $reftype: '#/components/schemas/RecurrenceDTO'string
        klarnaSpecpaymentLink:
          $reftype: '#/components/schemas/KlarnaSpecDTO'boolean
        sepaSpeclinkValidityDays:
          $reftype: '#/components/schemas/SepaSpecDTO' integer
          transactionRecurrenceTypeformat: int32
    OkDTO:
    type: string description: Common Success response
      enumtype: object
      properties:
  - ONETIME     message:
     - FIRST    description: A descriptive message for the consumer
- RECURRING         redirectUrlSuccesstype: string
        details:
type: string         redirectUrlFaileddescription: Key/value pair detailing the message results
    type: string     type: object
  redirectUrlAborted:        additionalProperties:
  type: string
        paymentLink:           type: booleanobject
        linkValidityDays:
          type: integer
          format: int32
    OkDTOErrorDTO:
      description: Common SuccessError response - In case of   type: object
      properties:
        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
   any error.
      type: object
      typeproperties:
string         httpStatusmessage:
          description: The http status code A descriptive error message for the consumer
          type: integerstring
          format: int32
 example: "Incorrect merchant password for merchant: x@yz.com"
        examplecause:
401          detailsdescription: Optional a Technical error
       description: Optional a detailedtype: description, e.g. which field was missingstring
        httpStatus:
      type: string   description: The http status code
   example: Unauthorized      InitiatePaymentRequestDTOtype: integer
     type: object    format: int32
 properties:         encryptedTransactionexample: 401
        details:
type: string         bankdescription: Optional a detailed description, e.g. which field was missing
 type: string        type: paymentMethod:string
          typeexample: Unauthorized string
    RequestPaymentResponseDTOInitiatePaymentRequestDTO:
      type: object
      properties:
        redirectUrlencryptedTransaction:
          type: string
        requestIdpaymentMethod:
          type: string
    RefundRequestDTORequestPaymentResponseDTO:
      type: object
      properties:
        refundIdredirectUrl:
          type: string
        transactionIdrequestId:
          type: string
        merchantId:
   RefundRequestDTO:
      type: string
        description:object
           typeproperties:
string         amountrefundId:
          type: numberstring
    JwtRequest:    transactionId:
  type: object       propertiestype: string
       user merchantId:
          $reftype: '#/components/schemas/User'string
    User:    description:
  type: object       propertiestype: string
       username amount:
          type: stringnumber
    JwtRequest:
   password:   type: object
      typeproperties:
string     JwtResponse:   user:
   type: object       properties:$ref: '#/components/schemas/User'
    User:
   accessToken:   type: object
      typeproperties: string
        tokenTypeusername:
          type: string
        refreshTokenpassword:
          type: string
    JwtResponse:
   userId:   type: object
      typeproperties: string
        rolesaccessToken:
          type: arraystring
          itemstokenType:
 
          type: string
        refreshToken:
   enum:       type: string
     - ROLE_ADMIN  userId:
          - ROLE_CLIENTtype: string
    TokenRefreshRequest:    roles:
  type: object       propertiestype: array
          refreshTokenitems:
            type: string
    TokenRefreshResponse:        typeenum:
  object       properties:   - ROLE_ADMIN
    accessToken:        - ROLE_CLIENT
 type: string  TokenRefreshRequest:
      refreshTokentype: object
         typeproperties:
string         tokenTyperefreshToken:
          type: string
    GetPaymentByRequestIdRequestDTOTokenRefreshResponse:
      type: object
      properties:
        requestIdaccessToken:
          type: string
        passwordrefreshToken:
          type: string
        merchantIdtokenType:
          type: string
    BankDTOGetPaymentByRequestIdRequestDTO:
      type: object
      properties:
        displayNamerequestId:
          type: string
        namepassword:
          type: string
        ibanAbbreviation:
          type: string
        BICmerchantId:
          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
 

...