Collegamento di pagamento

Introduzione #

Accept payments without building a digital storefront.

There are two methods to create payment links:

  1. Create a payment link using the Dashboard without requiring any coding.
  2. Create a payment link programmatically with the direct API

To accept a payment without building additional standalone websites or applications, use Payment Links and share the link as many times as you want on social media, in emails, or on your website.

wooshpay checkout

Create a custom payment page without using code.

Use the Wooshpay Dashboard to create a payment link that you can share with your customers. Customers who open this link are redirected to Cassa Wooshpay page.

Here are the step-by-step instructions to create a payment link with the Dashboard

  1. Click “+ New payment link”
86e14872-dfaf-45aa-af4f-e7fc4cb425cb.png
  1. Select product and quantity.
  2. Click on “Create payment link”
d626e72f-d420-4176-a4b7-9369906a2e2b.png
  1. Copy the payment link and share it with your customers.
707c62d0-7411-4343-941f-b6107531f70d.png

After that, you can share the link with your customers to complete payment.

Create a custom payment page with the API and share a link to it. Payment Links supports many payment methods—including credit and debit cards, Alipay, Wechat Pay, DANA e Klarna.


Payment Links uses Products and Prices to model what your business is selling.

To get started with Payment Links, you first need to create a product, and then use that product to create a price

Create a product #

Products describe the specific goods or services you offer to your customers, each product has a unique ID. For instance: If you’re an e-commerce store selling clothing, one of your products might be a sweater.

Richiesta Creare un prodotto

{
    "name":"taiwan fengli",
    "active":true,
    "description":"very delicious",
    "metadata":{
        "key1":"value1",
        "key3":"value3"
    },
    "url":"www.baide.com"
}

Risposta

{
    "id": "prod_1554351292598452224",
    "object": "product",
    "created": 1665642282000,
    "active": true,
    "description": "very delicious",
    "metadata": {
        "key1": "value1",
        "key2": "value2"
    },
    "name": "taiwan fengli",
    "livemode": false,
    "url": "www.baide.com",
    "updated": 1665642282000,
    "images": null
}

Create a price #

Price can be attach to existed product, and can also be created when create a
new product.

Attach price to exisited product #

Richiesta Attach price to exisited product

{
    "currency":"GBP",
    "product":"prod_1554351292598452224",
    "unit_amount":5,
    "active":true,
    "metadata":{
        "key1":"value1",
        "key2":"value2"
    },
    "nickname":"fengli",
    "product_data":null,
    "billing_scheme":"testscheme",
    "lookup_key":"test_lookup_key"
}

Create price when create a new product #

Richiesta Create price when create a new product

{
    "currency":"GBP",
    "product":null,
    "unit_amount":5,
    "active":true,
    "metadata":{
        "key1":"value1",
        "key2":"value2"
    },
    "nickname":"fengli",
    "product_data":{
        "id":null,
        "name":"taiwan fengli",
        "active":true,
        "description":"very delicious",
        "metadata":{
            "key1":"value1",
            "key2":"value2"
        },
        "url":"www.baide.com"
    },
    "billing_scheme":"testscheme",
    "lookup_key":"test_lookup_key"
}

Risposta

{
    "id":"price_1554384814788837376",
    "object":"price",
    "created":1659429194000,
    "active":true,
    "currency":"GBP",
    "metadata":{
        "key1":"value1",
        "key2":"value2"
    },
    "nickname":"fengli",
    "product":{
        "id":"prod_1554351292598452224",
        "object":"product",
        "created":1659421201000,
        "active":true,
        "description":"very delicious",
        "metadata":{
            "key1":"value1",
            "key3":"value3"
        },
        "name":"taiwan fengli",
        "livemode":false,
        "url":"www.baide.com",
        "updated":1659422039000
    },
    "type":"one_time",
    "livemode":false,
    "unit_amount":5,
    "billing_scheme":"per_unit",
    "lookup_key":"test_lookup_key"
}

To create a payment link, pass in voci_di_linea.

Each line item contains a prezzo e quantity.

Richiesta Create a payment link

{
    "line_items":[
        {
            "price":"price_1559884567408541696",
            "quantity":2
        }
    ],
    "billing_address_collection":"required",
    "after_completion":{
        "hosted_confirmation":{
            "custom_message":"Payment Success"
        },
        "type":"hosted_confirmation"
    },
    "phone_number_collection":{
        "enabled":true
    },
    "shipping_address_collection":{
        "allowed_countries":[
            "CN",
            "HK",
            "GB"
        ]
    },
    "metadata":{
        "key1":"value1",
        "key2":"value2"
    }
}

Risposta

{
    "id": "plink_1613796597081047040",
    "object": "payment_link",
    "created": 1673594067000,
    "active": true,
    "metadata": {
        "key1": "value1",
        "key2": "value2"
    },
    "url": "https://buytest.wooshpay.com/test_plink_1613796597081047040_secret_mWnkKBC8hUmrwKEV0HZtJ1KX",
    "livemode": false,
    "line_items": {
        "object": "list",
        "data": [
            {
                "id": "li_1613796598972678144",
                "object": "item",
                "currency": "CNY",
                "description": "good product",
                "price": {
                    "id": "price_1559884567408541696",
                    "object": "price",
                    "created": 1660740437000,
                    "active": true,
                    "currency": "CNY",
                    "metadata": {
                        "key1": "value1",
                        "key2": "value2"
                    },
                    "nickname": "low price",
                    "product": {
                        "id": "prod_1559883789331595264",
                        "object": "product",
                        "created": 1660740251000,
                        "active": true,
                        "description": "very good",
                        "metadata": {
                            "key1": "value1",
                            "key2": "value2"
                        },
                        "name": "good product",
                        "livemode": false,
                        "url": "www.baide.com",
                        "updated": 1660740251000,
                        "images": [
                            "https://oss.swooshtransfer.cn/oa/product/1559882985845555200_X6zNPOJ5ahw545XcCJhSlARR.png"
                        ]
                    },
                    "type": "one_time",
                    "livemode": false,
                    "unit_amount": 200,
                    "billing_scheme": "per_unit",
                    "lookup_key": "test_lookup_key"
                },
                "quantity": 2,
                "amount_subtotal": 400,
                "amount_total": 400
            }
        ],
        "url": null,
        "has_more": false
    },
    "after_completion": {
        "redirect": null,
        "type": "hosted_confirmation",
        "hosted_confirmation": {
            "custom_message": "Payment Success"
        }
    },
    "billing_address_collection": "required",
    "phone_number_collection": {
        "enabled": true
    },
    "shipping_address_collection": {
        "allowed_countries": [
            "CN",
            "HK",
            "GB"
        ]
    }
}

Each payment link contains a url that you can share with your customers through email, message etc., on social media, with a website link, in an app, or through other channels.

You can paste or embed the link anywhere. The same payment link can be shared with many customers and used across multiple channels.

Quali sono i vostri sentimenti
Updated on Agosto 5, 2023