MTN Group payment methods API

The payment methods API from MTN Group — 2 operation(s) for payment methods.

Operations 3

GET /paymentMethod Retrieve a list of payment methods #
DELETE /paymentMethod/{paymentMethodId} Delete a payment method #
PUT /paymentMethod/{paymentMethodId} Update a payment method #

Documentation

📖
Documentation
https://developers.mtn.com/products/account-decisioning
📖
APIReference
https://developers.mtn.com/products/account-decisioning
📖
Documentation
https://developers.mtn.com/products/tmf-customer-bill-management
📖
APIReference
https://developers.mtn.com/products/tmf-customer-bill-management
📖
Documentation
https://developers.mtn.com/products/mtn-customer-loans-api-v1
📖
APIReference
https://developers.mtn.com/products/mtn-customer-loans-api-v1
📖
Documentation
https://developers.mtn.com/products/subscriber-details
📖
APIReference
https://developers.mtn.com/products/subscriber-details
📖
Documentation
https://developers.mtn.com/products/subscriber-type
📖
APIReference
https://developers.mtn.com/products/subscriber-type
📖
Documentation
https://developers.mtn.com/products/provisioning
📖
APIReference
https://developers.mtn.com/products/provisioning
📖
Documentation
https://developers.mtn.com/products/unified-balance-v1
📖
APIReference
https://developers.mtn.com/products/unified-balance-v1
📖
Documentation
https://developers.mtn.com/products/tmf-resourceinventorymanagement-tmf639
📖
APIReference
https://developers.mtn.com/products/tmf-resourceinventorymanagement-tmf639
📖
Documentation
https://developers.mtn.com/products/sales-management
📖
APIReference
https://developers.mtn.com/products/sales-management
📖
Documentation
https://developers.mtn.com/products/service-activation-and-configuration
📖
APIReference
https://developers.mtn.com/products/service-activation-and-configuration
📖
Documentation
https://developers.mtn.com/products/service-ordering
📖
APIReference
https://developers.mtn.com/products/service-ordering
📖
Documentation
https://developers.mtn.com/products/bss-tt-oauth-v1
📖
APIReference
https://developers.mtn.com/products/bss-tt-oauth-v1
📖
Documentation
https://developers.mtn.com/products/balance-management-v1
📖
APIReference
https://developers.mtn.com/products/balance-management-v1
📖
Documentation
https://developers.mtn.com/products/callmeback-v1
📖
APIReference
https://developers.mtn.com/products/callmeback-v1
📖
Documentation
https://developers.mtn.com/products/callmeback-v2
📖
APIReference
https://developers.mtn.com/products/callmeback-v2
📖
Documentation
https://developers.mtn.com/products/rcs-communication
📖
APIReference
https://developers.mtn.com/products/rcs-communication
📖
Documentation
https://developers.mtn.com/products/communication-management-v1
📖
APIReference
https://developers.mtn.com/products/communication-management-v1
📖
Documentation
https://developers.mtn.com/products/tmf681-communication-management
📖
APIReference
https://developers.mtn.com/products/tmf681-communication-management
📖
Documentation
https://developers.mtn.com/products/ayo-preapproval
📖
APIReference
https://developers.mtn.com/products/ayo-preapproval
📖
Documentation
https://developers.mtn.com/products/content-push
📖
APIReference
https://developers.mtn.com/products/content-push
📖
Documentation
https://developers.mtn.com/products/mtn-customer-bill-management
📖
APIReference
https://developers.mtn.com/products/mtn-customer-bill-management
📖
Documentation
https://developers.mtn.com/products/customer-billing-token-v1
📖
APIReference
https://developers.mtn.com/products/customer-billing-token-v1
📖
Documentation
https://developers.mtn.com/products/mtn-nigeria-data-gifting-v1
📖
APIReference
https://developers.mtn.com/products/mtn-nigeria-data-gifting-v1
📖
Documentation
https://developers.mtn.com/products/mtn-nigeria-customer-datashare
📖
APIReference
https://developers.mtn.com/products/mtn-nigeria-customer-datashare
📖
Documentation
https://developers.mtn.com/products/customer-delivery-booking
📖
APIReference
https://developers.mtn.com/products/customer-delivery-booking
📖
Documentation
https://developers.mtn.com/products/customer-identification-v1
📖
APIReference
https://developers.mtn.com/products/customer-identification-v1
📖
Documentation
https://developers.mtn.com/products/kyc-consent
📖
APIReference
https://developers.mtn.com/products/kyc-consent
📖
Documentation
https://developers.mtn.com/products/customer-loyalty-management
📖
APIReference
https://developers.mtn.com/products/customer-loyalty-management
📖
Documentation
https://developers.mtn.com/products/customer-management-coe-za-preprod
📖
APIReference
https://developers.mtn.com/products/customer-management-coe-za-preprod
📖
Documentation
https://developers.mtn.com/products/customer-pin-management-v2
📖
APIReference
https://developers.mtn.com/products/customer-pin-management-v2
📖
Documentation
https://developers.mtn.com/products/customer-promotion
📖
APIReference
https://developers.mtn.com/products/customer-promotion
📖
Documentation
https://developers.mtn.com/products/customer-survey
📖
APIReference
https://developers.mtn.com/products/customer-survey
📖
Documentation
https://developers.mtn.com/products/customer-data-transfer-ng-prod
📖
APIReference
https://developers.mtn.com/products/customer-data-transfer-ng-prod
📖
Documentation
https://developers.mtn.com/products/mtn-customer-datatransfer
📖
APIReference
https://developers.mtn.com/products/mtn-customer-datatransfer
📖
Documentation
https://developers.mtn.com/products/device-swap-v1
📖
APIReference
https://developers.mtn.com/products/device-swap-v1
📖
Documentation
https://developers.mtn.com/products/tmf-720-digital-identity-management
📖
APIReference
https://developers.mtn.com/products/tmf-720-digital-identity-management
📖
Documentation
https://developers.mtn.com/products/digital-partner-management
📖
APIReference
https://developers.mtn.com/products/digital-partner-management
📖
Documentation
https://developers.mtn.com/products/document-managment
📖
APIReference
https://developers.mtn.com/products/document-managment
📖
Documentation
https://developers.mtn.com/products/tmf-document-management-tmf667
📖
APIReference
https://developers.mtn.com/products/tmf-document-management-tmf667
📖
Documentation
https://developers.mtn.com/products/tmf688-event-management
📖
APIReference
https://developers.mtn.com/products/tmf688-event-management
📖
Documentation
https://developers.mtn.com/products/eec-token-management
📖
APIReference
https://developers.mtn.com/products/eec-token-management
📖
Documentation
https://developers.mtn.com/products/insurance
📖
APIReference
https://developers.mtn.com/products/insurance
📖
Documentation
https://developers.mtn.com/products/iot-device-management
📖
APIReference
https://developers.mtn.com/products/iot-device-management
📖
Documentation
https://developers.mtn.com/products/hcm-v1
📖
APIReference
https://developers.mtn.com/products/hcm-v1
📖
Documentation
https://developers.mtn.com/products/logback-v1
📖
APIReference
https://developers.mtn.com/products/logback-v1
📖
Documentation
https://developers.mtn.com/products/tmf-loyalty-management-tmf658
📖
APIReference
https://developers.mtn.com/products/tmf-loyalty-management-tmf658
📖
Documentation
https://developers.mtn.com/products/rcs-capability
📖
APIReference
https://developers.mtn.com/products/rcs-capability
📖
Documentation
https://developers.mtn.com/products/medallia-sms-v2
📖
APIReference
https://developers.mtn.com/products/medallia-sms-v2
📖
Documentation
https://developers.mtn.com/products/advertising-v2
📖
APIReference
https://developers.mtn.com/products/advertising-v2
📖
Documentation
https://developers.mtn.com/products/mtn-advertising-api-v1
📖
APIReference
https://developers.mtn.com/products/mtn-advertising-api-v1
📖
Documentation
https://developers.mtn.com/products/mobile-customer-information
📖
APIReference
https://developers.mtn.com/products/mobile-customer-information
📖
Documentation
https://developers.mtn.com/products/withdrawals-v1
📖
APIReference
https://developers.mtn.com/products/withdrawals-v1
📖
Documentation
https://developers.mtn.com/products/momo-verification
📖
APIReference
https://developers.mtn.com/products/momo-verification
📖
Documentation
https://developers.mtn.com/products/ayoaccountholderinfo
📖
APIReference
https://developers.mtn.com/products/ayoaccountholderinfo
📖
Documentation
https://developers.mtn.com/products/agent-profile
📖
APIReference
https://developers.mtn.com/products/agent-profile
📖
Documentation
https://developers.mtn.com/products/customer-account-management-v1
📖
APIReference
https://developers.mtn.com/products/customer-account-management-v1
📖
Documentation
https://developers.mtn.com/products/mtn-customer-kyc-api-v1-product
📖
APIReference
https://developers.mtn.com/products/mtn-customer-kyc-api-v1-product
📖
Documentation
https://developers.mtn.com/products/customer-kyc-verification
📖
APIReference
https://developers.mtn.com/products/customer-kyc-verification
📖
Documentation
https://developers.mtn.com/products/loans-v2
📖
APIReference
https://developers.mtn.com/products/loans-v2
📖
Documentation
https://developers.mtn.com/products/mtn-customer-locations-api-v1
📖
APIReference
https://developers.mtn.com/products/mtn-customer-locations-api-v1
📖
Documentation
https://developers.mtn.com/products/customer-management
📖
APIReference
https://developers.mtn.com/products/customer-management
📖
Documentation
https://developers.mtn.com/products/mtn-customer-plans-api-v2
📖
APIReference
https://developers.mtn.com/products/mtn-customer-plans-api-v2
📖
Documentation
https://developers.mtn.com/products/mtn-customer-profiles-api-v2-product
📖
APIReference
https://developers.mtn.com/products/mtn-customer-profiles-api-v2-product
📖
Documentation
https://developers.mtn.com/products/risk-management
📖
APIReference
https://developers.mtn.com/products/risk-management
📖
Documentation
https://developers.mtn.com/products/mtn-customer-score
📖
APIReference
https://developers.mtn.com/products/mtn-customer-score
📖
Documentation
https://developers.mtn.com/products/simverification
📖
APIReference
https://developers.mtn.com/products/simverification
📖
Documentation
https://developers.mtn.com/products/mtn-subscription-api-v2
📖
APIReference
https://developers.mtn.com/products/mtn-subscription-api-v2
📖
Documentation
https://developers.mtn.com/products/g2m
📖
APIReference
https://developers.mtn.com/products/g2m
📖
Documentation
https://developers.mtn.com/products/oauth-v1
📖
APIReference
https://developers.mtn.com/products/oauth-v1
📖
Documentation
https://developers.mtn.com/products/merchant-provisioning-v1
📖
APIReference
https://developers.mtn.com/products/merchant-provisioning-v1
📖
Documentation
https://developers.mtn.com/products/mtn-sms-api-v1
📖
APIReference
https://developers.mtn.com/products/mtn-sms-api-v1
📖
Documentation
https://developers.mtn.com/products/ussd
📖
APIReference
https://developers.mtn.com/products/ussd
📖
Documentation
https://developers.mtn.com/products/mtn-product-offering-api-v2
📖
APIReference
https://developers.mtn.com/products/mtn-product-offering-api-v2
📖
Documentation
https://developers.mtn.com/products/mtn-product-offering-api-v3
📖
APIReference
https://developers.mtn.com/products/mtn-product-offering-api-v3
📖
Documentation
https://developers.mtn.com/products/mtn-ng-retailer-productivity-tracking-v1
📖
APIReference
https://developers.mtn.com/products/mtn-ng-retailer-productivity-tracking-v1
📖
Documentation
https://developers.mtn.com/products/tmf633-shopping-cart-management
📖
APIReference
https://developers.mtn.com/products/tmf633-shopping-cart-management
📖
Documentation
https://developers.mtn.com/products/siebel
📖
APIReference
https://developers.mtn.com/products/siebel
📖
Documentation
https://developers.mtn.com/products/tmf-party-management
📖
APIReference
https://developers.mtn.com/products/tmf-party-management
📖
Documentation
https://developers.mtn.com/products/tmf-usage-management-tmf635
📖
APIReference
https://developers.mtn.com/products/tmf-usage-management-tmf635
📖
Documentation
https://developers.mtn.com/products/usage-management
📖
APIReference
https://developers.mtn.com/products/usage-management
📖
Documentation
https://developers.mtn.com/products/mtnid-getinfo
📖
APIReference
https://developers.mtn.com/products/mtnid-getinfo
📖
Documentation
https://developers.mtn.com/products/notification-production
📖
APIReference
https://developers.mtn.com/products/notification-production
📖
Documentation
https://developers.mtn.com/products/notification-v2
📖
APIReference
https://developers.mtn.com/products/notification-v2
📖
Documentation
https://developers.mtn.com/products/order-fulfillment
📖
APIReference
https://developers.mtn.com/products/order-fulfillment
📖
Documentation
https://developers.mtn.com/products/tmf-party-interaction-tmf683
📖
APIReference
https://developers.mtn.com/products/tmf-party-interaction-tmf683
📖
Documentation
https://developers.mtn.com/products/mtn-party-management
📖
APIReference
https://developers.mtn.com/products/mtn-party-management
📖
Documentation
https://developers.mtn.com/products/rwanda-party-management
📖
APIReference
https://developers.mtn.com/products/rwanda-party-management
📖
Documentation
https://developers.mtn.com/products/payment-methods-management-sa
📖
APIReference
https://developers.mtn.com/products/payment-methods-management-sa
📖
Documentation
https://developers.mtn.com/products/payments-v1
📖
APIReference
https://developers.mtn.com/products/payments-v1
📖
Documentation
https://developers.mtn.com/products/tmf-prepay-balance-management-tmf654
📖
APIReference
https://developers.mtn.com/products/tmf-prepay-balance-management-tmf654
📖
Documentation
https://developers.mtn.com/products/product-catalog-coe
📖
APIReference
https://developers.mtn.com/products/product-catalog-coe
📖
Documentation
https://developers.mtn.com/products/product-catalog-management-v1
📖
APIReference
https://developers.mtn.com/products/product-catalog-management-v1
📖
Documentation
https://developers.mtn.com/products/product-catalogue-management
📖
APIReference
https://developers.mtn.com/products/product-catalogue-management
📖
Documentation
https://developers.mtn.com/products/tmf-product-catalog-tmf620
📖
APIReference
https://developers.mtn.com/products/tmf-product-catalog-tmf620
📖
Documentation
https://developers.mtn.com/products/product-ordering-coe
📖
APIReference
https://developers.mtn.com/products/product-ordering-coe
📖
Documentation
https://developers.mtn.com/products/tmf-product-ordering-tmf622
📖
APIReference
https://developers.mtn.com/products/tmf-product-ordering-tmf622
📖
Documentation
https://developers.mtn.com/products/resource-config-v1
📖
APIReference
https://developers.mtn.com/products/resource-config-v1
📖
Documentation
https://developers.mtn.com/products/tmf-resource-ordering-tmf652
📖
APIReference
https://developers.mtn.com/products/tmf-resource-ordering-tmf652
📖
Documentation
https://developers.mtn.com/products/tmf-service-activation-tmf678
📖
APIReference
https://developers.mtn.com/products/tmf-service-activation-tmf678
📖
Documentation
https://developers.mtn.com/products/job-card-management
📖
APIReference
https://developers.mtn.com/products/job-card-management
📖
Documentation
https://developers.mtn.com/products/ticket
📖
APIReference
https://developers.mtn.com/products/ticket
📖
Documentation
https://developers.mtn.com/products/mtn-sms-interface
📖
APIReference
https://developers.mtn.com/products/mtn-sms-interface
📖
Documentation
https://developers.mtn.com/products/sms-v3-api
📖
APIReference
https://developers.mtn.com/products/sms-v3-api
📖
Documentation
https://developers.mtn.com/products/sim-management-staging
📖
APIReference
https://developers.mtn.com/products/sim-management-staging
📖
Documentation
https://developers.mtn.com/products/sim-swap-verification-v1
📖
APIReference
https://developers.mtn.com/products/sim-swap-verification-v1
📖
Documentation
https://developers.mtn.com/products/subscriber-management
📖
APIReference
https://developers.mtn.com/products/subscriber-management
📖
Documentation
https://developers.mtn.com/products/taxation-v1
📖
APIReference
https://developers.mtn.com/products/taxation-v1
📖
Documentation
https://developers.mtn.com/products/tmf-trouble-ticket-tmf621
📖
APIReference
https://developers.mtn.com/products/tmf-trouble-ticket-tmf621
📖
Documentation
https://developers.mtn.com/products/tmf629-customer-management
📖
APIReference
https://developers.mtn.com/products/tmf629-customer-management
📖
Documentation
https://developers.mtn.com/products/tmf637-product-inventory
📖
APIReference
https://developers.mtn.com/products/tmf637-product-inventory
📖
Documentation
https://developers.mtn.com/products/account-management-coe
📖
APIReference
https://developers.mtn.com/products/account-management-coe
📖
Documentation
https://developers.mtn.com/products/tmf-payment-management-tmf676
📖
APIReference
https://developers.mtn.com/products/tmf-payment-management-tmf676
📖
Documentation
https://developers.mtn.com/products/resource-pool-management
📖
APIReference
https://developers.mtn.com/products/resource-pool-management
📖
Documentation
https://developers.mtn.com/products/tmf-usage-consumption-tmf677
📖
APIReference
https://developers.mtn.com/products/tmf-usage-consumption-tmf677
📖
Documentation
https://developers.mtn.com/products/usage-consumption
📖
APIReference
https://developers.mtn.com/products/usage-consumption

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mtn-group-payment-methods-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mtn-group-payment-methods-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: "A suite of apis for customer payment method details and its data type.\n\n**07-July-21: ChangeID: 00000**\n- Updated the response body for the /paymentMethod endpoint\n\n**06-December-21:**\n- Added a new method for updating the payment method details, as below:\n  PUT /paymentMethod"
  title: Management payment methods API
  version: '1.1'
servers:
- url: https://api.mtn.com/v1
security:
- ApiKeyAuth: []
- OAuth2: []
tags:
- name: payment methods
paths:
  /paymentMethod:
    get:
      operationId: retrievePaymentMethods
      parameters:
      - description: To retrieve methods of a specific type
        in: query
        name: type
        required: false
        schema:
          type: string
          enum:
          - bankCard
          - bank
          - tokenizedCard
      - description: Mobile number or unique identifier of the customer
        in: query
        name: customerId
        required: false
        schema:
          type: string
      - description: To retrieve methods from a specific related party
        in: query
        name: relatedParty.id
        required: false
        schema:
          type: string
          enum:
          - Flutterwave
          - CPG
          - NXG_PG
      - name: x-country-code
        in: header
        description: Country code for the target system
        required: false
        x-example: NGA
        schema:
          type: string
      - name: transactionId
        in: query
        description: This is the transaction Id from the calling system. This is required if the relatedParty.id is CPG
        schema:
          type: string
      - name: description
        in: query
        description: Other information, can be a merchant identifier .ie. merchantId etc.
        x-example: '1234908'
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: string
                    description: This is the MADAPI Canonical response Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system response are mapped to specific canonical response codes which are returned. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes'
                  statusMessage:
                    type: string
                    description: Status Message
                    example: Success
                  transactionId:
                    type: string
                    description: API generated Id to include for tracking requests
                  data:
                    $ref: '#/components/schemas/PaymentMethodType'
                  _links:
                    type: object
                    properties:
                      self:
                        type: object
                        properties:
                          href:
                            type: string
                            example: https://api.mtn.com/tmf-api/paymentMethods/v1/paymentMethod
        '400':
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Retrieve a list of payment methods
      tags:
      - payment methods
  /paymentMethod/{paymentMethodId}:
    delete:
      operationId: deletePaymentMethod
      parameters:
      - name: paymentMethodId
        in: path
        description: id of the payment method to fetch
        required: true
        schema:
          type: string
      - description: To retrieve methods of a specific type
        in: query
        name: type
        required: false
        schema:
          type: string
          enum:
          - bankCard
          - bank
          - tokenizedCard
      - description: Mobile number or unique identifier of the customer
        in: query
        name: customerMsisdn
        required: false
        schema:
          type: string
      - description: Impacted party to fullfil the service. This shows which system layer to be called to fulfil the request
        in: query
        name: providerId
        required: false
        schema:
          type: string
      - name: x-country-code
        in: header
        description: Country code for the target system
        required: true
        x-example: NGA
        schema:
          type: string
      responses:
        '204':
          description: Payment method deleted successfully
        '400':
          description: Invalid Token
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '405':
          description: Method not Allowed
        '500':
          description: Internal Server Error
      summary: Delete a payment method
      tags:
      - payment methods
    put:
      operationId: updatePaymentMethod
      parameters:
      - name: paymentMethodId
        in: path
        description: id of the payment method to update. Tells whether the customer billing type is 'Debit Order' or 'Credit Card' or 'Cash'. Currently 'Cash' is not supported.
        required: true
        schema:
          type: string
      - name: transactionId
        description: Source system's unique transaction reference.
        x-example: 06F4853F-0D4D-4FCF-B54D-FE32BE748581
        in: header
        required: false
        schema:
          type: string
      - name: customerMsisdn
        description: Mobile number or unique identifier of the customer
        in: query
        required: false
        schema:
          type: string
      - name: providerId
        description: Impacted party to fullfil the service. This shows which system layer to be called to fulfil the request
        in: query
        required: false
        schema:
          type: string
      - name: billingAccountNumber
        in: query
        description: Billing Account Number on which the update has to be done
        x-example: BA111117638
        schema:
          type: string
      - name: idType
        in: query
        description: identity type of the customer [RSAID,PASSPORT]
        x-example: RSAID
        schema:
          type: string
      - name: idNumber
        in: query
        description: id number or the passport number of the customer
        x-example: '8404271961084'
        schema:
          type: string
      - name: paymentDay
        in: query
        description: Day of the month on which payment will be done against the customer bill. Possible values are between number 1 to 31
        schema:
          type: number
          maxLength: 2
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: string
                    description: This is the MADAPI Canonical response Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system response are mapped to specific canonical response codes which are returned. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes'
                  statusMessage:
                    type: string
                    description: Status Message
                    example: Success
                  transactionId:
                    type: string
                    description: API generated Id to include for tracking requests
                  _links:
                    type: object
                    properties:
                      self:
                        type: object
                        properties:
                          href:
                            type: string
                            example: https://api.mtn.com/v1/paymentMethod/Credit Card
        '400':
          description: Invalid Token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Update a payment method
      tags:
      - payment methods
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bankDetails'
        required: true
components:
  schemas:
    TokenizedCard:
      description: Representation of a tokenized card
      properties:
        brand:
          type: string
          example: MASTERCARD
        value:
          type: string
          description: 'This is the card tokenized string '
          example: FLdduzYEwOYwdEaC0D5z/vjc/iwQ/P8q3oAdAtvTTg4=
        tokenType:
          type: string
          description: This is an indicator whether it is a debit or credit card
          example: DEBIT
        token:
          type: string
          description: Masked card number
          example: 511111xxxxxx1118
        issuer:
          type: string
          description: Card issuer
          example: FISERV SOLUTIONS, LLC
        expiry:
          type: string
          description: Expiry of a card
          example: '0423'
        id:
          type: string
          description: can be customer id associated with the token
          example: 00039930433
        expired:
          type: boolean
          description: Shows if the card is expired or not
          example: false
        recurring:
          type: boolean
          description: Shows if the card is reccuring or not
          example: false
        date:
          type: string
          description: a registration date associated with the token
          example: '2022-04-15T15:39:33.881Z'
    PaymentMethodType:
      description: Representation of a payment method
      properties:
        id:
          type: string
          description: Unique id of the payment method in the server
        type:
          type: string
          enum:
          - bank
          - bankCard
          - tokenizedCard
          description: Payment method type. The content of the details field depends on the value of this one
        details:
          type: object
          properties:
            tokenizedCard:
              description: List of tokenized cards
              type: array
              items:
                $ref: '#/components/schemas/TokenizedCard'
            bank:
              description: List of tokenized cards
              type: array
              items:
                $ref: '#/components/schemas/Banks'
      required:
      - id
      - type
      - details
    Banks:
      description: Representation of a tokenized card
      properties:
        bankName:
          type: string
          example: Zenith
        accountNumber:
          type: string
          description: bank account number
        bankAccountHolderName:
          type: string
          description: bankAccountHolderName
          example: LINDA HLATSHWAYO
        bankAccountType:
          type: string
          description: bankAccountType
          example: Savings
        bankBranchCode:
          type: string
          description: bankBranchCode
          example: '051001'
        value:
          type: string
          description: Account UID
          example: rEUcjfh+RQysxSJpuFtOddMTYA28G3GI=
        issuer:
          type: string
          description: Account issuer
          example: Guarantee Trust Bank Plc
        logoUrl:
          type: string
          description: URL Pointing to the logo resource
          example: https://cdn.pay.mtn.com/bank/fcmb.png
        reccuring:
          type: boolean
          description: Shows if the account is reccuring or not
          example: false
        paymentDay:
          type: string
          format: date
          description: Payment date in YYYY-MM-DD
          example: '2022-02-22'
    bankDetails:
      type: object
      description: Bank details of the customer. Mandatory if paymentMethod is Debit Order
      required:
      - accountHolderName
      - bankAccountType
      - bankName
      - bankBranchCode
      - bankAccountNumber
      properties:
        accountHolderName:
          type: string
          description: Customer name as per the new bank account details.
        bankAccountType:
          type: string
          description: Customer bank account type as per the new bank account details.
          enum:
          - Cheque Current
          - Savings
          - Bond
          - None
          - Other
          - Transmission
        bankName:
          type: string
          description: Customer bank account name as per the new bank account details.
          enum:
          - ABSA Bank
          - Bank of Athens
          - Bidvest Bank
          - Capitec Bank
          - FNB
          - Investec Private Bank
          - Nedbank
          - SA Post Bank (Post Office)
          - Standard Bank
        bankBranchCode:
          type: number
          description: Bank branch code as per the new bank account details.
        bankAccountNumber:
          type: string
          description: Bank account number as per the new bank account details.
    Error:
      type: object
      required:
      - statusCode
      - statusMessage
      properties:
        statusCode:
          type: string
          description: This is the MADAPI Canonical Error Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system errors are mapped to specific canonical error codes which are returned. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes'
          example: '1000'
        statusMessage:
          type: string
          description: More details and corrective actions related to the error which can be shown to a client
        supportMessage:
          type: string
          description: Internal message meant for consumers of the API to troubleshoot the error (could possible include the back-end system error code in the message if it would be useful)
        transactionId:
          type: string
          description: This is the same transactionId that is sent in the request
          example: cdfa7bc3-cbcd-473b-a743-4fc90dcc91e4
        timestamp:
          type: string
          format: date-time
          description: Timestamp that the error occurred
          example: '2021-07-21T17:32:28Z'
        path:
          type: string
          description: The path that caused the error
          example: paymentMethod/Credit Card
        method:
          type: string
          description: The HTTP method type that was used
          example: PUT
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-API-Key
      in: header
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: https://api.mtn.com/v1/oauth/access_token