A payment link is one address you share anywhere. Whoever opens it pays on Sovgate's checkout page. A link is created as a draft, and only a draft can be changed; activating it gives it its address.
Attributes
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier, starting pl_live_ or pl_test_. |
object | string | Always payment_link. |
livemode | boolean | true in live mode. |
reference | string | Its short reference, shown in the Dashboard. |
name | string | What customers see on the payment page. |
description | string or null | Shown under the name. |
status | enum | draft, active, inactive (deactivated) or archived. |
pricing | enum | fixed: customers pay for the products. customer_chooses: customers choose what to pay. |
currency | string | usd. |
line_items | array | What it sells: each a price (price_..., one-time) and a quantity. |
amount | integer or null | What each payment comes to, in cents; null when the customer chooses. |
url | string or null | The address to share, once it's active. |
max_payments | integer or null | It stops after this many payments; refunded ones still count. |
max_payments_per_customer | integer or null | How many times one customer, by email, can pay. |
expires_at | timestamp or null | When it stops taking payments. |
call_to_action | enum | The button's words: pay, buy, book, book_appointment, subscribe, donate, reserve or rent. |
collect_address | enum | none, billing or billing_shipping. |
collect_tax_ids | boolean | Business customers can add a VAT or GST number. |
require_tax_id | boolean | Only customers with a tax ID can pay. |
allow_promotion_codes | boolean | Customers can enter a promotion code. |
save_payment_details | boolean | Offers to keep the customer's card for their next payment. |
confirmation | enum | After payment: page (the confirmation page), message or redirect. |
confirmation_message | string or null | The message, for message. |
redirect_url | string or null | Where customers are sent, for redirect. |
payments_count | integer | Payments made through it. |
amount_collected | integer | What it collected, in cents. |
amount_refunded | integer | What was refunded of it, in cents. |
created | timestamp | When it was created. |
archived_at | timestamp or null | When it was archived. |
Example
Endpoints
| Endpoint | What it does |
|---|---|
POST /v1/payment_links | Create a payment link as a draft. |
GET /v1/payment_links/{id} | Get a payment link by its ID. |
POST /v1/payment_links/{id} | Change a draft link. An active link can't change: duplicate it instead. |
GET /v1/payment_links | List your payment links, newest first. |
POST /v1/payment_links/{id}/activate | Turn a draft or inactive link on, with a new address to share. |
POST /v1/payment_links/{id}/deactivate | Stop a link taking payments. Its address stops working for good. |
POST /v1/payment_links/{id}/archive | Archive a link for good: its address stops working and it leaves your list. |
POST /v1/payment_links/{id}/duplicate | Copy a link into a new draft, to change it or sell again. |