Skip to content

Paths

POST

Summary: Create a new payment link (Link To Pay)

Description:

  • Generates a new payment link (Link To Pay) using the provided recipient note and amount.
  • This link can be shared with customers for payment processing.

How to Use:

  1. Authentication:
  • Include your API key in the token header of your request.
  • For production use, replace the demo token with your registered API key.
  1. Request Body:
  • Send a POST request with the following parameters in the request body:
    • recipient_note: A string describing the payment (e.g., 'Payment for Invoice #1234')
    • amount: The amount to be paid (e.g., '100.00')
  1. Response:
  • A successful response will include:
    • A data object containing the link details
    • ResponseCode, ResponseMsg, Result, and ServerTime
  1. Using the Payment Link:
  • The pay_link in the response can be shared with customers for payment.
  • The qr_img URL provides a QR code for the payment link.

Parameters

Name In Description Type Required
token header Access token which gets swapped for Bearer token during authentication string
recipient_note body Note for the recipient, which he will be abale to see after paymen string x
amount body Payment link amount in € double

Request Body

Details required to create a new payment link.

  • Content-Type: application/x-www-form-urlencoded
  • Type: object

Responses

  • Code: 200

  • Description: Payment link created successfully

  • Content-Type: application/json

  • Body:

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

  • Description: No user found with provided API-Key

  • Content-Type: application/json
  • Schema: ErrorResponse

Example Value:

{
    "error": "UserNotFound",
    "errorMessage": "No user found with the provided API key."
}
  • Code: 400

  • Description: Bad request due to invalid input parameters

  • Content-Type: application/json
  • Schema: ErrorResponse

Example Value:

{
    "error": "InvalidParameters",
    "errorMessage": "The provided parameters are invalid."
}
  • Code: 401

  • Description: Unauthorized access due to invalid API key or token (demo only)

  • Content-Type: application/json
  • Schema: ErrorResponse

Example Value:

{
    "error": "Unauthorized",
    "errorMessage": "Invalid API key or token."
}
  • Code: 403

  • Description: Forbidden access due to insufficient permissions

  • Content-Type: application/json
  • Schema: ErrorResponse

Example Value:

{
    "error": "Forbidden",
    "errorMessage": "You do not have permission to access this resource."
}
  • Code: 500

  • Description: Internal Server Error due to an unexpected condition

  • Content-Type: application/json
  • Schema: ErrorResponse

Example Value:

{
    "error": "InternalServerError",
    "errorMessage": "An unexpected error occurred. Please try again later."
}

POST

Summary: Create a new payment link (Link To Pay)

Description:

Generates a new payment link (Link To Pay) using the provided recipient note and amount. This link can be shared with customers for payment processing. In order to do so include your recipient using a recipient token and the % of share which he shall receive

How to Use:

  1. Authentication:
  • Include your API key in the token header of your request.
  • For production use, replace the demo token with your registered API key.
  1. Request Body:
  • Send a POST request with the following parameters in the request body:

    • recipient_note: A string describing the payment (e.g., 'Payment for Invoice #1234')
    • amount: The amount to be paid (e.g., '100.00')

    • recipient : one ore more recipient objects: json{ "token": "recipient_token", "share": 50 }

  1. Response:
  • A successful response will include:
    • A data object containing the link details
    • ResponseCode, ResponseMsg, Result, and ServerTime
  1. Using the Payment Link:
  • The pay_link in the response can be shared with customers for payment.
  • The qr_img URL provides a QR code for the payment link.

Parameters

Name In Description Type Required
token header Access token which gets swapped for Bearer token during authentication string
recipient_note body Note for the recipient, which he will be abale to see after paymen string x
amount body Payment link amount in € double
recipients object Recipients which will receive a share of the payment object

Request Body

Details required to create a new payment link.

  • Content-Type: application/x-www-form-urlencoded
  • Type: object

Responses

  • Code: 200

  • Description: Payment link created successfully

  • Content-Type: application/json

  • Body:

    {
            "data": {
                "user_id": "b44c4429-4a7b-4e27-85af-c1c2f43f4ffe",
                "amount": "100.00", 
                "recipient_note": "Payment for Invoice #1234",
                "status": "Unused",
                "paymentEndpoint": "https://app.dev.secpaid.com/payment",
                "callback_url": "https//secpaid.com",
                "service_fee": "1.5",
                "recipient": "[{\"token\":\"{NH?fq6,maGEc7\\/OD9]FvolGg\",\"share\":50}]",
                "created_at": "2024-10-26 16:18:01",
                "id": 124,
                "pay_link": "https://app.dev.secpaid.com/payment?link_id=MTI0",
                "qr_img": "https://quickchart.io/chart?chl=https://app.dev.secpaid.com/payment?link_id=MTI0&chs=300x300&cht=qr",
                "transaction_type": "Split"
            },
            "ResponseCode": 1,
            "ResponseMsg": "Link has been created successfully",
            "Result": "True",
            "ServerTime": "CEST"
    }
    
  • Code: 201

  • Description: No user found with provided API-Key

  • Content-Type: application/json
  • Schema: ErrorResponse

Example Value:

{
    "error": "UserNotFound",
    "errorMessage": "No user found with the provided API key."
}
  • Code: 400

  • Description: Bad request due to invalid input parameters

  • Content-Type: application/json
  • Schema: ErrorResponse

Example Value:

{
    "error": "InvalidParameters",
    "errorMessage": "The provided parameters are invalid."
}
  • Code: 401

  • Description: Unauthorized access due to invalid API key or token (demo only)

  • Content-Type: application/json
  • Schema: ErrorResponse

Example Value:

{
    "error": "Unauthorized",
    "errorMessage": "Invalid API key or token."
}
  • Code: 403

  • Description: Forbidden access due to insufficient permissions

  • Content-Type: application/json
  • Schema: ErrorResponse

Example Value:

{
    "error": "Forbidden",
    "errorMessage": "You do not have permission to access this resource."
}
  • Code: 500

  • Description: Internal Server Error due to an unexpected condition

  • Content-Type: application/json
  • Schema: ErrorResponse

Example Value:

{
    "error": "InternalServerError",
    "errorMessage": "An unexpected error occurred. Please try again later."
}

/api/v2/getPayInTransactions

POST

Summary: Retrieve Pay-In Transactions

Description:

  • Retrieves a paginated list of today's pay-in transactions (payments) based on the provided filters.
  • A payment object always corresponds to a link, which is why you receive a list of paid links for today.
  • This endpoint allows you to fetch payment details, including amounts, statuses, and associated metadata.

Parameters

Name In Description Type Required
Content-Type header The media type of the request body string
token header Access token in Bearer format for authentication string
since body The media type of the request body string
date body Date of the payment string
limit body Limits the size of the receiving list string
pay_id body Retrieve specific payment by pay_id string
#### Request Body

Parameters for filtering and pagination.

  • Content-Type: application/x-www-form-urlencoded
  • Type: object

Responses

  • Code: 200

  • Description: Successful response

  • Content-Type: application/json
  • Body:

    {
    "data": [
        {
        "id": 0,
        "user_id": "string",
        "amount": 0,
        "recipient_note": "string",
        "status": "string",
        "paymentEndpoint": "string",
        "pay_link": "string",
        "qr_img": "string",
        "created_at": {}
        }
    ],
    "totalRecords": 0,
    "ResponseCode": "string",
    "ResponseMsg": "string",
    "Result": true,
    "ServerTime": "string"
    }
    

/api/v2/getPayOutTransactions

POST

Summary: Retrieve Pay-Out Transactions

Description:

  • Retrieves a paginated list of pay-out transactions based on the provided filters.
  • A payout describes the process of SecPaid processing the pay-ins you received.
  • Each night, this resets, and a payout request is generated, including all the pay-ins.
  • We process the payout to the specific SecPaid customer and update the status accordingly.
  • This endpoint allows you to fetch transaction details, including amounts, statuses, and associated metadata.

Parameters

Name In Description Type Required
token header API-Key for authentication string

Request Body

Parameters for filtering and pagination.

  • Content-Type: application/x-www-form-urlencoded
  • Type: object

Responses

  • Code: 200

  • Description: A list of payouts

  • Content-Type: application/json
  • Body:

    ```json
    {
    "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"
        }
    ],
    "totalRecords": 6,
    "ResponseCode": 1,
    "ResponseMsg": "List retrieved successfully",
    "Result": "True",
    "ServerTime": "CEST"
    }
    
  • Code: 400, 401, 403, 500

  • Description: Error responses with appropriate HTTP status codes

  • Content-Type: application/json
  • Schema: ErrorResponse

POST

Summary: Retrieve Unused Payment Links

Description:

Fetches a paginated list of unused payment links that were created by the authenticated user. Useful for managing and tracking pending payment requests.

Parameters

Name In Description Type Required
token header string

Request Body

Parameters for filtering and pagination.

  • Content-Type: application/x-www-form-urlencoded
  • Type: object

Responses

  • Code: 200

  • Description: A list of unused payment links

  • Content-Type: application/json
  • Type: object

POST

Summary: Retrieve Used Payment Links

Parameters

Name In Description Type Required
token header string

Request Body

  • Content-Type: application/x-www-form-urlencoded
  • Type: object

Responses

  • Code: 200

  • Description: A list of used payment links

  • Content-Type: application/json
  • Type: object

POST

Summary: Delete a Payment Link

Description:

Deletes an existing payment link specified by the link ID. This action is irreversible, and the link will no longer be usable.

Parameters

Name In Description Type Required
token header API-Key for authentication string

Request Body

Link ID required to delete the payment link.

  • Content-Type: application/x-www-form-urlencoded
  • Type: object

Responses

  • Code: 200

  • Description: Link deleted successfully

  • Content-Type: application/json
  • Type: object

  • Code: 400, 401, 403, 404, 500

  • Description: Error responses with appropriate HTTP status codes

  • Content-Type: application/json
  • Schema: ErrorResponse

Integration Support

Please contact our developer team at compute@spacepitch.org for any assistance with the integration process or to request new features.