Skip to main content
POST
/
api
/
agent
/
link
/
init
Init new transaction
curl --request POST \
  --url https://soleaspay.com/api/agent/link/init \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "payment_receiver": "SP20208U",
  "payment_id": "20000553G",
  "amount": 10000,
  "distribution": [
    {
      "matricule": "SP20231M",
      "rate": 15
    }
  ]
}
'
{
  "success": true,
  "message": "Transaction linked successfully"
}

Authorizations

Authorization
string
header
required

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

Headers

x-api-key
string
required

Your authentication API key.

Example:

"Your-Apikey-Here"

Body

application/json
payment_receiver
string
required

The SoPay ID of the main payment receiver.

Example:

"SP20208U"

payment_id
string
required

A unique order ID for the current payment.

Example:

"20000553G"

amount
number<float>
required

The total amount of the transaction.

Example:

10000

distribution
object[]
required

List of users (by matricule) and the percentage they will receive.

Response

Transaction initialized successfully

success
boolean
Example:

true

message
string
Example:

"Transaction linked successfully"