HomeDocumentationAPI referenceSDKsGuidesPartnerships
HomeDocumentationAPI referenceSDKsGuidesPartnerships
  • API Reference
    • Introduction
  • Checkout API Reference
LogoLogo
API ReferencePayment Links

Create Payment Link

POST
/v1/payment_links/
POST
/v1/payment_links/
1curl -X POST https://api.yoco.com/v1/payment_links/ \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "amount": {
6 "amount": 1500,
7 "currency": "ZAR"
8 },
9 "customer_description": "This description is visible to the customer on the payment page.",
10 "customer_reference": "Peter Parker"
11}'
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}
Create payment link **Required OAuth 2.0 scopes: `business/orders:read`, `business/orders:write`**
Was this page helpful?
Previous

Delete Payment Link

Next
Built with
Delete 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_descriptionstring or nullRequired>=1 character<=255 characters
An optional description that will appear on the payment page.
customer_referencestringRequired>=1 character<=100 characters
The customer's name or reference 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

A reference to the original order.
The date and time the payment link was last modified in ISO 8601 format.
The payment link.
Successful Response

Create payment link

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

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