Shop payments

You can enable and manage webshop payments over the API, note that the provided payment credentials are shared between shops of the same brand.

The payment model

The payment model contains info about the current payment settings, it contains the following properties:

Properties

  • Name
    identifier
    Type
    string
    Description

    Unique identifier for the brand.

  • Name
    accept_payment
    Type
    boolean
    Description

    whether or not the brand is configured correctly to accept payments.

  • Name
    point_value
    Type
    integer
    Description

    The value of a euro in points. (example: 1 euro = 100 points). Used for when a user does not have enough points to pay for a product and needs to pay the remainder in euros.

  • Name
    mollie_key
    Type
    string
    Description

    The currently active mollie key.


GET/shops/:identifier/payments

List all payment credentials

This endpoint allows you to fetch all the payment credentials currently active within your organization.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    shops.payments.get
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string
    Description

    The identifieer of the brand.

Request

GET
/shops/:identifier/payments
curl -X GET https://api.walletapp.co/shops/:identifier/payments
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"

Response

{
    "message": "Request successful",
    "products": [
        {
            "brand_id": "<shop_identifier>",
            "product_id": "<product_id>",
            "price": 0,
            "points": 0,
            "order": 1,
            "title": "<product_title>",
            "stock": 0,
            "use_stock": 0
        }
        ...
    ],
    "coupons": [],
    "online_offers": []
}

POST/shops/:identifier/payments

Add payment credentials

This endpoint allows you to add the mollie payment provider to the current brand.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    shops.payments.store
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string|Required
    Description

    The identifier of the brand.

Body parameters

  • Name
    mollie_key
    Type
    string|Required
    Description

    The mollie key that you want to use.

Request

POST
/shops/:identifier/payments
curl -X POST https://api.walletapp.co/shops/:identifier/payments
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
- d '{
    "mollie_key": "<your_mollie_key>"
}'

Response

{
    "message": "Request successful",
    "data": "Payment credentials have been saved"
}

DELETE/shops/:identifier/payments

Remove payment credentials

This endpoint allows you to remove your mollie credentials.

Required headers

  • Name
    Authorization
    Type
    string
    Description

    The token itself as a bearer token.

Abilities

  • Name
    shops.payments.delete
    Type
    string
    Description

    The scope required to access this endpoint.

Route parameters

  • Name
    identifier
    Type
    string|Required
    Description

    The identifier of the brand.

Request

DELETE
/shops/:identifier/payments
curl -X DELETE https://api.walletapp.co/shops/:identifier/payments
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"

Response

{
    "message": "Request successful",
    "data": "Payments have been disabled"
}