Skip to content

API Paths

All endpoints use POST and are prefixed with /api/v2/. Authentication is via the token header (your API key).


POST /api/v2/createLink

Create a basic payment link.

Headers

Name Required Description
token Yes Your API key
Content-Type Yes application/x-www-form-urlencoded

Body Parameters

Name Type Required Description
amount double Yes Payment amount in EUR (must be > 0)
recipient_note string No Description visible to the payer
callback_url string No Redirect URL called after payment. Pass a full URL, or a zero-based index (0, 1, …) to reference a URL saved in your profile settings
payment_endpoint string No Webhook URL for payment event POST notifications. Pass a full URL, or a zero-based index to reference a URL saved in your profile settings
is_qr_link string No Set to "true" to mark as a Personal QR link
bank_transfer string No Set to "true" to enable bank transfer as a payment option
bank_statement_description string No Description that appears on the customer's bank statement
is_cancellation string No Set to "No" to disable the cancellation button on the payment page (default: "Yes")

Response 200

{
    "data": {
        "linktopay_id": 124,
        "user_id": "b44c4429-4a7b-4e27-85af-c1c2f43f4ffe",
        "amount": "100.00",
        "recipient_note": "Payment for Invoice #1234",
        "status": "Unused",
        "paymentEndpoint": "https://yourapp.com/webhook",
        "callback_url": "https://yourapp.com/callback",
        "servicefee": "1.5",
        "is_split_link": "false",
        "is_qr_link": "false",
        "bank_transfer": "false",
        "transaction_type": "Basic",
        "created_at": "2024-10-26 16:18:01",
        "pay_link": "https://app.secpaid.com/payment?link_id=MTI0",
        "qr_img": "https://quickchart.io/chart?chl=https://app.secpaid.com/payment?link_id=MTI0&chs=300x300&cht=qr"
    },
    "ResponseCode": 1,
    "ResponseMsg": "Link has been created successfully",
    "Result": "True",
    "ServerTime": "CEST"
}

Error Responses

Code Error Description
400 InvalidParameters Missing or invalid body parameters
401 Unauthorized Invalid or missing API key
500 InternalServerError Unexpected server error

POST /api/v2/createSplitLink

Create a split payment link that distributes the received amount across multiple recipients.

Headers

Name Required Description
token Yes Your API key
Content-Type Yes application/json or application/x-www-form-urlencoded

Body Parameters

Name Type Required Description
amount double Yes Total payment amount in EUR
recipients array Yes Array of recipient objects (see below)
recipient_note string No Description visible to the payer
split_type string No "normal" (percentage-based, default) or "absolute" (fixed EUR amounts)
callback_url string No Redirect URL after payment. Pass a full URL, or an index (0, 1, …) referencing a URL saved in your profile
payment_endpoint string No Webhook URL for payment events. Pass a full URL, or an index referencing a URL saved in your profile
is_cancellation string No Set to "No" to disable cancellation (default: "Yes")

Recipient object:

{
    "token": "RECIPIENT_TOKEN",
    "share": 50.00
}

For split_type: "normal", share is a percentage (shares should sum to 100). For split_type: "absolute", share is a fixed EUR amount.

Request Body Example

{
    "amount": 100.00,
    "recipient_note": "Service payment",
    "split_type": "normal",
    "recipients": [
        { "token": "RECIPIENT_TOKEN_A", "share": 60 },
        { "token": "RECIPIENT_TOKEN_B", "share": 40 }
    ]
}

Response 200

{
    "data": {
        "linktopay_id": 125,
        "user_id": "b44c4429-4a7b-4e27-85af-c1c2f43f4ffe",
        "amount": "100.00",
        "recipient_note": "Service payment",
        "status": "Unused",
        "is_split_link": "true",
        "split_type": "normal",
        "transaction_type": "Split",
        "created_at": "2024-10-26 16:20:00",
        "pay_link": "https://app.secpaid.com/payment?link_id=MTI1",
        "qr_img": "https://quickchart.io/chart?chl=https://app.secpaid.com/payment?link_id=MTI1&chs=300x300&cht=qr"
    },
    "ResponseCode": 1,
    "ResponseMsg": "Link has been created successfully",
    "Result": "True",
    "ServerTime": "CEST"
}

POST /api/v2/getMyUnusedLinks

Retrieve a list of your payment links that have not been paid yet.

Headers

Name Required Description
token Yes Your API key

Body Parameters

Name Type Required Description
limit integer No Maximum number of links to return (default: 10)
search string No Filter by recipient_note

Response 200

{
    "data": [
        {
            "linktopay_id": 124,
            "user_id": "b44c4429-4a7b-4e27-85af-c1c2f43f4ffe",
            "recipient_note": "Invoice #1234",
            "amount": "100.00",
            "is_cancelled": "No",
            "is_split_link": "false",
            "transaction_type": "Basic",
            "pay_link": "https://app.secpaid.com/payment?link_id=MTI0",
            "qr_img": "https://quickchart.io/chart?chl=..."
        }
    ],
    "ResponseCode": 1,
    "ResponseMsg": "List retrieved successfully",
    "Result": "True",
    "ServerTime": "CEST"
}

POST /api/v2/getMyUsedLinks

Retrieve a list of payment links that have been paid.

Headers

Name Required Description
token Yes Your API key

Body Parameters

Name Type Required Description
limit integer No Maximum number of links to return (default: 10)
search string No Filter by recipient_note

Response 200

Returns the same structure as getMyUnusedLinks with an additional paid_on field indicating when the payment was completed.


POST /api/v2/deleteLink

Delete an unused payment link. Used links cannot be deleted.

Headers

Name Required Description
token Yes Your API key

Body Parameters

Name Type Required Description
link_id integer Yes The linktopay_id of the link to delete

Response 200

{
    "ResponseCode": 1,
    "ResponseMsg": "Link deleted successfully",
    "Result": "True",
    "ServerTime": "CEST"
}

Error Responses

Condition Description
Link not found Invalid link_id
Link already used Used links cannot be deleted

POST /api/v2/getPayInTransactions

Retrieve your incoming payments (pay-ins) with optional filtering.

Headers

Name Required Description
token Yes Your API key

Body Parameters

Name Type Required Description
limit integer No Max results to return (default: 200)
since integer No Return payments from the past N days. If 0 or omitted, returns today's payments only
date string No Filter by specific date in YYYY-MM-DD format. Overrides since
pay_id string No Retrieve a specific payment by its ID. Overrides date filters
search string No Filter across recipient_note, amount, payment_method, transaction_id, and created_at

Response 200

{
    "data": [
        {
            "pay_id": "42011",
            "user_id": "a95a452a-2c74-465c-b63b-81d73a7a755d",
            "transaction_id": "20241026-pi-QRxbbs7z9n",
            "amount": "1.00",
            "net_amount": "0.83",
            "service_fee": "-0.10",
            "service_fee_psp": "0.27",
            "status": "Success",
            "recipient_note": "Invoice #1234",
            "payout_status": "Pending",
            "created_at": "2024-10-26 16:18:20",
            "is_split_link": "false",
            "is_dispute": "false",
            "is_refund": "false",
            "payment_method": "card",
            "transaction_type": "Basic"
        }
    ],
    "ResponseCode": 1,
    "ResponseMsg": "List retrieved successfully",
    "Result": "True",
    "ServerTime": "CEST"
}

Filtering Logic

  • If pay_id is provided — returns only that specific payment, ignoring all date filters.
  • If date is provided — returns all payments on that exact date.
  • If since is provided — returns payments from the last N days.
  • If none are provided — returns today's payments only.

POST /api/v2/getPayOutTransactions

Retrieve your payout transactions. Payouts are generated nightly, batching all pay-ins from the previous day.

Headers

Name Required Description
token Yes Your API key

Body Parameters

Name Type Required Description
limit integer No Max results to return (default: 10)
search string No Filter by transaction_id

Response 200

{
    "data": [
        {
            "payout_id": "19",
            "user_id": "b44c4429-4a7b-4e27-85af-c1c2f43f4ffe",
            "transaction_id": "20241012-po-WHk3KxTdHQ",
            "payout_amount": "1.23",
            "service_fee": "0.06",
            "net_amount": "1.17",
            "payout_status": "InProgress",
            "request_date": "2024-10-12",
            "created_at": "2024-10-13T01:58:04Z",
            "is_split_link": "false",
            "is_dispute": "false",
            "is_refund": "false"
        }
    ],
    "ResponseCode": 1,
    "ResponseMsg": "List retrieved successfully",
    "Result": "True",
    "ServerTime": "CEST"
}

POST /api/v2/refundPayment

Submit a refund request for a completed payment. Refunds are reviewed by the SecPaid admin team and can be full or partial.

Headers

Name Required Description
token Yes Your API key

Body Parameters

Name Type Required Description
pay_id string Yes The payment ID to refund
refund_amount double Yes The amount to refund (must not exceed the original payment amount)
isFullRefund string No Set to "true" to refund all split recipients. Omit or set to "false" for a standard refund

Notes

  • A pending refund request already exists for the payment — duplicate requests are rejected.
  • Cancelled links and Invoice-type payments cannot be refunded via the API.
  • Approved refunds appear as negative entries in getPayInTransactions.

Response 200

{
    "ResponseCode": 1,
    "ResponseMsg": "Refund request submitted successfully",
    "Result": "True",
    "ServerTime": "CEST"
}

POST /api/v2/getTaxInvoiceList

Retrieve your monthly service fee invoices.

Headers

Name Required Description
token Yes Your API key

Body Parameters

Name Type Required Description
limit integer No Max results to return (default: 200)
page integer No Page number for pagination (default: 1)
date string No Filter by month using a date in YYYY-MM-DD format (matches the service month)
search string No Filter by invoice_id, invoice_date, or service_month

Response 200

{
    "data": [
        {
            "invoice_id": "INV-2024-10",
            "user_id": "b44c4429-4a7b-4e27-85af-c1c2f43f4ffe",
            "invoice_date": "2024-10-01",
            "service_month": "October 2024"
        }
    ],
    "totalRecords": 3,
    "ResponseCode": 1,
    "ResponseMsg": "List retrieved successfully",
    "Result": "True",
    "ServerTime": "CEST"
}

Integration Support

Contact compute@spacepitch.org for integration assistance, API key requests, or feature inquiries.