EdfaPay, Inc. Payment API

The Payment API from EdfaPay, Inc. — 1 operation(s) for payment.

OpenAPI Specification

edfapay-inc-payment-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Edfapay Gateway Branch Management Payment API
  version: 1.0.0
  description: API to initiate a payment with Edfapay.
servers:
- url: https://apidev.edfapay.com
  description: Sandbox server
tags:
- name: Payment
paths:
  /payment/initiate:
    post:
      summary: Initiate API
      description: This API is used to initiate a payment transaction through Edfapay. Upon successful request, it returns a secure redirect_url to the hosted payment page, where the customer can choose from multiple available payment options. The exact set of payment methods shown depends on the merchant’s configuration.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: SALE
                edfa_merchant_id:
                  type: string
                  example: b1efc42a-67d3-4bdc-8382-7059bb66503
                order_id:
                  type: string
                  example: '10023333246'
                order_amount:
                  type: string
                  example: '0.11'
                order_currency:
                  type: string
                  example: SAR
                order_description:
                  type: string
                  example: S23 Mobile phone
                req_token:
                  type: string
                  example: N
                payer_first_name:
                  type: string
                  example: M Adnan
                payer_last_name:
                  type: string
                  example: Hashmi
                payer_address:
                  type: string
                  example: Some physical address
                payer_country:
                  type: string
                  example: SA
                payer_city:
                  type: string
                  example: Riyadh
                payer_zip:
                  type: string
                  example: '12221'
                payer_email:
                  type: string
                  example: example@adnan.com
                payer_phone:
                  type: string
                  example: '966565555555'
                payer_ip:
                  type: string
                  example: 176.44.76.222
                term_url_3ds:
                  type: string
                  example: https://success.com
                auth:
                  type: string
                  example: N
                recurring_init:
                  type: string
                  example: N
                hash:
                  type: string
                  example: 04da3f2675f8f2c6f7c6230e309a7c73c33b246b
              required:
              - action
              - edfa_merchant_id
              - order_id
              - order_amount
              - order_currency
              - hash
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                redirect_url: https://sandbox.edfapay.com/merchant/checkout/xxxxxxx/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                result: ERROR
                error_code: 100000
                error_message: Request data is invalid.
                errors:
                - error_code: 100000
                  error_message: Invalid Client Key / Edfa Merchant ID
      tags:
      - Payment