POST
/
v1
/
payment-codes
Create Payment Code
curl --request POST \
  --url https://api.monime.io/v1/payment-codes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --header 'Monime-Space-Id: <monime-space-id>' \
  --data '{
  "mode": "one_time",
  "name": "Home EDSA Meter Top-up",
  "enable": true,
  "amount": {
    "currency": "<string>",
    "value": 123
  },
  "duration": "1h30m",
  "customer": {
    "name": "Musa Kamara"
  },
  "reference": "<string>",
  "authorizedProviders": [
    "m17"
  ],
  "authorizedPhoneNumber": "<string>",
  "recurrentPaymentTarget": {
    "expectedPaymentCount": 10,
    "expectedPaymentTotal": {
      "currency": "<string>",
      "value": 123
    }
  },
  "financialAccountId": "<string>",
  "metadata": {}
}'
{
  "success": true,
  "messages": [
    "<any>"
  ],
  "result": {
    "id": "<string>",
    "mode": "one_time",
    "status": "pending",
    "name": "Home EDSA Meter Top-up",
    "amount": {
      "currency": "<string>",
      "value": 123
    },
    "enable": true,
    "expireTime": "2023-11-07T05:31:56Z",
    "customer": {
      "name": "Musa Kamara"
    },
    "ussdCode": "<string>",
    "reference": "<string>",
    "authorizedProviders": [
      "m17",
      "m18"
    ],
    "authorizedPhoneNumber": "<string>",
    "recurrentPaymentTarget": {
      "expectedPaymentCount": 10,
      "expectedPaymentTotal": {
        "currency": "<string>",
        "value": 123
      }
    },
    "financialAccountId": "<string>",
    "processedPaymentData": {
      "amount": {
        "currency": "<string>",
        "value": 123
      },
      "orderId": "<string>",
      "paymentId": "<string>",
      "orderNumber": "<string>",
      "channelData": {
        "providerId": "<string>",
        "accountId": "<string>",
        "reference": "<string>"
      },
      "financialTransactionReference": "<string>",
      "metadata": {}
    },
    "createTime": "2023-11-07T05:31:56Z",
    "updateTime": "2023-11-07T05:31:56Z",
    "ownershipGraph": {
      "owner": {
        "id": "<string>",
        "type": "<string>",
        "metadata": {},
        "owner": {
          "id": "<string>",
          "type": "<string>",
          "metadata": {},
          "owner": {}
        }
      }
    },
    "metadata": {}
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string
required

This header is used to uniquely identify a logical request, ensuring that it is not processed more than once during retries.

Maximum length: 64
Monime-Space-Id
string
required

The value is the tenancy parameter that Monime uses to determine which space the request is intended for.

Maximum length: 64

Body

application/json

Creates a new payment code with the specified parameters for value collection and provider restrictions.

Response

200 - application/json

OK

The response is of type object.