Cost+ Docs
Payment Links

Create a payment link

Create a new reusable payment link.

POST
/paymentlinks/{id}

Authorization

basicAuth
AuthorizationBasic <token>

Use your API key as the username and leave the password empty. Encode as Base64: {api_key}: (note the trailing colon).

In: header

Path Parameters

id*string

Payment link identifier

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.costplus.online/v1/paymentlinks/string" \  -H "Content-Type: application/json" \  -d '{    "merchant_order_id": "my-order-id",    "amount": 1295,    "currency": "EUR",    "description": "My payment link",    "return_url": "https://www.example.com",    "webhook_url": "https://www.example.com/webhook"  }'
{
  "id": "string",
  "merchant_order_id": "string",
  "description": "string",
  "amount": 1,
  "currency": "string",
  "expiration_period": "string",
  "payment_url": "http://example.com",
  "payment_methods": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "modified": "2019-08-24T14:15:22Z",
  "completed_order_id": "string",
  "status": "new",
  "reason": "string",
  "completed": "2019-08-24T14:15:22Z",
  "orders": {},
  "customer": {
    "user_agent": "string",
    "merchant_customer_id": "string",
    "email_address": "user@example.com",
    "first_name": "string",
    "last_name": "string",
    "address_type": "customer",
    "address": "string",
    "postal_code": "string",
    "housenumber": "string",
    "country": "string",
    "locale": "string",
    "phone_numbers": [
      "string"
    ],
    "ip_address": "192.168.0.1",
    "gender": "male",
    "birthdate": "2019-08-24T14:15:22Z",
    "additional_addresses": [
      {}
    ]
  }
}
{
  "error": {
    "status": 400,
    "type": "string",
    "value": "string",
    "property_path": "string",
    "property_description": "string"
  }
}
{
  "error": {
    "status": 400,
    "type": "string",
    "value": "string",
    "property_path": "string",
    "property_description": "string"
  }
}