HomeDocumentationAPI referenceSDKsPluginsGuidesPartnerships
HomeDocumentationAPI referenceSDKsPluginsGuidesPartnerships
  • Yoco API reference
    • Introduction
  • Checkout API reference
LogoLogo
Yoco API referencePayment Links

POST
/v1/payment_links/
POST
/v1/payment_links/
1import requests
2
3url = "https://api.yoco.com/v1/payment_links/"
4
5payload = {
6 "amount": {
7 "amount": 1500,
8 "currency": "ZAR"
9 },
10 "customer_reference": "Peter Parker",
11 "customer_description": "This description is visible to the customer on the payment page."
12}
13headers = {
14 "Authorization": "Bearer <token>",
15 "Content-Type": "application/json"
16}
17
18response = requests.post(url, json=payload, headers=headers)
19
20print(response.json())
Try it
201Created
1{
2 "created_at": "2024-11-19T15:27:02+00:00",
3 "customer_description": "This description is visible to the customer on the payment page.",
4 "customer_reference": "Peter Parker",
5 "id": "1743683416648-616bc018-c572-430b-9c07-4e813ed03eb4",
6 "order_id": "1585232943682-9f7e2dbe-a09e-4fa8-aa4a-72290c513f1d",
7 "updated_at": "2024-11-19T16:27:23+00:00",
8 "url": "https://pay.yoco.com/r/dRggEC"
9}
Was this page helpful?
Previous

Delete a payment link

Next
Built with
Create a payment link **Required scopes: `business/orders:read`, `business/orders:write`**
Create a payment link

Authentication

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

Request

This endpoint expects an object.
amountobjectRequired
The amount to charge the customer.
customer_referencestringRequired1-100 characters
The customer's name or reference that will appear on the payment page.
customer_descriptionstring or nullOptional1-255 characters
An optional description that will appear on the payment page.

Response

Successful Response
created_atstringformat: "date-time"
The payment link creation date and time in ISO 8601 format.
customer_descriptionstring or null
An optional description that will appear on the payment page.
customer_referencestring
The customer's name or reference that will appear on the payment page.
idstring
The unique identifier of the payment link.
order_idstring
A reference to the original order.
updated_atstring or nullformat: "date-time"
The date and time the payment link was last modified in ISO 8601 format.
urlstring
The payment link.

Errors

Create a payment link

Required scopes: business/orders:read, business/orders:write

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