# Payment

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /gateway/base/biz:
    post:
      summary: Payment
      deprecated: false
      description: >-
        - The mobile phone number needs to be preceded by a three-digit country
        code.
      tags:
        - Transaction APIs/Africa/Tanzania
        - 收款
      parameters:
        - name: method
          in: header
          description: interface method
          required: true
          example: pay
          schema:
            type: string
        - name: signType
          in: header
          description: signature type
          required: true
          example: SHA512
          schema:
            type: string
        - name: serviceName
          in: header
          description: service name
          required: true
          example: api.pay
          schema:
            type: string
        - name: mchId
          in: header
          description: merchant ID
          required: true
          example: '1416010331032883200'
          schema:
            type: string
        - name: timestamp
          in: header
          description: timestamp (seconds)
          required: true
          example: '1631671670'
          schema:
            type: string
        - name: sign
          in: header
          description: signature
          required: true
          example: '32554324534545432543'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                mchOrderId:
                  type: string
                  title: ''
                  description: Merchant order number (min 5 characters, max 32 characters)
                  x-apifox-mock: '{{$string.uuid}}'
                amount:
                  type: string
                  title: ''
                  description: Order amount, in currency units
                  x-apifox-mock: '{{$finance.amount}}'
                firstname:
                  type: string
                  title: ''
                  description: Customer first name
                currency:
                  type: string
                  title: ''
                  description: 'Order currency, three-letter code, e.g.: USD'
                  x-apifox-mock: '{{$finance.currencyCode}}'
                lastname:
                  type: string
                  title: ''
                  description: Customer last name
                productinfo:
                  type: string
                  title: ''
                  description: Product description (min 1 character, max 100 characters)
                email:
                  type: string
                  title: ''
                  description: Customer email
                  x-apifox-mock: '{{$internet.email}}'
                phone:
                  type: string
                  title: ''
                  description: Customer phone number (min 6 digits, max 20 digits)
                  x-apifox-mock: '{{$phone.mobile}}'
                callbackUrl:
                  type: string
                  title: ''
                  description: Webhook callback URL
                redirectUrl:
                  type: string
                  title: ''
                  description: Redirect URL after success or failure
                noPayPage:
                  type: string
                  title: ''
                  description: >-
                    If set to true, the payment page will be skipped, reducing
                    API request time, and the checkoutUrl parameter in the
                    response will be empty
                cardNumber:
                  type: string
                  description: >-
                    Fill in bank card account number for bank card collection;
                    fill in wallet account number for wallet collection
                paymentMethod:
                  type: string
                  description: Payment type, e.g. CHECKOUT_URL
                  title: ''
                paymentType:
                  type: string
                  description: Payment method
                  title: ''
                  enum:
                    - CELLULANT
                  x-apifox-enum:
                    - value: CELLULANT
                      name: CELLULANT
                      description: Supports Tigo wallet and Arrtel wallet
              x-apifox-orders:
                - 01K1JFQQDXXR3QPJHNJYX208AW
                - cardNumber
                - paymentMethod
                - paymentType
              x-apifox-refs:
                01K1JFQQDXXR3QPJHNJYX208AW:
                  $ref: '#/components/schemas/Payment%20Common%20Request%20Body'
                  x-apifox-overrides: {}
              required:
                - mchOrderId
                - amount
                - firstname
                - currency
                - lastname
                - productinfo
                - email
                - phone
                - callbackUrl
                - redirectUrl
                - noPayPage
                - cardNumber
              x-apifox-ignore-properties:
                - mchOrderId
                - amount
                - firstname
                - currency
                - lastname
                - productinfo
                - email
                - phone
                - callbackUrl
                - redirectUrl
                - noPayPage
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        orderId:
                          type: string
                        checkoutUrl:
                          type: string
                      x-apifox-orders:
                        - orderId
                        - checkoutUrl
                      x-apifox-ignore-properties: []
                  resultCode:
                    type: string
                    description: Business code
                  errorCode:
                    type: string
                    description: Error code
                  errorMsg:
                    type: string
                    description: Error message
                required:
                  - data
                  - resultCode
                  - errorCode
                  - errorMsg
                x-apifox-orders:
                  - data
                  - 01K1Z7YW0X6S8Q7J0MH60B249M
                x-apifox-refs:
                  01K1Z7YW0X6S8Q7J0MH60B249M:
                    $ref: '#/components/schemas/Payment%20Common%20Response%20Body'
                x-apifox-ignore-properties:
                  - resultCode
                  - errorCode
                  - errorMsg
              example:
                data:
                  - orderId: '50'
                    checkoutUrl: https://true-jet.net/
                  - orderId: '33'
                    checkoutUrl: https://rotten-custom.org/
                resultCode: '45'
                errorCode: '37'
                errorMsg: ipsum sint amet aliqua
          headers: {}
          x-apifox-name: OK
      security: []
      x-apifox-folder: Transaction APIs/Africa/Tanzania
      x-apifox-status: developing
      x-run-in-apifox: https://app.apifox.com/web/project/7059003/apis/api-491107017-run
components:
  schemas:
    Payment Common Request Body:
      type: object
      properties:
        mchOrderId:
          type: string
          title: ''
          description: Merchant order number (min 5 characters, max 32 characters)
          x-apifox-mock: '{{$string.uuid}}'
        amount:
          type: string
          title: ''
          description: Order amount, in currency units
          x-apifox-mock: '{{$finance.amount}}'
        firstname:
          type: string
          title: ''
          description: Customer first name
        currency:
          type: string
          title: ''
          description: 'Order currency, three-letter code, e.g.: USD'
          x-apifox-mock: '{{$finance.currencyCode}}'
        lastname:
          type: string
          title: ''
          description: Customer last name
        productinfo:
          type: string
          title: ''
          description: Product description (min 1 character, max 100 characters)
        email:
          type: string
          title: ''
          description: Customer email
          x-apifox-mock: '{{$internet.email}}'
        phone:
          type: string
          title: ''
          description: Customer phone number (min 6 digits, max 20 digits)
          x-apifox-mock: '{{$phone.mobile}}'
        callbackUrl:
          type: string
          title: ''
          description: Webhook callback URL
        redirectUrl:
          type: string
          title: ''
          description: Redirect URL after success or failure
        noPayPage:
          type: string
          title: ''
          description: >-
            If set to true, the payment page will be skipped, reducing API
            request time, and the checkoutUrl parameter in the response will be
            empty
      x-apifox-orders:
        - mchOrderId
        - amount
        - firstname
        - currency
        - lastname
        - productinfo
        - email
        - phone
        - callbackUrl
        - redirectUrl
        - noPayPage
      required:
        - mchOrderId
        - amount
        - firstname
        - currency
        - lastname
        - productinfo
        - email
        - phone
        - callbackUrl
        - redirectUrl
        - noPayPage
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Payment Common Response Body:
      type: object
      properties:
        resultCode:
          type: string
          description: Business code
        errorCode:
          type: string
          description: Error code
        errorMsg:
          type: string
          description: Error message
      x-apifox-orders:
        - resultCode
        - errorCode
        - errorMsg
      required:
        - resultCode
        - errorCode
        - errorMsg
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
  securitySchemes: {}
servers:
  - url: http://prod-cn.your-api-server.com
    description: Prod Env
security: []

```
