Payment Links+
このページで扱うトピック
Payment Links+ is the definitive solution for creating secure payment links with your branding. With Payment Links+, you can effortlessly set up and share payment links, regardless of the sales channel or payment method. Start selling quickly with Payment Links+ and enjoy a seamless omnichannel experience. To learn more, check out Payment Links+ today!
This document explains the Payment Links+ API functions.
Authorization
The Payment Links+ API requires an API key to authenticate calls. Retrieve this key from Settings > API Keys on the Payment Links+ dashboard and pass it in the Authorization header.
Objects and Endpoints
Object | Endpoint |
---|---|
template
Retrieve link templates. Transform your links with customizable templates and enhance your organization's branding. With the option for each team to have its own templates, your payment links can have a unified and professional look across all teams while catering to each team's unique requirements. |
|
link
Streamline your payment process with custom payment links created specifically for your team's unique requirements. Maintain a consistent and professional look across your organization while offering a seamless payment experience for your customers. With our easy-to-use platform, retrieving and sharing your payment links has never been easier. |
Retrieve a template
Returns the template definition for the specified template ID.
The template ID is displayed on the Payment Links+ dashboard.
Template retrieval example call
Curl Example: curl 'https://linksplus-api.omise.co/external/templates/3655' \ -X GET \ -h 'Authorization: {{key}}' Retrieve the template with ID 3655. |
Template retrieval parameters
Template retrieval response codes
Code | Example |
---|---|
200 - OK | See Response on Success |
400 - Bad Request Check whether the template ID is an integer. |
{ "object": "error", "code": "bad_request", "message": "\"template_id\" must be a number" } |
401 - Unauthorized Check whether the authentication key is valid. |
{ "object": "error", "location": "https://www.omise.co/api-errors#authentication-failure", "code": "authentication_failure", "message": "authentication failed" } |
404 - Not found Check whether the template ID is valid. |
{ "object": "error", "code": "not_found", "message": "template not found" } |
Retrieve all templates for a team
Returns the list of templates for the provided team ID.
Navigate to Team Settings on the Payment Links+ dashboard to view the team ID.
Team templates example call
Curl Example: curl 'https://linksplus-api.omise.co/external/3388/templates' \ -X GET \ -h 'Authorization: {{key}}' Retrieve all templates for the team with ID 3388. |
Team templates parameters
Team templates response codes
Code | Example |
---|---|
200 - OK | See Response on Success |
400 - Bad Request Check whether the team ID is an integer. |
{ "object": "error", "code": "bad_request", "message": "\"team_id\" must be a number" } |
401 - Unauthorized Check whether the authentication key is valid. |
{ "object": "error", "location": "https://www.omise.co/api-errors#authentication-failure", "code": "authentication_failure", "message": "authentication failed" } |
404 - Not found Check whether the team ID is valid. |
{ "object": "error", "code": "not_found", "message": "team not found" } |
Retrieve a link
Retrieves the details for the link with the provided link ID.
Click Overview and then a payment link to view the link ID on the dashboard URL.
Link retrieval example call
Curl Example: curl 'https://linksplus-api.omise.co/external/links/12838' \ -X GET \ -h 'Authorization: {{key}}' Retrieve a link with ID 12838. |
Link retrieval parameters
Link retrieval response codes
Code | Example |
---|---|
200 - OK | See Response on Success |
400 - Bad Request Check whether the link ID is an integer. |
{ "object": "error", "code": "bad_request", "message": "\"link_id\" must be a number" } |
401 - Unauthorized Check whether the authentication key is valid. |
{ "object": "error", "location": "https://www.omise.co/api-errors#authentication-failure", "code": "authentication_failure", "message": "authentication failed" } |
404 - Not found Check whether the link ID is valid. |
{ "object": "error", "code": "not_found", "message": "link not found" } |
Retrieve all links for a team
Returns the list of links for the provided team ID.
Navigate to Team Settings on the Payment Links+ dashboard to view the team ID.
Team links example call
Curl Example: curl 'https://linksplus-api.omise.co/external/3388/links' \ -X GET \ -h 'Authorization: {{key}}' Retrieve all links for the team with ID 3388. |
Team links parameters
Team links response codes
Code | Example |
---|---|
200 - OK | See Response on Success |
400 - Bad Request Check whether the team ID is an integer. |
{ "object": "error", "code": "bad_request", "message": "\"team_id\" must be a number" } |
401 - Unauthorized Check whether the authentication key is valid. |
{ "object": "error", "location": "https://www.omise.co/api-errors#authentication-failure", "code": "authentication_failure", "message": "authentication failed" } |
404 - Not found Check whether the team ID is valid. |
{ "object": "error", "code": "not_found", "message": "team not found" } |
Create a Payment Link
Creates a Payment Link based on the template ID that you specify. If the template contains features, you must enter the value of each feature as a key:value
pair.
Create link example call
Curl Example: curl 'https://linksplus-api.omise.co/external/links' \ -X POST \ -h 'Authorization: {{key}}' \ -d "template_id=3672" \ -d "team_id=3388" \ -d "name=Adidas School Wear" \ -d "currency=THB" \ -d "amount=4000" \ -d "features[Type]=School Bags" \ -d "features[Size]=Medium" \ -d "multiple_usage=true" \ -d "returnUrl=https://demostore.com/payment_status" The corresponding template with ID 3672, has |
Create link parameters
Create link response codes
Code | Example |
---|---|
200 - OK | See Response on Success |
400 - Bad Request Check whether the parameters entered are valid. |
{ "object": "error", "code": "bad_request", "message": "syntax error" } |
401 - Unauthorized Check whether the authentication key is valid. |
{ "object": "error", "location": "https://www.omise.co/api-errors#authentication-failure", "code": "authentication_failure", "message": "authentication failed" } |
404 - Not found Check whether you have missed passing any required parameters. |
{ "object": "error", "code": "not_found", "message": "template not found" } |