Sending Paylinks
Learn how to send a Paylink
Overview
Skipify is capable of sending a created Paylink via email or SMS. The use of this endpoint is conditional based on the parameters set on the create endpoint:
- To send a Paylink via email, you must set the
sendEmail
parameter to true. This will also require you to add an email within the Customer object. - To send a Paylink via text message, you must set the
sendSMS
parameter to true. This will also require you to add a phone number within the Customer object.
Please read the Creating Paylinks documentation to ensure you are creating links correctly to allow you to use this capability.
API Request
This endpoint uses HMAC
Check out our API Authentication to learn more
The endpoint for this request uses the payment's paylinkId
, which was originally provided in the response body when you created the Paylink.
To send a Paylink to a customer, send an API call to:
Staging:PATCH https://stage-paylinks.skipify.com/{paylinkId}/send
Production:PATCH https://paylinks.skipify.com/{paylinkId}/send
Request Body Parameters
Parameter Name | Required? | Type | Description |
---|---|---|---|
sendEmail | yes | boolean | This field is used when you are using Skipify to deliver a link to the customer via email. |
sendSms | yes | boolean | This field is used when you are using Skipify to deliver a link to the customer via text. |
HTTP API Response Codes
Code | Description |
---|---|
200 | Successfully sent a Paylink |
400 | Invalid send request |
404 | Paylink was not found |
500 | Unable to send the Paylink |
Response Body Parameters
Parameter Name | Type | Description |
---|---|---|
paylinkId | string | Skipify’s unique identifier for the Paylink. This ID will be needed to use the other endpoints. |
link | string (url) | What we all came here for! This is the URL that you will use to forward to your customers. Do what you like with this URL, it can be embedded as-is, and can be converted into a QR code. |
shortLink | string (url) | A Skipify generated Short Link that you can use instead of the link to forward to your customers if you deliver the Paylink yourself. |
merchantInvoiceId | string | A unique identifier that you send with the request is returned in the response. This identifier will not be visible to the customer. It can be used for your reference to link a Skipify order to a record in your systems. Max 255 char. |
currencyCode | string | USD only today |
merchantId | string | The merchantId that this Paylink was created for |
metadata | object | If sent in the request, will be returned in the response |
description | string | The description sent with the Paylink create request. This will be displayed to the customer. |
memo | string | The memo sent with the Paylink create request. This will be displayed to the customer. |
orderId | string | will be Null upon Paylink Creation. OrderId is assigned to Paylink once Payment completed. |
expiration | dateTime, string, | The expiration date/time of the Paylink that was set in the Request. Ex: 2024-06-02T21:48:02Z |
sendSMS | boolean | The boolean flag set on the request. |
sendEmail | boolean | The boolean flag set on the request. |
createdAt | dateTime, string | The date/time the Paylink was created at in UTC |
updatedAt | dateTime, string | The date/time the Paylink was updated in UTC |
customerConsent | boolean | The boolean flag set in the request, must be true to send |
tax | integer | Amount of tax sent for the Paylink |
shipping | integer | Amount of shipping sent for the Paylink |
subTotal | integer | Total price of lineItems and lineItems tax |
total | integer | Total price of lineItems, lineItems tax, shipping, tax |
orderTotal | integer | The total plus any fees applied during payment |
approvedAmount | integer | The amount that was paid by the customer |
lastSentAt | dateTime, string | The last time the Paylink was sent to the customer |
lineItems | array | These are the line items sent with the request. This object also returns: 'createdAt' - dateTime, string 'updatedAt' - dateTime, string |
deliveryLogs | array | List of SMS and/or email delivery attempts |
openOrders | array | List of orders that have been created for the Paylink |
events | array | List of events associated with this Paylink, upon send, newValue, Status = SENT |
status | string | current status of Paylink, upon successfully sent, status = SENT |
customer | object | Customer object sent with request |
attachments | array | List of attachments file names if added to Paylink |
Response Body Example
{
"paylinkId": "string",
"link": "string",
"shortLink": "string",
"merchantInvoiceId": "string",
"currencyCode": "USD",
"merchantId": "string",
"metadata": null,
"description": "string",
"memo": "string",
"orderId": null,
"expiration": "2025-02-28T16:13:00.000Z",
"sendSms": true,
"sendEmail": true,
"createdAt": "2024-04-19T16:22:00.599Z",
"updatedAt": "2024-04-19T17:52:47.702Z",
"customerConsent": true,
"tax": null,
"shipping": null,
"subTotal": 1010,
"total": 1010,
"orderTotal": null,
"approvedAmount": null,
"lastSentAt": "2024-04-19T17:52:47.699Z",
"lineItems": [
{
"paylinkItemId": "string",
"sku": "123987ABCXYZ",
"paylinkId": "string",
"price": 1010,
"quantity": 1,
"tax": 0,
"description": "string",
"category": "string",
"metadata": null,
"createdAt": "2024-04-19T16:22:00.599Z",
"updatedAt": "2024-04-19T16:22:00.599Z"
}
],
"deliveryLogs": [
{
"deliveryLogId": "string",
"paylinkId": "string",
"deliveryMethod": "SMS",
"status": "SENT",
"messageId": "string",
"createdAt": "2024-04-19T17:52:47.702Z",
"updatedAt": "2024-04-19T17:52:47.702Z"
},
{
"deliveryLogId": "string",
"paylinkId": "string",
"deliveryMethod": "EMAIL",
"status": "SENT",
"messageId": "string",
"createdAt": "2024-04-19T17:52:47.702Z",
"updatedAt": "2024-04-19T17:52:47.702Z"
}
],
"openOrders": [],
"events": [
{
"eventId": "string",
"paylinkId": "string",
"eventType": "CREATED",
"oldValue": null,
"newValue": null,
"createdBy": "API Key",
"createdAt": "2024-04-19T16:22:00.599Z"
},
{
"eventId": "string",
"paylinkId": "string",
"eventType": "SENT",
"oldValue": {
"status": "CREATED"
},
"newValue": {
"status": "SENT",
"deliveredTo": [
"SMS",
"EMAIL"
]
},
"createdBy": "API Key",
"createdAt": "2024-04-19T17:52:47.702Z"
}
],
"status": "SENT",
"customer": {
"email": "[email protected]",
"phone": "3333333333",
"firstName": "first",
"lastName": "last",
"paylinkCustomerId": null
},
"attachments": []
}
Updated 3 months ago