PATCH /v1.1/online-payments/link/<code>

 

Request headers

Attribute

Type

Condition

Description

X-Request-ID

UUID

Mandatory

ID of the request, unique to the call.

Authorization

String

Mandatory

The oAuth2 Bearer token

API-Key

String

Mandatory

The Client ID obtained from the myPOS Account

 

Path parameters

Attribute Type Condition Description
code String Mandatory Unique payment link code.

 

Request Body

Attribute Type Condition Description
pref_lang
String Optional Preferred language of the payment link. It's in format 'XX'. Available languages could be received from Languages
custom_name
String Optional Payment link name.
send_sms
Boolean Optional Receiving SMS when a purchase is processed.
sens_email
Boolean Optional Receiving email when a purchase is processed.
ask_for_customer_name
Boolean Optional Require customer name on the payment page.
website
String Optional Website address.
enable
Boolean Optional Flag that provide information if this link is currently enable or disable.
hide_quantity
Boolean Optional Is quantity of itemes is hidden or not for the customers.
expired_date
String Optional Date until this payment link will be active. Format is: YYYY-MM-DD


Response headers

Attribute

Type

Condition

Description

X-Request-ID

UUID

Mandatory

ID of the request, unique to the call.

Content-Type

String

Mandatory

application/json

 

Response body

Attribute

Type

Condition

Description

-

Payment Link Details

Mandatory

Fields with details for this payment link.

 

 

Examples

curl -L -X PATCH 'https://transactions-api.mypos.com/v1.1/online-payments/link/BPYCO5XTQXK40' \
-H 'API-Key: MY_API_KEY' \
-H 'X-Request-ID: 232465ab-66ea-4776-b3f0-f7a123f988e4' \
-H 'Authorization: Bearer PLpC1CqVE9CYXolbGNBPqz0NYy8asFzG95XcToDsMP'
-H 'Content-Type: application/json' \
--data-raw '{
	"pref_lang":"EN",
	"custom_name":"Payment Link Edited",
	"ask_for_customer_name":true,
	"hide_quantity":true,
	"send_email":true,
	"send_sms":false,
	"website":"http://mypos-edited.eu",
	"expired_date":"2020-11-16",
	"enable":true
}'
import requests

url = "https://transactions-api.mypos.com/v1.1/online-payments/link/BPYCO5XTQXK40"

payload = "{\n\t\"pref_lang\":\"EN\",\n\t\"custom_name\":\"Payment Link Edited\",\n\t\"ask_for_customer_name\":true,\n\t\"hide_quantity\":true,\n\t\"send_email\":true,\n\t\"send_sms\":false,\n\t\"website\":\"http://mypos-edited.eu\",\n\t\"expired_date\":\"2020-11-16\",\n\t\"enable\":true\n}"
headers = {
  'API-Key': 'MY_API_KEY',
  'X-Request-ID': '232465ab-66ea-4776-b3f0-f7a123f988e4',
  'Authorization': 'Bearer PLpC1CqVE9CYXolbGNBPqz0NYy8asFzG95XcToDsMP',
  'Content-Type': 'application/json'
}

requests.request("PATCH", url, headers=headers, data = payload)
const request = require('request');
const options = {
  'method': 'PATCH',
  'url': 'https://transactions-api.mypos.com/v1.1/online-payments/link/BPYCO5XTQXK40',
  'headers': {
    'API-Key': 'MY_API_KEY',
    'X-Request-ID': '232465ab-66ea-4776-b3f0-f7a123f988e4',
    'Authorization': 'Bearer PLpC1CqVE9CYXolbGNBPqz0NYy8asFzG95XcToDsMP',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"pref_lang":"EN","custom_name":"Payment Link Edited","ask_for_customer_name":true,"hide_quantity":true,"send_email":true,"send_sms":false,"website":"http://mypos-edited.eu","expired_date":"2020-11-16","enable":true})
};
request(options, (error, response) => {

});
<?php

$request = new HttpRequest();
$request->setUrl('https://transactions-api.mypos.com/v1.1/online-payments/link/BPYCO5XTQXK40');
$request->setMethod('PATCH');

$request->setHeaders(array(
  'Authorization' => 'Bearer PLpC1CqVE9CYXolbGNBPqz0NYy8asFzG95XcToDsMP',
  'API-Key' => 'MY_API_KEY',
  'X-Request-ID' => '232465ab-66ea-4776-b3f0-f7a123f988e4',
  'Content-Type' => 'application/json'
));

$request->setBody('{\n	"pref_lang":"EN",\n	"custom_name":"Payment Link Edited",\n	"ask_for_customer_name":true,\n	"hide_quantity":true,\n	"send_email":true,\n	"send_sms":false,\n	"website":"http://mypos-edited.eu",\n	"expired_date":"2020-11-16",\n	"enable":true\n}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

{
    "created_on": "2020-09-15 10:46:42",
    "code": "BUCWM3GOLV882",
    "url": "https://mypos.eu/vmp/btn/BUCWM3GOLV882",
    "custom_name": "Payment Link Edited",
    "item_name": "Example Item",
    "enable": true,
    "item_price": 3.43,
    "total_amount": 6.86,
    "quantity": 2,
    "send_sms": false,
    "send_email": true,
    "hide_quantity": true,
    "ask_for_customer_name": true,
    "currency": "GBP",
    "pref_language": "EN",
    "website": "http://mypos-edited.eu",
    "expire_date": "2020-11-16 00:00:00",
    "account_number": "50767683555"
}