{
  "openapi": "3.1.0",
  "info": {
    "title": "Paymonetra API",
    "description": "Collections, payouts, checkout and card issuing for Nigerian businesses. Generated from the API contract, so it is never ahead of or behind the documentation at https://docs.paymonetra.com. Write routes are documented in two styles, some taking form encoded fields and some a JSON body, so read each operation rather than assuming one. Responses are JSON. Card issuing is available on request.",
    "version": "1.0.0+cdc1a586.56cc6201.6153eb2d",
    "contact": {
      "name": "Paymonetra developer documentation",
      "url": "https://docs.paymonetra.com"
    }
  },
  "servers": [
    {
      "url": "https://api.paymonetra.com/v1",
      "description": "Production. Test mode is the key you send, not a different host."
    }
  ],
  "tags": [
    {
      "name": "Getting started"
    },
    {
      "name": "Customer accounts"
    },
    {
      "name": "Money"
    },
    {
      "name": "Payments"
    },
    {
      "name": "Transfers"
    },
    {
      "name": "Refunds"
    },
    {
      "name": "Webhooks"
    },
    {
      "name": "Identity"
    },
    {
      "name": "Test mode"
    },
    {
      "name": "Checkout"
    },
    {
      "name": "Cards"
    },
    {
      "name": "Bill payments"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "get_index",
        "summary": "Service index",
        "description": "Confirms you have the right host, and lists what a key can reach. No key needed.\n\nNo key needed.",
        "tags": [
          "Getting started"
        ],
        "security": [],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/service-index/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "docs": {
                      "type": "string"
                    },
                    "endpoints": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "name": "Paymonetra Gateway API",
                  "version": "v1",
                  "docs": "https://docs.paymonetra.com",
                  "endpoints": [
                    "GET  /balance",
                    "POST /customer_accounts",
                    "GET  /customer_accounts",
                    "GET  /customer_accounts/{customer_reference}",
                    "POST /payments",
                    "POST /payments/crypto",
                    "GET  /payments/{reference}",
                    "GET  /banks",
                    "POST /transfers/resolve",
                    "POST /transfers",
                    "GET  /transfers",
                    "GET  /transfers/{reference}",
                    "POST /refunds",
                    "GET  /refunds",
                    "GET  /refunds/{reference}",
                    "GET  /disputes",
                    "GET  /disputes/{reference}",
                    "POST /disputes/{reference}/refund",
                    "POST /identity/bvn",
                    "POST /identity/nin",
                    "GET  /webhook",
                    "POST /webhook"
                  ]
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/customer_accounts": {
      "post": {
        "operationId": "post_customer_accounts",
        "summary": "Create a customer account",
        "description": "Issues a permanent bank account number in your customer’s own name.\n\nYour secret key, live or test.",
        "tags": [
          "Customer accounts"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/create-customer-account/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customer_reference": {
                      "type": "string"
                    },
                    "customer_name": {
                      "type": "string"
                    },
                    "customer_email": {
                      "type": "string"
                    },
                    "customer_phone": {
                      "type": "string"
                    },
                    "account_number": {
                      "type": "string"
                    },
                    "account_name": {
                      "type": "string"
                    },
                    "bank_name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "mode": {
                      "type": "string"
                    },
                    "credits": {
                      "type": "number"
                    },
                    "collected_total": {
                      "type": "number"
                    },
                    "last_credit_at": {},
                    "created_at": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "customer_reference": "cus_9f21",
                  "customer_name": "Ngozi Nwosu",
                  "customer_email": "ngozi@example.com",
                  "customer_phone": "08031234567",
                  "account_number": "8021234567",
                  "account_name": "MONETRA - Samifunds (Ngozi Nwosu)",
                  "bank_name": "...",
                  "status": "active",
                  "mode": "live",
                  "credits": 0,
                  "collected_total": 0,
                  "last_credit_at": null,
                  "created_at": "2026-08-28T19:18:33+01:00"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_reference": {
                    "type": "string"
                  },
                  "customer_name": {
                    "type": "string"
                  },
                  "customer_email": {
                    "type": "string"
                  },
                  "customer_phone": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "customer_reference": "cus_9f21",
                "customer_name": "Ngozi Nwosu",
                "customer_email": "ngozi@example.com",
                "customer_phone": "08031234567"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_customer_accounts",
        "summary": "List customer accounts",
        "description": "Your accounts, filterable by status and paged.\n\nYour secret key, live or test.",
        "tags": [
          "Customer accounts"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/list-customer-accounts/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "customer_reference": {
                            "type": "string"
                          },
                          "customer_name": {
                            "type": "string"
                          },
                          "account_number": {
                            "type": "string"
                          },
                          "account_name": {
                            "type": "string"
                          },
                          "bank_name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "mode": {
                            "type": "string"
                          },
                          "credits": {
                            "type": "number"
                          },
                          "collected_total": {
                            "type": "number"
                          },
                          "last_credit_at": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "customer_reference": "cus_9f21",
                      "customer_name": "Ngozi Nwosu",
                      "account_number": "8021234567",
                      "account_name": "MONETRA - Samifunds (Ngozi Nwosu)",
                      "bank_name": "...",
                      "status": "active",
                      "mode": "live",
                      "credits": 3,
                      "collected_total": 45000,
                      "last_credit_at": "2026-09-27T14:02:10+01:00",
                      "created_at": "2026-08-28T19:18:33+01:00"
                    }
                  ],
                  "limit": 50,
                  "offset": 0
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/customer_accounts/{reference}": {
      "get": {
        "operationId": "get_customer_accounts_by_reference",
        "summary": "Fetch a customer account",
        "description": "One account by your own reference, with what it has received.\n\nYour secret key, live or test.",
        "tags": [
          "Customer accounts"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Your own reference for the record, or ours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/get-customer-account/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customer_reference": {
                      "type": "string"
                    },
                    "customer_name": {
                      "type": "string"
                    },
                    "account_number": {
                      "type": "string"
                    },
                    "account_name": {
                      "type": "string"
                    },
                    "bank_name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "mode": {
                      "type": "string"
                    },
                    "credits": {
                      "type": "number"
                    },
                    "collected_total": {
                      "type": "number"
                    },
                    "last_credit_at": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "customer_reference": "cus_9f21",
                  "customer_name": "Ngozi Nwosu",
                  "account_number": "8021234567",
                  "account_name": "MONETRA - Samifunds (Ngozi Nwosu)",
                  "bank_name": "...",
                  "status": "active",
                  "mode": "live",
                  "credits": 3,
                  "collected_total": 45000,
                  "last_credit_at": "2026-09-27T14:02:10+01:00",
                  "created_at": "2026-08-28T19:18:33+01:00"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/balance": {
      "get": {
        "operationId": "get_balance",
        "summary": "Balance",
        "description": "Collected and Settled, for the mode your key belongs to.\n\nYour secret key, live or test.",
        "tags": [
          "Money"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/balance/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string"
                    },
                    "collected": {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "number"
                        },
                        "ready": {
                          "type": "number"
                        },
                        "clearing": {
                          "type": "number"
                        },
                        "held": {
                          "type": "number"
                        }
                      }
                    },
                    "settled": {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "number"
                        }
                      }
                    },
                    "currency": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "mode": "live",
                  "collected": {
                    "amount": 430770.62,
                    "ready": 203270.62,
                    "clearing": 227500,
                    "held": 0
                  },
                  "settled": {
                    "amount": 600000
                  },
                  "currency": "NGN"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/payments": {
      "post": {
        "operationId": "post_payments",
        "summary": "Start a payment",
        "description": "Opens a checkout session and returns the URL to send your customer to.\n\nYour secret key, live or test.",
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/create-payment/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string"
                    },
                    "merchant_reference": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    },
                    "amount_requested": {
                      "type": "number"
                    },
                    "account_number": {
                      "type": "string"
                    },
                    "account_name": {
                      "type": "string"
                    },
                    "checkout_url": {
                      "type": "string"
                    },
                    "collects": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "reference": "ef8e7ff7078b893d03",
                  "merchant_reference": "SF-10482",
                  "status": "pending",
                  "amount": 45000,
                  "amount_requested": 45000,
                  "account_number": "5048135286",
                  "account_name": "MONETRA TECHNOLOGIES LTD",
                  "checkout_url": "https://pay.paymonetra.com/ef8e7ff7078b893d03",
                  "collects": [
                    "bank_transfer"
                  ]
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "amount": 45000,
                "reference": "SF-10482",
                "description": "Ankara bundle"
              }
            }
          }
        }
      }
    },
    "/payments/{reference}": {
      "get": {
        "operationId": "get_payments_by_reference",
        "summary": "Fetch a payment",
        "description": "One session, scoped to your own merchant and mode.\n\nYour secret key, live or test.",
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Your own reference for the record, or ours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/get-payment/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/payments/crypto": {
      "post": {
        "operationId": "post_payments_crypto",
        "summary": "Start a USDT payment",
        "description": "Names a coin amount rather than a naira price, and settles to you in naira.\n\nYour live secret key. A test key answers 403 live_only.",
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/create-crypto-payment/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "rail": {
                      "type": "string"
                    },
                    "coin": {
                      "type": "string"
                    },
                    "coin_network": {
                      "type": "string"
                    },
                    "coin_amount": {
                      "type": "string"
                    },
                    "coin_address": {},
                    "amount_estimate": {
                      "type": "number"
                    },
                    "collects": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "checkout_url": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "reference": "12ed91f4107f0c6e35",
                  "status": "awaiting_details",
                  "rail": "usdt",
                  "coin": "USDT",
                  "coin_network": "TRC20",
                  "coin_amount": "5.000000",
                  "coin_address": null,
                  "amount_estimate": 0,
                  "collects": [
                    "usdt_trc20"
                  ],
                  "checkout_url": "https://pay.paymonetra.com/12ed91f4107f0c6e35"
                }
              }
            }
          },
          "403": {
            "description": "live_only: a test key. Crypto payments cannot be tested in test mode yet. Use your live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "coin_amount": {
                    "type": "number"
                  },
                  "network": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "customer_name": {
                    "type": "string"
                  },
                  "customer_email": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "redirect_url": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "coin_amount": 5,
                "network": "trc20",
                "reference": "order-1043",
                "customer_name": "Ada Obi",
                "customer_email": "ada@example.com",
                "description": "One year of hosting",
                "redirect_url": "https://yourshop.com/thanks"
              }
            }
          }
        }
      }
    },
    "/banks": {
      "get": {
        "operationId": "get_banks",
        "summary": "List banks",
        "description": "The bank codes to send with. Use these, not your own list.\n\nYour secret key, live or test.",
        "tags": [
          "Transfers"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/list-banks/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "banks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "bank_code": {
                            "type": "string"
                          },
                          "bank_name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "banks": [
                    {
                      "bank_code": "000013",
                      "bank_name": "..."
                    }
                  ]
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/transfers/resolve": {
      "post": {
        "operationId": "post_transfers_resolve",
        "summary": "Resolve an account",
        "description": "Who an account number belongs to, before you pay it.\n\nYour secret key, live or test.",
        "tags": [
          "Transfers"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/resolve-account/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account_name": {
                      "type": "string"
                    },
                    "account_number": {
                      "type": "string"
                    },
                    "bank_code": {
                      "type": "string"
                    },
                    "bank_name": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "account_name": "ADEBAYO OLUWASEUN",
                  "account_number": "0123456789",
                  "bank_code": "000013",
                  "bank_name": "..."
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bank_code": {
                    "type": "string"
                  },
                  "account_number": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "bank_code": "000013",
                "account_number": "0123456789"
              }
            }
          }
        }
      }
    },
    "/transfers": {
      "post": {
        "operationId": "post_transfers",
        "summary": "Send a transfer",
        "description": "Money out of your balance to a Nigerian bank account.\n\nYour secret key, live or test.",
        "tags": [
          "Transfers"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/create-transfer/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string"
                    },
                    "transfer_reference": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    },
                    "fee": {
                      "type": "number"
                    },
                    "stamp_duty": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "recipient": {
                      "type": "object",
                      "properties": {
                        "account_name": {
                          "type": "string"
                        },
                        "account_number": {
                          "type": "string"
                        },
                        "bank_code": {
                          "type": "string"
                        },
                        "bank_name": {
                          "type": "string"
                        }
                      }
                    },
                    "narration": {
                      "type": "string"
                    },
                    "reason": {},
                    "source": {
                      "type": "string"
                    },
                    "mode": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "completed_at": {
                      "type": "string"
                    },
                    "reversed_at": {}
                  }
                },
                "example": {
                  "reference": "wd_8f2c91",
                  "transfer_reference": "PMT-3F9A1C22B7D0",
                  "status": "success",
                  "amount": 25000,
                  "fee": 50,
                  "stamp_duty": 50,
                  "total": 25100,
                  "currency": "NGN",
                  "recipient": {
                    "account_name": "ADEBAYO OLUWASEUN",
                    "account_number": "0123456789",
                    "bank_code": "000013",
                    "bank_name": "..."
                  },
                  "narration": "Wallet withdrawal",
                  "reason": null,
                  "source": "api",
                  "mode": "live",
                  "created_at": "2026-09-28T12:30:00+01:00",
                  "completed_at": "2026-09-28T12:30:04+01:00",
                  "reversed_at": null
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "bank_code": {
                    "type": "string"
                  },
                  "account_number": {
                    "type": "string"
                  },
                  "account_name": {
                    "type": "string"
                  },
                  "narration": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "reference": "wd_8f2c91",
                "amount": 25000,
                "bank_code": "000013",
                "account_number": "0123456789",
                "account_name": "Adebayo Oluwaseun",
                "narration": "Wallet withdrawal"
              }
            }
          }
        }
      }
    },
    "/transfers/{reference}": {
      "get": {
        "operationId": "get_transfers_by_reference",
        "summary": "Fetch transfers",
        "description": "One by your reference or ours, or the list newest first.\n\nYour secret key, live or test.",
        "tags": [
          "Transfers"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Your own reference for the record, or ours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/get-transfer/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/refunds": {
      "post": {
        "operationId": "post_refunds",
        "summary": "Send a refund",
        "description": "Money back to the account that paid, never anywhere else.\n\nYour secret key, live or test.",
        "tags": [
          "Refunds"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/create-refund/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string"
                    },
                    "refund_reference": {
                      "type": "string"
                    },
                    "payment_reference": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    },
                    "fee": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "recipient": {
                      "type": "object",
                      "properties": {
                        "account_name": {
                          "type": "string"
                        },
                        "account_number": {
                          "type": "string"
                        },
                        "bank_code": {
                          "type": "string"
                        }
                      }
                    },
                    "reason": {
                      "type": "string"
                    },
                    "failure_reason": {},
                    "dispute_reference": {},
                    "created_at": {
                      "type": "string"
                    },
                    "completed_at": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "reference": "rf-1029",
                  "refund_reference": "PMR-9F21AA55C3D1",
                  "payment_reference": "20261027100204123456789012",
                  "status": "success",
                  "amount": 3000,
                  "fee": 50,
                  "total": 3050,
                  "currency": "NGN",
                  "recipient": {
                    "account_name": "TUNDE BELLO",
                    "account_number": "8039990000",
                    "bank_code": "100004"
                  },
                  "reason": "Out of stock",
                  "failure_reason": null,
                  "dispute_reference": null,
                  "created_at": "2026-10-28T14:10:02+01:00",
                  "completed_at": "2026-10-28T14:10:04+01:00"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payment_reference": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "payment_reference": "20261027100204123456789012",
                "amount": 3000,
                "reference": "rf-1029",
                "reason": "Out of stock"
              }
            }
          }
        }
      }
    },
    "/refunds/{reference}": {
      "get": {
        "operationId": "get_refunds_by_reference",
        "summary": "Fetch refunds",
        "description": "One by your reference or ours, or the list newest first.\n\nYour secret key, live or test.",
        "tags": [
          "Refunds"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Your own reference for the record, or ours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/get-refund/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/disputes": {
      "get": {
        "operationId": "get_disputes",
        "summary": "Fetch disputes",
        "description": "The open ones, the settled ones, and what they are holding.\n\nYour secret key, live or test.",
        "tags": [
          "Refunds"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/list-disputes/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/disputes/{reference}/refund": {
      "post": {
        "operationId": "post_disputes_by_reference_refund",
        "summary": "Refund a dispute",
        "description": "Pays the payer out of what the dispute already holds.\n\nYour secret key, live or test.",
        "tags": [
          "Refunds"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Your own reference for the record, or ours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/refund-dispute/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "reference": "your-id"
              }
            }
          }
        }
      }
    },
    "/webhook": {
      "get": {
        "operationId": "get_webhook",
        "summary": "Read your webhook",
        "description": "The URL and signing secret for your key’s mode, so a plugin can set itself up.\n\nYour secret key, live or test.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/get-webhook/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "secret": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "signature": {
                      "type": "object",
                      "properties": {
                        "header": {
                          "type": "string"
                        },
                        "algorithm": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "mode": "test",
                  "url": "https://shop.example.com/wc-api/paymonetra",
                  "secret": "whsec_test_4be1…",
                  "enabled": true,
                  "signature": {
                    "header": "X-Paymonetra-Signature",
                    "algorithm": "HMAC-SHA512, hex, over the raw request body"
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "operationId": "post_webhook",
        "summary": "Set your webhook",
        "description": "Saves the URL we post events to, for your key’s mode. An empty URL stops deliveries.\n\nYour secret key, live or test.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/set-webhook/"
        },
        "responses": {
          "200": {
            "description": "The same shape as GET /webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "secret": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "signature": {
                      "type": "object",
                      "properties": {
                        "header": {
                          "type": "string"
                        },
                        "algorithm": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "mode": "test",
                  "url": "https://shop.example.com/wc-api/paymonetra",
                  "secret": "whsec_test_4be1…",
                  "enabled": true,
                  "signature": {
                    "header": "X-Paymonetra-Signature",
                    "algorithm": "HMAC-SHA512, hex, over the raw request body"
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "url": "https://shop.example.com/wc-api/paymonetra"
              }
            }
          }
        }
      }
    },
    "/identity/bvn": {
      "post": {
        "operationId": "post_identity_bvn",
        "summary": "Look up a BVN",
        "description": "The name, date of birth, gender and phone on a BVN.\n\nYour secret key, live or test.",
        "tags": [
          "Identity"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/identity/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lookup_ref": {
                      "type": "string"
                    },
                    "reference": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "number": {
                      "type": "string"
                    },
                    "first_name": {
                      "type": "string"
                    },
                    "middle_name": {
                      "type": "string"
                    },
                    "last_name": {
                      "type": "string"
                    },
                    "date_of_birth": {
                      "type": "string"
                    },
                    "gender": {
                      "type": "string"
                    },
                    "phone": {
                      "type": "string"
                    },
                    "fee": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "mode": {
                      "type": "string"
                    },
                    "checked_at": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "lookup_ref": "idl_3f9a01c2b7d4e6",
                  "reference": "user_829",
                  "type": "bvn",
                  "number": "22222222222",
                  "first_name": "Adaeze",
                  "middle_name": "Grace",
                  "last_name": "Okonkwo",
                  "date_of_birth": "1990-01-15",
                  "gender": "female",
                  "phone": "08030000000",
                  "fee": 100,
                  "currency": "NGN",
                  "mode": "live",
                  "checked_at": "2026-11-17T14:33:43+01:00"
                }
              }
            }
          },
          "403": {
            "description": "identity_not_enabled: switched off for this business",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "identity_not_found: no record for that number. Charged on live; carries lookup_ref and fee",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request: number not 11 digits, or a bad reference; field says which insufficient_balance: the balance can't cover the fee. Nothing charged, nothing looked up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "daily_limit_reached: past today's limit; resets at midnight Lagos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "identity_check_unavailable: the check service failed or timed out. Nothing charged; carries lookup_ref; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "number": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "number": "22222222222",
                "reference": "user_829"
              }
            }
          }
        }
      }
    },
    "/identity/nin": {
      "post": {
        "operationId": "post_identity_nin",
        "summary": "Look up a NIN",
        "description": "The name, date of birth, gender and phone on a NIN.\n\nYour secret key, live or test.",
        "tags": [
          "Identity"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/identity/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lookup_ref": {
                      "type": "string"
                    },
                    "reference": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "number": {
                      "type": "string"
                    },
                    "first_name": {
                      "type": "string"
                    },
                    "middle_name": {
                      "type": "string"
                    },
                    "last_name": {
                      "type": "string"
                    },
                    "date_of_birth": {
                      "type": "string"
                    },
                    "gender": {
                      "type": "string"
                    },
                    "phone": {
                      "type": "string"
                    },
                    "fee": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "mode": {
                      "type": "string"
                    },
                    "checked_at": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "identity_not_enabled: switched off for this business",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "identity_not_found: no record for that number. Charged on live; carries lookup_ref and fee",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request: number not 11 digits, or a bad reference; field says which insufficient_balance: the balance can't cover the fee. Nothing charged, nothing looked up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "daily_limit_reached: past today's limit; resets at midnight Lagos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "identity_check_unavailable: the check service failed or timed out. Nothing charged; carries lookup_ref; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "number": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/customer_accounts/{reference}/simulate_payment": {
      "post": {
        "operationId": "post_customer_accounts_by_reference_simulate_payment",
        "summary": "Simulate a payment",
        "description": "Money arriving into one customer’s account, and the webhook that follows. Test keys only.\n\nYour test secret key. This route answers in test mode only.",
        "tags": [
          "Test mode"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Your own reference for the record, or ours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/simulate-payment/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "outcome": {
                      "type": "string"
                    },
                    "credited": {
                      "type": "boolean"
                    },
                    "reference": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    },
                    "account_number": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "outcome": "paid",
                  "credited": true,
                  "reference": "SIM20260830161204A3F19C22",
                  "amount": 20000,
                  "account_number": "9913607261",
                  "message": "Simulated paid of 20,000.00. A collection.success webhook has been queued."
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "outcome": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "payer_name": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "outcome": "paid",
                "amount": 20000,
                "payer_name": "Ada Obi"
              }
            }
          }
        }
      }
    },
    "/customer_accounts/{reference}/simulate_crypto": {
      "post": {
        "operationId": "post_customer_accounts_by_reference_simulate_crypto",
        "summary": "Simulate a coin deposit",
        "description": "USDT arriving at a customer’s address, and the webhook that follows. Test keys only.\n\nYour test secret key. This route answers in test mode only.",
        "tags": [
          "Test mode"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Your own reference for the record, or ours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/simulate-crypto/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customer_reference": {
                      "type": "string"
                    },
                    "coin": {
                      "type": "string"
                    },
                    "network": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "string"
                    },
                    "fee": {
                      "type": "string"
                    },
                    "net": {
                      "type": "string"
                    },
                    "reference": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "webhook": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "customer_reference": "cus_9f21",
                  "coin": "USDT",
                  "network": "TRC20",
                  "amount": "25.000000",
                  "fee": "0.375000",
                  "net": "24.625000",
                  "reference": "pmcd_118_4c1e09b2a7f3d5e1",
                  "status": "credited",
                  "webhook": "collection.success queued to your test webhook URL"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "network": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "amount": 25,
                "network": "TRC20"
              }
            }
          }
        }
      }
    },
    "/sandbox/pay": {
      "post": {
        "operationId": "post_sandbox_pay",
        "summary": "Simulate a collection",
        "description": "The same, for your collection account rather than a customer’s. Test keys only.\n\nYour test secret key. This route answers in test mode only.",
        "tags": [
          "Test mode"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/sandbox-pay/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "outcome": {
                      "type": "string"
                    },
                    "reference": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "outcome": "paid",
                  "reference": "9010164afee121d815"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "outcome": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "account_number": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "outcome": "underpaid",
                "amount": 5000,
                "account_number": "9913607261"
              }
            }
          }
        }
      }
    },
    "/checkout/{reference}": {
      "get": {
        "operationId": "get_checkout_by_reference",
        "summary": "Read a checkout session",
        "description": "What the payer’s browser polls. Public, guarded by the reference being random.\n\nNo key needed. The checkout reference in the path is the credential, so treat it as one.",
        "tags": [
          "Checkout"
        ],
        "security": [],
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Your own reference for the record, or ours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/get-checkout/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reference": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    },
                    "description": {
                      "type": "string"
                    },
                    "expires_in": {
                      "type": "number"
                    },
                    "redirect_url": {},
                    "customer": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        }
                      }
                    },
                    "account": {
                      "type": "object",
                      "properties": {
                        "number": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "bank": {
                          "type": "string"
                        }
                      }
                    },
                    "instruction": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "reference": "ef8e7ff7078b893d03",
                  "status": "pending",
                  "amount": 45000.7,
                  "description": "Ankara bundle",
                  "expires_in": 885,
                  "redirect_url": null,
                  "customer": {
                    "name": "Ngozi Nwosu",
                    "email": ""
                  },
                  "account": {
                    "number": "8021234701",
                    "name": "MONETRA - Ngozi Nwosu",
                    "bank": "..."
                  },
                  "instruction": "Send exactly NGN 45,000.70 to the account below from your banking app.",
                  "note": "The exact kobo matters. It is how we know the payment is yours.",
                  "message": "Waiting for your transfer. Bank transfers can take a minute, so this page will update on its own."
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/checkout/{reference}/details": {
      "post": {
        "operationId": "post_checkout_by_reference_details",
        "summary": "Submit payer details",
        "description": "Name and email for an anonymous session, which then shows an account.\n\nNo key needed. The checkout reference in the path is the credential, so treat it as one.",
        "tags": [
          "Checkout"
        ],
        "security": [],
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Your own reference for the record, or ours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Reference page",
          "url": "https://docs.paymonetra.com/reference/checkout-details/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/card_balance": {
      "get": {
        "operationId": "get_card_balance",
        "summary": "List card balances",
        "description": "Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/balances/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string"
                    },
                    "balances": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "currency": {
                            "type": "string"
                          },
                          "balance": {
                            "type": "number"
                          },
                          "reserve": {
                            "type": "number"
                          },
                          "spendable": {
                            "type": "number"
                          },
                          "low_balance_alert": {
                            "type": "number"
                          },
                          "funding": {
                            "type": "object",
                            "properties": {
                              "available": {
                                "type": "boolean"
                              },
                              "type": {
                                "type": "string"
                              },
                              "bank_name": {
                                "type": "string"
                              },
                              "account_number": {
                                "type": "string"
                              },
                              "account_name": {
                                "type": "string"
                              },
                              "fee": {},
                              "topup_fee": {
                                "type": "object",
                                "properties": {
                                  "percent": {
                                    "type": "number"
                                  },
                                  "cap": {
                                    "type": "number"
                                  }
                                }
                              },
                              "note": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "mode": "live",
                  "balances": [
                    {
                      "currency": "NGN",
                      "balance": 1000000,
                      "reserve": 500000,
                      "spendable": 500000,
                      "low_balance_alert": 100000,
                      "funding": {
                        "available": true,
                        "type": "bank_account",
                        "bank_name": "...",
                        "account_number": "50xxxxxxxx",
                        "account_name": "MONETRA - Your Business (Card funding)",
                        "fee": null,
                        "topup_fee": {
                          "percent": 0.5,
                          "cap": 500
                        },
                        "note": "..."
                      }
                    },
                    {
                      "currency": "USD",
                      "balance": 800,
                      "reserve": 300,
                      "spendable": 500,
                      "low_balance_alert": 0,
                      "funding": {
                        "available": true,
                        "type": "usdt_address",
                        "rate": "1 USDT = $1, less the USDT top-up fee",
                        "fee": null,
                        "topup_fee": {
                          "flat": 1,
                          "percent": 1.5
                        },
                        "addresses": [
                          {
                            "coin": "USDT",
                            "network": "TRC20",
                            "address": "T...",
                            "tag": ""
                          },
                          {
                            "coin": "USDT",
                            "network": "BEP20",
                            "address": "0x...",
                            "tag": ""
                          }
                        ],
                        "note": "..."
                      }
                    }
                  ]
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/card_balance/entries": {
      "get": {
        "operationId": "get_card_balance_entries",
        "summary": "List card balance entries",
        "description": "Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/balances/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cards/pricing": {
      "get": {
        "operationId": "get_cards_pricing",
        "summary": "Get card prices",
        "description": "Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/pricing/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cardholders": {
      "post": {
        "operationId": "post_cardholders",
        "summary": "Create a cardholder",
        "description": "Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/cardholders/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cardholder_ref": {
                      "type": "string"
                    },
                    "reference": {
                      "type": "string"
                    },
                    "first_name": {
                      "type": "string"
                    },
                    "middle_name": {
                      "type": "string"
                    },
                    "last_name": {
                      "type": "string"
                    },
                    "phone": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "id_type": {
                      "type": "string"
                    },
                    "id_last4": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "can_hold": {
                      "type": "object",
                      "properties": {
                        "naira": {
                          "type": "boolean"
                        },
                        "dollar": {
                          "type": "boolean"
                        }
                      }
                    },
                    "active_cards": {
                      "type": "number"
                    },
                    "verified_at": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "cardholder_ref": "chd_51c0e9a3f7d2b8",
                  "reference": "user-1001",
                  "first_name": "Tunde",
                  "middle_name": "",
                  "last_name": "Bakare",
                  "phone": "08031234567",
                  "email": "tunde@example.com",
                  "id_type": "bvn",
                  "id_last4": "2222",
                  "status": "verified",
                  "can_hold": {
                    "naira": true,
                    "dollar": true
                  },
                  "active_cards": 0,
                  "verified_at": "...",
                  "created_at": "..."
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "first_name": {
                    "type": "string"
                  },
                  "last_name": {
                    "type": "string"
                  },
                  "dob": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "line1": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string"
                      },
                      "postal_code": {
                        "type": "string"
                      }
                    }
                  },
                  "id_type": {
                    "type": "string"
                  },
                  "id_number": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "reference": "user-1001",
                "first_name": "Tunde",
                "last_name": "Bakare",
                "dob": "1990-05-14",
                "phone": "08031234567",
                "email": "tunde@example.com",
                "address": {
                  "line1": "12 Allen Avenue",
                  "city": "Ikeja",
                  "state": "Lagos",
                  "postal_code": "100271"
                },
                "id_type": "bvn",
                "id_number": "22222222222"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_cardholders",
        "summary": "List cardholders",
        "description": "Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/cardholders/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cardholders/{cardholder_ref}": {
      "get": {
        "operationId": "get_cardholders_by_cardholder_ref",
        "summary": "Get a cardholder",
        "description": "Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "cardholder_ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/cardholders/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cards": {
      "post": {
        "operationId": "post_cards",
        "summary": "Create a card",
        "description": "Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/manage/"
        },
        "responses": {
          "201": {
            "description": "The card.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "card_ref": {
                      "type": "string"
                    },
                    "reference": {
                      "type": "string"
                    },
                    "cardholder_ref": {
                      "type": "string"
                    },
                    "holder_name": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "brand": {
                      "type": "string"
                    },
                    "last4": {
                      "type": "string"
                    },
                    "expiry": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "frozen_reason": {},
                    "balance": {},
                    "controls": {
                      "type": "object",
                      "properties": {
                        "web": {
                          "type": "boolean"
                        },
                        "pos": {
                          "type": "boolean"
                        },
                        "atm": {
                          "type": "boolean"
                        }
                      }
                    },
                    "next_fee_at": {
                      "type": "string"
                    },
                    "fee_unpaid_since": {},
                    "mode": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "issued_at": {
                      "type": "string"
                    },
                    "terminated_at": {}
                  }
                },
                "example": {
                  "card_ref": "crd_8a31f0c2d9b4e7",
                  "reference": "card-1001",
                  "cardholder_ref": "chd_51c0e9a3f7d2b8",
                  "holder_name": "Tunde Bakare",
                  "currency": "NGN",
                  "brand": "verve",
                  "last4": "4821",
                  "expiry": "11/29",
                  "status": "active",
                  "frozen_reason": null,
                  "balance": null,
                  "controls": {
                    "web": true,
                    "pos": true,
                    "atm": false
                  },
                  "next_fee_at": "2026-12-06",
                  "fee_unpaid_since": null,
                  "mode": "live",
                  "created_at": "...",
                  "issued_at": "...",
                  "terminated_at": null
                }
              }
            }
          },
          "202": {
            "description": "pending_confirmation: we asked for the card and are confirming it. Don't retry with a new reference. You get card.created when it's ready, or card.failed with everything returned."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cardholder_ref": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "controls": {
                    "type": "object",
                    "properties": {
                      "web": {
                        "type": "boolean"
                      },
                      "pos": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              },
              "example": {
                "cardholder_ref": "chd_51c0e9a3f7d2b8",
                "currency": "NGN",
                "reference": "card-1001",
                "controls": {
                  "web": true,
                  "pos": true
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_cards",
        "summary": "List cards",
        "description": "Answers `{ cards, limit, offset }`. Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "cardholder_ref",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/manage/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cards/{card_ref}": {
      "get": {
        "operationId": "get_cards_by_card_ref",
        "summary": "Get a card",
        "description": "Answers the card (a dollar card's balance is read live). Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "card_ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/manage/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cards/{card_ref}/freeze": {
      "post": {
        "operationId": "post_cards_by_card_ref_freeze",
        "summary": "Freeze a card",
        "description": "Answers the card. Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "card_ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/manage/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cards/{card_ref}/unfreeze": {
      "post": {
        "operationId": "post_cards_by_card_ref_unfreeze",
        "summary": "Unfreeze a card",
        "description": "Answers the card (`409 fee_unpaid` if frozen for an unpaid fee). Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "card_ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/manage/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cards/{card_ref}/controls": {
      "post": {
        "operationId": "post_cards_by_card_ref_controls",
        "summary": "Update the controls on a card",
        "description": "Answers the card. Takes any of `web`, `pos`, `atm`. Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "card_ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/manage/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "web": {
                    "type": "string"
                  },
                  "pos": {
                    "type": "string"
                  },
                  "atm": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/cards/{card_ref}/terminate": {
      "post": {
        "operationId": "post_cards_by_card_ref_terminate",
        "summary": "Close a card",
        "description": "Answers `{ card, returned: { amount, currency } }`. Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "card_ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/manage/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "409": {
            "description": "A load, withdrawal or close on a card while another is still going through on the same card answers 409 card_busy. Try again a moment later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cards/{card_ref}/fund": {
      "post": {
        "operationId": "post_cards_by_card_ref_fund",
        "summary": "Load a card",
        "description": "Answers `{ fund, card }`, or `202 pending_confirmation`. Takes dollar cards: `amount_usd`, `reference`. Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "card_ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/manage/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "409": {
            "description": "A load, withdrawal or close on a card while another is still going through on the same card answers 409 card_busy. Try again a moment later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount_usd": {
                    "type": "number"
                  },
                  "reference": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/cards/{card_ref}/withdraw": {
      "post": {
        "operationId": "post_cards_by_card_ref_withdraw",
        "summary": "Withdraw from a card",
        "description": "Answers `{ withdrawal, card }`. Takes dollar cards: `amount_usd`, `reference`. Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "card_ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/manage/"
        },
        "responses": {
          "200": {
            "description": "A reference you have already used: the withdrawal it made, again."
          },
          "201": {
            "description": "Test mode: the withdrawal, settled at once."
          },
          "202": {
            "description": "Live mode, pending_confirmation: the money leaves the card at once and reaches your USD balance when the card network confirms it, usually within 10 minutes, with card.withdrawn."
          },
          "409": {
            "description": "A load, withdrawal or close on a card while another is still going through on the same card answers 409 card_busy. Try again a moment later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount_usd": {
                    "type": "number"
                  },
                  "reference": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/cards/{card_ref}/details_link": {
      "post": {
        "operationId": "post_cards_by_card_ref_details_link",
        "summary": "Get a details link for a card",
        "description": "Answers `{ url, expires_at }`. Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "card_ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/manage/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cards/{card_ref}/transactions": {
      "get": {
        "operationId": "get_cards_by_card_ref_transactions",
        "summary": "List the payments on one card",
        "description": "Answers `{ transactions, limit, offset }`. Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "card_ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/payments/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transactions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CardTransaction"
                      }
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/card_transactions": {
      "get": {
        "operationId": "get_card_transactions",
        "summary": "List card transactions",
        "description": "Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/payments/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transactions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CardTransaction"
                      }
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/card_transactions/{id}": {
      "get": {
        "operationId": "get_card_transactions_by_id",
        "summary": "Get a card transaction",
        "description": "Your secret key, live or test. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/payments/"
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardTransaction"
                },
                "example": {
                  "id": "ctx_4f1c9a20b7e3d518",
                  "card_ref": "crd_8a31f0c2d9b4e7",
                  "amount": 12500,
                  "currency": "NGN",
                  "merchant": {
                    "name": "SHOPRITE LEKKI",
                    "category": "5411",
                    "country": "NG"
                  },
                  "channel": "pos",
                  "status": "approved",
                  "reason": null,
                  "refunded": 0,
                  "at": "..."
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/sandbox/card_funding": {
      "post": {
        "operationId": "post_sandbox_card_funding",
        "summary": "Simulate a credit to a card balance",
        "description": "Your test secret key. This route answers in test mode only. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/test-mode/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "number"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/cards/{card_ref}/simulate": {
      "post": {
        "operationId": "post_cards_by_card_ref_simulate",
        "summary": "Simulate a payment on a card",
        "description": "Your test secret key. This route answers in test mode only. Card issuing is available on request.",
        "tags": [
          "Cards"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "card_ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/test-mode/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "merchant": {
                    "type": "string"
                  },
                  "channel": {
                    "type": "string"
                  },
                  "outcome": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bills/services": {
      "get": {
        "operationId": "get_bills_services",
        "summary": "List bill services",
        "description": "Each service, available, min_amount/max_amount where fixed, your discount_pct Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/catalogue/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/bills/airtime/networks": {
      "get": {
        "operationId": "get_bills_airtime_networks",
        "summary": "List airtime networks",
        "description": "network: MTN, GLO, AIRTEL, 9MOBILE Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/catalogue/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/bills/data/plans": {
      "get": {
        "operationId": "get_bills_data_plans",
        "summary": "List data plans",
        "description": "plan_code, name, amount, validity Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "network",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/catalogue/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/bills/cable/plans": {
      "get": {
        "operationId": "get_bills_cable_plans",
        "summary": "List cable TV plans",
        "description": "biller: gotv, dstv, startimes. plan_code, name, amount Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "biller",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/catalogue/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/bills/electricity/billers": {
      "get": {
        "operationId": "get_bills_electricity_billers",
        "summary": "List electricity billers",
        "description": "biller_id, name, code; meter_types prepaid, postpaid Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/catalogue/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/bills/exam/billers": {
      "get": {
        "operationId": "get_bills_exam_billers",
        "summary": "List exam pin billers",
        "description": "biller waec, neco, nabteb; price per pin; max_quantity 10 Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/catalogue/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/bills/international/countries": {
      "get": {
        "operationId": "get_bills_international_countries",
        "summary": "List countries for international airtime",
        "description": "country (ISO), name, dial_code, currency Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/catalogue/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/bills/international/operators": {
      "get": {
        "operationId": "get_bills_international_operators",
        "summary": "List operators for international airtime",
        "description": "operator_id, name, denomination_type (fixed or range), min_amount_usd, max_amount_usd, fixed_amounts_usd, destination_currency Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/catalogue/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/bills/international/quote": {
      "post": {
        "operationId": "post_bills_international_quote",
        "summary": "Quote international airtime",
        "description": "{operator_id, country, amount_usd} → amount_ngn, valid_for_seconds 600 Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/catalogue/"
        },
        "responses": {
          "200": {
            "description": "The price in naira, and how long it holds.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "amount_ngn": {
                      "type": "number"
                    },
                    "valid_for_seconds": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operator_id": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "amount_usd": {
                    "type": "number"
                  }
                },
                "required": [
                  "operator_id",
                  "country",
                  "amount_usd"
                ]
              }
            }
          }
        }
      }
    },
    "/bills/verify": {
      "post": {
        "operationId": "post_bills_verify",
        "summary": "Check an account name",
        "description": "Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/verify/"
        },
        "responses": {
          "200": {
            "description": "The name on the account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "service": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "service": "cable",
                  "name": "ADA OBI"
                }
              }
            }
          },
          "403": {
            "description": "bills_not_enabled: Live key, not switched on for this business. ip_not_allowed: Live purchase or check from an unlisted IP. account_restricted: The business cannot spend right now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "busy: Another payment from this business is going through; retry with the same reference. price_changed: International quote moved; new amount_ngn included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request: A field is wrong; see field. not_confirmed: Smartcard or meter could not be confirmed. insufficient_balance: Not enough available balance. daily_limit: Past today's API bill limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "service_unavailable: Service paused, or not offered over the API yet. rate_unavailable: International: dollar rate being updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "service": {
                    "type": "string"
                  },
                  "biller": {
                    "type": "string"
                  },
                  "smartcard": {
                    "type": "string"
                  },
                  "biller_id": {
                    "type": "number"
                  },
                  "meter_number": {
                    "type": "string"
                  },
                  "meter_type": {
                    "type": "string"
                  }
                }
              },
              "examples": {
                "cable": {
                  "value": {
                    "service": "cable",
                    "biller": "dstv",
                    "smartcard": "1234567890"
                  }
                },
                "electricity": {
                  "value": {
                    "service": "electricity",
                    "biller_id": 3,
                    "meter_number": "45012345678",
                    "meter_type": "prepaid"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bills/airtime": {
      "post": {
        "operationId": "post_bills_airtime",
        "summary": "Buy airtime",
        "description": "Retry with the same reference, never a new one. Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/purchases/"
        },
        "responses": {
          "200": {
            "description": "A reference you already used: the first purchase, and nothing bought.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "201": {
            "description": "A new purchase. A processing one is not an error: the outcome follows by webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "403": {
            "description": "bills_not_enabled: Live key, not switched on for this business. ip_not_allowed: Live purchase or check from an unlisted IP. account_restricted: The business cannot spend right now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "busy: Another payment from this business is going through; retry with the same reference. price_changed: International quote moved; new amount_ngn included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request: A field is wrong; see field. not_confirmed: Smartcard or meter could not be confirmed. insufficient_balance: Not enough available balance. daily_limit: Past today's API bill limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "service_unavailable: Service paused, or not offered over the API yet. rate_unavailable: International: dollar rate being updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "network": {
                    "type": "string"
                  }
                },
                "required": [
                  "reference",
                  "phone",
                  "amount"
                ]
              }
            }
          }
        }
      }
    },
    "/bills/data": {
      "post": {
        "operationId": "post_bills_data",
        "summary": "Buy data",
        "description": "Retry with the same reference, never a new one. Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/purchases/"
        },
        "responses": {
          "200": {
            "description": "A reference you already used: the first purchase, and nothing bought.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "201": {
            "description": "A new purchase. A processing one is not an error: the outcome follows by webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "403": {
            "description": "bills_not_enabled: Live key, not switched on for this business. ip_not_allowed: Live purchase or check from an unlisted IP. account_restricted: The business cannot spend right now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "busy: Another payment from this business is going through; retry with the same reference. price_changed: International quote moved; new amount_ngn included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request: A field is wrong; see field. not_confirmed: Smartcard or meter could not be confirmed. insufficient_balance: Not enough available balance. daily_limit: Past today's API bill limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "service_unavailable: Service paused, or not offered over the API yet. rate_unavailable: International: dollar rate being updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "plan_code": {
                    "type": "string"
                  },
                  "network": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "number"
                  }
                },
                "required": [
                  "reference",
                  "phone",
                  "plan_code"
                ]
              }
            }
          }
        }
      }
    },
    "/bills/cable": {
      "post": {
        "operationId": "post_bills_cable",
        "summary": "Pay for cable TV",
        "description": "Retry with the same reference, never a new one. Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/purchases/"
        },
        "responses": {
          "200": {
            "description": "A reference you already used: the first purchase, and nothing bought.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "201": {
            "description": "A new purchase. A processing one is not an error: the outcome follows by webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "403": {
            "description": "bills_not_enabled: Live key, not switched on for this business. ip_not_allowed: Live purchase or check from an unlisted IP. account_restricted: The business cannot spend right now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "busy: Another payment from this business is going through; retry with the same reference. price_changed: International quote moved; new amount_ngn included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request: A field is wrong; see field. not_confirmed: Smartcard or meter could not be confirmed. insufficient_balance: Not enough available balance. daily_limit: Past today's API bill limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "service_unavailable: Service paused, or not offered over the API yet. rate_unavailable: International: dollar rate being updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "biller": {
                    "type": "string"
                  },
                  "smartcard": {
                    "type": "string"
                  },
                  "plan_code": {
                    "type": "string"
                  }
                },
                "required": [
                  "reference",
                  "biller",
                  "smartcard",
                  "plan_code"
                ]
              }
            }
          }
        }
      }
    },
    "/bills/electricity": {
      "post": {
        "operationId": "post_bills_electricity",
        "summary": "Pay for electricity",
        "description": "Retry with the same reference, never a new one. Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/purchases/"
        },
        "responses": {
          "200": {
            "description": "A reference you already used: the first purchase, and nothing bought.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "201": {
            "description": "A new purchase. A processing one is not an error: the outcome follows by webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                },
                "example": {
                  "id": "MB3F9A1C0D2E4B5A6C7D",
                  "reference": "order-1042",
                  "service": "electricity",
                  "status": "successful",
                  "biller": "Ikeja Electric",
                  "recipient": "45012345678",
                  "recipient_name": "ADA OBI",
                  "plan": "Prepaid",
                  "amount": 5000,
                  "charged": 5000,
                  "currency": "NGN",
                  "mode": "live",
                  "created_at": "2026-11-28T10:15:02+01:00",
                  "completed_at": "2026-11-28T10:15:05+01:00",
                  "token": "1234-5678-9012-3456-7890",
                  "units": "52.3kWh"
                }
              }
            }
          },
          "403": {
            "description": "bills_not_enabled: Live key, not switched on for this business. ip_not_allowed: Live purchase or check from an unlisted IP. account_restricted: The business cannot spend right now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "busy: Another payment from this business is going through; retry with the same reference. price_changed: International quote moved; new amount_ngn included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request: A field is wrong; see field. not_confirmed: Smartcard or meter could not be confirmed. insufficient_balance: Not enough available balance. daily_limit: Past today's API bill limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "service_unavailable: Service paused, or not offered over the API yet. rate_unavailable: International: dollar rate being updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "biller_id": {
                    "type": "number"
                  },
                  "meter_number": {
                    "type": "string"
                  },
                  "meter_type": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "number"
                  }
                },
                "required": [
                  "reference",
                  "biller_id",
                  "meter_number",
                  "meter_type",
                  "amount"
                ]
              },
              "example": {
                "reference": "order-1042",
                "biller_id": 3,
                "meter_number": "45012345678",
                "meter_type": "prepaid",
                "amount": 5000
              }
            }
          }
        }
      }
    },
    "/bills/exam": {
      "post": {
        "operationId": "post_bills_exam",
        "summary": "Buy exam pins",
        "description": "Retry with the same reference, never a new one. Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/purchases/"
        },
        "responses": {
          "200": {
            "description": "A reference you already used: the first purchase, and nothing bought.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "201": {
            "description": "A new purchase. A processing one is not an error: the outcome follows by webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "403": {
            "description": "bills_not_enabled: Live key, not switched on for this business. ip_not_allowed: Live purchase or check from an unlisted IP. account_restricted: The business cannot spend right now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "busy: Another payment from this business is going through; retry with the same reference. price_changed: International quote moved; new amount_ngn included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request: A field is wrong; see field. not_confirmed: Smartcard or meter could not be confirmed. insufficient_balance: Not enough available balance. daily_limit: Past today's API bill limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "service_unavailable: Service paused, or not offered over the API yet. rate_unavailable: International: dollar rate being updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "biller": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "number"
                  }
                },
                "required": [
                  "reference",
                  "biller",
                  "quantity"
                ]
              }
            }
          }
        }
      }
    },
    "/bills/international": {
      "post": {
        "operationId": "post_bills_international",
        "summary": "Buy international airtime",
        "description": "Retry with the same reference, never a new one. Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/purchases/"
        },
        "responses": {
          "200": {
            "description": "A reference you already used: the first purchase, and nothing bought.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "201": {
            "description": "A new purchase. A processing one is not an error: the outcome follows by webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                }
              }
            }
          },
          "403": {
            "description": "bills_not_enabled: Live key, not switched on for this business. ip_not_allowed: Live purchase or check from an unlisted IP. account_restricted: The business cannot spend right now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "busy: Another payment from this business is going through; retry with the same reference. price_changed: International quote moved; new amount_ngn included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_request: A field is wrong; see field. not_confirmed: Smartcard or meter could not be confirmed. insufficient_balance: Not enough available balance. daily_limit: Past today's API bill limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "service_unavailable: Service paused, or not offered over the API yet. rate_unavailable: International: dollar rate being updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  },
                  "operator_id": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "amount_usd": {
                    "type": "number"
                  },
                  "amount_ngn": {
                    "type": "number"
                  }
                },
                "required": [
                  "reference",
                  "operator_id",
                  "country",
                  "phone",
                  "amount_usd"
                ]
              }
            }
          }
        }
      }
    },
    "/bills": {
      "get": {
        "operationId": "get_bills",
        "summary": "List bills",
        "description": "Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/results/"
        },
        "responses": {
          "200": {
            "description": "Success."
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/bills/{reference}": {
      "get": {
        "operationId": "get_bills_by_reference",
        "summary": "Get a bill",
        "description": "Your secret key, live or test.",
        "tags": [
          "Bill payments"
        ],
        "security": [
          {
            "secretKeyBearer": []
          },
          {
            "secretKeyBasic": []
          }
        ],
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Your own reference for the record, or ours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/bills/results/"
        },
        "responses": {
          "200": {
            "description": "The bill.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bill"
                },
                "example": {
                  "id": "MB3F9A1C0D2E4B5A6C7D",
                  "reference": "order-1042",
                  "service": "electricity",
                  "status": "successful",
                  "biller": "Ikeja Electric",
                  "recipient": "45012345678",
                  "recipient_name": "ADA OBI",
                  "plan": "Prepaid",
                  "amount": 5000,
                  "charged": 5000,
                  "currency": "NGN",
                  "mode": "live",
                  "created_at": "2026-11-28T10:15:02+01:00",
                  "completed_at": "2026-11-28T10:15:05+01:00",
                  "token": "1234-5678-9012-3456-7890",
                  "units": "52.3kWh"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "webhooks": {
    "card.transaction.approved": {
      "post": {
        "summary": "card.transaction.approved",
        "description": "A payment was approved. Answer with a 2xx. We retry anything else for about a day, so the same event can arrive twice: use the transaction or card id to ignore repeats.",
        "parameters": [
          {
            "name": "X-Paymonetra-Signature",
            "in": "header",
            "required": true,
            "description": "HMAC-SHA512 of the raw body, keyed with your webhook secret for the mode.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "const": "card.transaction.approved"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "test",
                      "live"
                    ]
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "data": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/CardTransaction"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "card_reference": {
                            "type": "string"
                          },
                          "cardholder_ref": {
                            "type": "string"
                          },
                          "card_balance": {
                            "type": "object",
                            "properties": {
                              "spendable": {
                                "type": "number"
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              },
              "example": {
                "event": "card.transaction.approved",
                "mode": "live",
                "created_at": "2026-11-20T14:02:11+01:00",
                "data": {
                  "id": "ctx_4f1c9a20b7e3d518",
                  "card_ref": "crd_8a31f0c2d9b4e7",
                  "card_reference": "card-1001",
                  "cardholder_ref": "chd_51c0e9a3f7d2b8",
                  "amount": 12500,
                  "currency": "NGN",
                  "merchant": {
                    "name": "SHOPRITE LEKKI",
                    "category": "5411",
                    "country": "NG"
                  },
                  "channel": "pos",
                  "status": "approved",
                  "card_balance": {
                    "spendable": 737485
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received."
          }
        }
      }
    },
    "card.transaction.declined": {
      "post": {
        "summary": "card.transaction.declined",
        "description": "A payment was declined, or \"reversed\": true when declined after approval and the money came back. Answer with a 2xx. We retry anything else for about a day, so the same event can arrive twice: use the transaction or card id to ignore repeats.",
        "parameters": [
          {
            "name": "X-Paymonetra-Signature",
            "in": "header",
            "required": true,
            "description": "HMAC-SHA512 of the raw body, keyed with your webhook secret for the mode.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "const": "card.transaction.declined"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "test",
                      "live"
                    ]
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "data": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/CardTransaction"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "card_reference": {
                            "type": "string"
                          },
                          "cardholder_ref": {
                            "type": "string"
                          },
                          "card_balance": {
                            "type": "object",
                            "properties": {
                              "spendable": {
                                "type": "number"
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received."
          }
        }
      }
    },
    "card.transaction.refunded": {
      "post": {
        "summary": "card.transaction.refunded",
        "description": "A shop refunded a payment. Answer with a 2xx. We retry anything else for about a day, so the same event can arrive twice: use the transaction or card id to ignore repeats.",
        "parameters": [
          {
            "name": "X-Paymonetra-Signature",
            "in": "header",
            "required": true,
            "description": "HMAC-SHA512 of the raw body, keyed with your webhook secret for the mode.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "const": "card.transaction.refunded"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "test",
                      "live"
                    ]
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "data": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/CardTransaction"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "card_reference": {
                            "type": "string"
                          },
                          "cardholder_ref": {
                            "type": "string"
                          },
                          "card_balance": {
                            "type": "object",
                            "properties": {
                              "spendable": {
                                "type": "number"
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received."
          }
        }
      }
    },
    "card.authorization.request": {
      "post": {
        "summary": "Approve a naira card payment",
        "description": "Turn this on if you keep each user's money in your own system and want the final say on every naira card payment, for example to stop a user spending more than they hold with you. Sent to the address you save for it, not to your webhook URL.",
        "externalDocs": {
          "description": "Documentation",
          "url": "https://docs.paymonetra.com/cards/payments/#approve-payments-yourself-optional"
        },
        "parameters": [
          {
            "name": "X-Paymonetra-Signature",
            "in": "header",
            "required": true,
            "description": "HMAC-SHA512 of the raw body, keyed with your webhook secret for the mode.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Paymonetra-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "card.authorization.request"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string"
                  },
                  "mode": {
                    "type": "string"
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "card_ref": {
                        "type": "string"
                      },
                      "card_reference": {
                        "type": "string"
                      },
                      "cardholder_ref": {
                        "type": "string"
                      },
                      "last4": {
                        "type": "string"
                      },
                      "amount": {
                        "type": "number"
                      },
                      "fee": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string"
                      },
                      "merchant": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          }
                        }
                      },
                      "channel": {
                        "type": "string"
                      },
                      "card_balance": {
                        "type": "object",
                        "properties": {
                          "spendable": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "event": "card.authorization.request",
                "mode": "live",
                "created_at": "2026-11-20T14:02:10+01:00",
                "data": {
                  "id": "ctx_4f1c9a20b7e3d518",
                  "card_ref": "crd_8a31f0c2d9b4e7",
                  "card_reference": "card-1001",
                  "cardholder_ref": "chd_51c0e9a3f7d2b8",
                  "last4": "4821",
                  "amount": 12500,
                  "currency": "NGN",
                  "merchant": {
                    "name": "SHOPRITE LEKKI",
                    "category": "5411",
                    "country": "NG"
                  },
                  "channel": "pos",
                  "card_balance": {
                    "spendable": 750010
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Your decision. Anything else, a status other than 2xx, or no answer within 2 seconds counts as no answer, and your default applies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "approved": {
                      "type": "boolean"
                    },
                    "reason": {
                      "type": "string",
                      "maxLength": 100
                    }
                  },
                  "required": [
                    "approved"
                  ]
                },
                "examples": {
                  "approve": {
                    "value": {
                      "approved": true
                    }
                  },
                  "decline": {
                    "value": {
                      "approved": false,
                      "reason": "wallet_empty"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "bill.successful": {
      "post": {
        "summary": "bill.successful",
        "description": "Delivered. This also follows a `processing` purchase once it is confirmed.",
        "parameters": [
          {
            "name": "X-Paymonetra-Signature",
            "in": "header",
            "required": true,
            "description": "HMAC-SHA512 of the raw body, keyed with your webhook secret for the mode.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "const": "bill.successful"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "test",
                      "live"
                    ]
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Bill"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received."
          }
        }
      }
    },
    "bill.failed": {
      "post": {
        "summary": "bill.failed",
        "description": "Not delivered, money back. This follows a refused purchase, a `processing` one that turned out failed, or a successful one later reversed.",
        "parameters": [
          {
            "name": "X-Paymonetra-Signature",
            "in": "header",
            "required": true,
            "description": "HMAC-SHA512 of the raw body, keyed with your webhook secret for the mode.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "const": "bill.failed"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "test",
                      "live"
                    ]
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Bill"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "secretKeyBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your secret key as a bearer token: Authorization: Bearer sk_live_..."
      },
      "secretKeyBasic": {
        "type": "http",
        "scheme": "basic",
        "description": "Your secret key as the basic auth username, with an empty password."
      }
    },
    "schemas": {
      "CardTransaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "card_ref": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "fee": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "merchant": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "category": {
                "type": "string"
              },
              "country": {
                "type": "string"
              }
            }
          },
          "channel": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "reason": {},
          "refunded": {
            "type": "number"
          },
          "at": {
            "type": "string"
          },
          "your_server": {
            "type": "object",
            "properties": {
              "answer": {
                "type": "string",
                "enum": [
                  "approved",
                  "declined",
                  "no_answer"
                ]
              },
              "reason": {},
              "response_ms": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "answer"
            ],
            "description": "Present only when your server was asked to approve this payment. See https://docs.paymonetra.com/cards/payments/#approve-payments-yourself-optional"
          }
        },
        "description": "A card payment."
      },
      "Bill": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "successful",
              "processing",
              "failed"
            ]
          },
          "biller": {
            "type": "string"
          },
          "recipient": {
            "type": "string"
          },
          "recipient_name": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "charged": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "completed_at": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "units": {
            "type": "string"
          }
        },
        "description": "A bill payment."
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      }
    },
    "responses": {
      "Error": {
        "description": "A refusal. The type is stable and the message is written for a person.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "type": "invalid_request",
                "message": "customer_reference is required.",
                "field": "customer_reference"
              }
            }
          }
        }
      }
    }
  }
}
