POST
/
v1
/
payment_links
curl --request POST \
  --url https://api.withflex.com/v1/payment_links \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "payment_link": {
    "line_items": [
      {
        "price": "<string>",
        "price_data": {
          "description": "<string>",
          "product": "<string>",
          "unit_amount": 1,
          "recurring": {
            "interval": "daily",
            "interval_count": 1,
            "trial_period_days": 1
          },
          "metadata": {}
        },
        "quantity": 123,
        "shipping_options": {
          "shipping_rate_id": "<string>",
          "shipping_rate_data": {
            "display_name": "<string>",
            "amount": 123,
            "metadata": {}
          }
        }
      }
    ],
    "shipping_address_collection": true,
    "shipping_options": {
      "shipping_rate_id": "<string>",
      "shipping_rate_data": {
        "display_name": "<string>",
        "amount": 123,
        "metadata": {}
      }
    },
    "metadata": {},
    "payment_intent_data": {
      "capture_method": "automatic",
      "metadata": {}
    },
    "after_completion": {
      "type": "redirect",
      "hosted_confirmation": {
        "custom_message": "<string>"
      },
      "redirect": {
        "url": "<string>"
      }
    },
    "allow_promotion_codes": true,
    "origin": "shopify"
  }
}'
{
  "payment_link": {
    "payment_link_id": "<string>",
    "label": "<string>",
    "active": true,
    "line_items": [
      {
        "price": "<string>",
        "price_data": {
          "description": "<string>",
          "product": "<string>",
          "unit_amount": 1,
          "recurring": {
            "interval": "daily",
            "interval_count": 1,
            "trial_period_days": 1
          },
          "metadata": {}
        },
        "quantity": 123,
        "shipping_options": {
          "shipping_rate_id": "<string>",
          "shipping_rate_data": {
            "display_name": "<string>",
            "amount": 123,
            "metadata": {}
          }
        }
      }
    ],
    "allow_promotion_codes": true,
    "shipping_address_collection": true,
    "shipping_options": {
      "shipping_rate_id": "<string>",
      "shipping_amount": 123
    },
    "metadata": {},
    "url": "<string>",
    "created_at": "<string>",
    "payment_intent_data": {
      "capture_method": "automatic",
      "metadata": {}
    },
    "after_completion": {
      "type": "redirect",
      "hosted_confirmation": {
        "custom_message": "<string>"
      },
      "redirect": {
        "url": "<string>"
      }
    },
    "origin": "shopify",
    "test_mode": true
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Response

200
application/json

The response is of type object.