Quickdocs

Use this feature to quickly get an overview of our API endpoints, parameter descriptions, sample requests and responses

We've made it possible for you to quickly get an overview of our API endpoint parameter descriptions, sample requests and responses during development. When you add /meta to any of our v3 API's, it returns what we call quick documentation that contains all the information you need about that endpoint:

  • API description
  • Parameters and descriptions
  • Required values for parameters
  • Headers
  • Sample Requests
  • Samples Responses
    *etc

How to use Quickdocs

Let's demonstrate how quickdocs work using the /charge endpoint.

The API endpoint for charge is:

📘

Charge endpoint

https://api.flutterwave.com/v3/charges

If you want to get the quickdocs for this endpoint, you only need to add /meta after the base URL (before /v3)

📘

Quickdocs charge endpoint

https://api.flutterwave.com/v3/meta/charges

{
    "description": "This ameta describes how to perform card payments using Rave's APIs",
    "endpoint": "POST /v3/charges",
    "request_spec": {
        "type": "post_body",
        "payload": {
            "public_key": "Required - true: This is a unique key generated for each button created on Rave’s dashboard. It starts with a prefix FLWPUBK and ends with suffix X.",
            "tx_ref": "Required - true: This is a unique reference, unique to the particular transaction being carried out. It is generated by the merchant for every transaction.",
            "amount": "Required - true: This is the amount to be charged it is passed as - (“amount”:10).",
            "currency": "Required: true : This is the specified currency to charge the card in. With Rave you can charge cards in more than 90 currencies, all you need to do is pass the specified currency you would like to charge the in.",
            "email": "Required - true: This is the email address of the customer.",
            "phone_number": "Required - false: This is the phone number linked to the customer's mobile money account.",
            "subaccounts": "Required - false: This is an array of objects containing the subaccount IDs to split the payment into.",
            "client_ip": "Required - false: IP - Internet Protocol. This represents the current IP address of the customer carrying out the transaction.",
            "device_fingerprint": "Required - false: This is the fingerprint for the device being used. It can be generated using a library on whatever platform is being used.",
            "type": "Required - true: This specifies that the payment method being used. it should be set to - card",
            "redirect_url": "Required - false: This is a url you provide, we redirect to it after the customer completes payment and append the response to it as query parameters. (3DSecure only)",
            "card_number": "Required - true: This is the number on the cardholders card. E.g. 5399 6701 2349 0229.",
            "cvv": "Required - true: Card security code. This is 3/4 digit code at the back of the customers card, used for web payments.",
            "expiry_month": "Required - true: Two-digit number representing the card's expiration month.",
            "expiry_year": "Required - true: Two- digit number representing the card's expiration year.",
            "meta": "Required - false: This is to include additional payment information",
            "authorization": "Required - false: This is an object that should contain the authorization mode, pin, and biller address",
            "preauthorize": "Required - false:  This should be set to true for preauthoize card transactions",
            "mode": "Required - false: The Auth model to use when validating - e.g pin, avs_noauth or avs"
        },
        "sample_spec_to_encrypt": {
            "public_key": "FLWPUBK-6c4e3dcb21282d44f907c9c9ca7609cb-X",
            "card_number": "4556052704172643",
            "cvv": "899",
            "expiry_month": "01",
            "expiry_year": "21",
            "currency": "NGN",
            "country": "NG",
            "amount": "1000",
            "email": "[email protected]",
            "phone_number": "0902620185",
            "fullname": "temi desola",
            "client_ip": "169.123.8.9",
            "tx_ref": "MC-3243e",
            "meta": {
                "flightID": "123949494DC"
            },
            "redirect_url": "https://webhook.site/3ed41e38-2c79-4c79-b455-97398730866c",
            "device_fingerprint": "69e6b7f0b72037aa8428b70fbe03986c",
            "type": "card",
            "preauthorize": true,
            "authorization": {
                "mode": "avs_noauth",
                "pin": "3310",
                "zipcode": "07205",
                "city": "Hillside",
                "address": "470 Mundet PI",
                "state": "NJ",
                "country": "US"
            }
        }
    },
    "sample_request": {
        "public_key": "FLWPUBK-6c4e3dcb21282d44f907c9c9ca7609cb-X",
        "client": "W+C+Mi//JFO5/JIbjMu1a/V8bI4vI2wYwNN3VyLb+GiPGpNhjEGakpXboR6O2utcezwqtjpIHlDmPh93Kb0LkbTWuYvDw3fTMnlLu+uUE5UU1YQElo/nHE/BIwM4pNStcPrEYN0ecfBdn7kaJo+QKFz1lm7/HGfeJzK0O37eoCy4PJb+ZIhhoIOgoHWUVvz7IlqgE4OImagpJn4NtNeaOKHIxWBQJLUI3mBOuw5VMVk3GXAb8SZh39oW/VfeEUOVyCMxBC3ZsTVLcd5m599qh78RrcVMky1ZYxNUJCLgTQp0i0uyF5hqAQJ2dFGYBtdWKu0eaZqCkn4VjkiH1jWkrxWAKdD7HmIwhhprJ20V5qGWjX66MFYpzxdMKMQl/f1ncCfgq/jA7J2VjfyUr0zHM9LcCZ7wUiPjVCG0ejpCyvMYBZxz2x+exEd2O8tU7UR0UkJclieLjjXGsaF+Q2PVv+NzARz9MHIBzPQy5zPZKhxfJkbjX/wTVzZzaGFLxcUiXIqeXkA8znR0wpNZvXKUSwpVCA+hCAOd+9Nkofd/6fOnl2ZFkvCkTW+gF5wgSKUs9/MWcJG4Xr9lu74pEFYtqLWFSy4lPJNBDzuBvaIrfOp8bHvEch96XT3lHhBc49g1ntoFZ2Unp8tbUg99BLRj3I9LCPqN4aP4M73jXAgSLWeqgXnHYWeCsbcN5Go3ZzjQ8ng3ElKBHxcHx08t5trn1f5DkoVNoEKv/pJRniOLvONtMSrG/9jcm9LpDUKbo+NVPswax+e+r95YHsvJw8yb4dt1ZTonO+nUzs/xIYCLoYntlyl2dT58lw=="
    },
    "sample_response": {
        "status": "success",
        "message": "Charge initiated",
        "data": {
            "id": 1191443,
            "tx_ref": "MC-1585327608742",
            "flw_ref": "FLW-MOCK-3826c86527be1f3a016d621ea15da71e",
            "device_fingerprint": "69e6b7f0b72037aa8428b70fbe03986c",
            "amount": 1000,
            "charged_amount": 1000,
            "app_fee": 1539.5,
            "merchant_fee": "0",
            "processor_response": "Please enter the OTP sent to your mobile number 080****** and email te**@rave**.com",
            "auth_model": "PIN",
            "currency": "NGN",
            "ip": "69.123.8.9",
            "narration": "CARD Transaction ",
            "status": "pending",
            "auth_url": "N/A",
            "payment_type": "card",
            "fraud_status": "ok",
            "charge_type": "normal",
            "created_at": "2020-03-27T16: 46: 55.000Z",
            "account_id": 73362,
            "customer": {
                "id": 347498,
                "phone_number": "0902620185",
                "name": "temi desola",
                "email": "[email protected]",
                "created_at": "2020-03-24T17: 38: 27.000Z"
            },
            "card": {
                "first_6digits": 553188,
                "last_4digits": 2950,
                "issuer": "MASTERCARD  CREDIT",
                "country": "NG",
                "type": "MASTERCARD",
                "expiry": "0/22"
            }
        },
        "meta": {
            "authorization": {
                "mode": "otp",
                "endpoint": "/v3/charges/FLW-MOCK-3826c86527be1f3a016d621ea15da71e/validate"
            }
        }
    }
}

👍

This applies to every endpoint on v3, not just /charges