Skip to main content
POST
/
v1
/
transactions
Initiate a tag-to-tag payment
curl --request POST \
  --url https://idaas.yourflexpay.com/api/v1/transactions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "senderTag": "@alice",
  "receiverTag": "@bob",
  "amount": 1500,
  "currency": "NGN",
  "narration": "School fees payment",
  "callbackUrl": "https://my-app.example.com/webhooks/transactions",
  "idempotencyKey": "550e8400-e29b-41d4-a716-446655440000"
}
'
{
  "success": true,
  "message": "<string>",
  "errorCode": "<string>",
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "reference": "TXN-16820000-AB1C2D3E",
    "senderTag": "@alice",
    "senderAppName": "WalletApp",
    "senderAppId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "receiverTag": "@bob",
    "receiverAppName": "PaymentsApp",
    "receiverAppId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "amount": 1500,
    "currency": "NGN",
    "status": "AWAITING_ACCEPTANCE",
    "narration": "School fees payment",
    "expiresAt": "2023-11-07T05:31:56Z",
    "acceptedAt": "2023-11-07T05:31:56Z",
    "rejectedAt": "2023-11-07T05:31:56Z",
    "rejectionReason": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "webhooks": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "transactionReference": "TXN-16820000-AB1C2D3E",
        "applicationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "applicationName": "<string>",
        "direction": "RECEIVER",
        "targetUrl": "https://app-b.example.com/webhooks/transactions",
        "eventType": "TRANSACTION_INITIATED",
        "status": "PENDING",
        "attempts": 123,
        "lastError": "<string>",
        "lastAttemptAt": "2023-11-07T05:31:56Z",
        "deliveredAt": "2023-11-07T05:31:56Z",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z"
      }
    ]
  },
  "errors": [
    "<string>"
  ],
  "timestamp": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Obtain a token from POST /v1/auth/token using your client_id and client_secret, then enter Bearer <token> here.

Headers

Idempotency-Key
string

Optional idempotency key (UUID or any unique string, max 128 chars). Duplicate calls with the same key within 24 hours return the original response.

Body

application/json

Request body for initiating a cross-application tag-to-tag payment

senderTag
string
required

The sender's tag handle (must belong to the calling application)

Example:

"@alice"

receiverTag
string
required

The recipient's tag handle (can belong to any application)

Example:

"@bob"

amount
number
required

Positive payment amount with up to 4 decimal places

Required range: x > 0.0001
Example:

1500

currency
string

ISO 4217 currency code (defaults to NGN)

Pattern: ^[A-Z]{3}$
Example:

"NGN"

narration
string

Optional human-readable payment note

Maximum string length: 500
Example:

"School fees payment"

callbackUrl
string

Optional HTTPS URL that IDaaS will POST the final transaction status to once accepted or rejected

Maximum string length: 500
Example:

"https://my-app.example.com/webhooks/transactions"

idempotencyKey
string

Client-supplied idempotency key (UUID v4 recommended). Duplicate calls within 24 hours return the original response.

Maximum string length: 64
Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

Transaction initiated successfully

success
boolean
message
string
errorCode
string
data
object

Full details of a cross-application tag-to-tag payment transaction

errors
string[]
timestamp
string<date-time>