Update a payment setup
curl --request PATCH \
--url https://b.anny.co/api/v1/payment-setups/{payment_setup_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"id": "<string>",
"type": "paymentsetups",
"attributes": {
"owner_name": "<string>",
"status": "<string>",
"allow_off_session": true,
"allow_recurring": true,
"provider_data": {},
"last_error": "<string>",
"activity": "<string>",
"last_charged_at": "<string>",
"created_at": "<string>",
"deleted_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"method": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
},
"meta": {
"label": "<string>",
"next_action": {}
}
}
}
'import requests
url = "https://b.anny.co/api/v1/payment-setups/{payment_setup_id}"
payload = { "data": {
"id": "<string>",
"type": "paymentsetups",
"attributes": {
"owner_name": "<string>",
"status": "<string>",
"allow_off_session": True,
"allow_recurring": True,
"provider_data": {},
"last_error": "<string>",
"activity": "<string>",
"last_charged_at": "<string>",
"created_at": "<string>",
"deleted_at": "<string>"
},
"links": { "self": "<string>" },
"relationships": { "method": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": { "self": "<string>" }
} },
"meta": {
"label": "<string>",
"next_action": {}
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
id: '<string>',
type: 'paymentsetups',
attributes: {
owner_name: '<string>',
status: '<string>',
allow_off_session: true,
allow_recurring: true,
provider_data: {},
last_error: '<string>',
activity: '<string>',
last_charged_at: '<string>',
created_at: '<string>',
deleted_at: '<string>'
},
links: {self: '<string>'},
relationships: {method: {data: {type: '<string>', id: '<string>'}, links: {self: '<string>'}}},
meta: {label: '<string>', next_action: {}}
}
})
};
fetch('https://b.anny.co/api/v1/payment-setups/{payment_setup_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://b.anny.co/api/v1/payment-setups/{payment_setup_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'id' => '<string>',
'type' => 'paymentsetups',
'attributes' => [
'owner_name' => '<string>',
'status' => '<string>',
'allow_off_session' => true,
'allow_recurring' => true,
'provider_data' => [
],
'last_error' => '<string>',
'activity' => '<string>',
'last_charged_at' => '<string>',
'created_at' => '<string>',
'deleted_at' => '<string>'
],
'links' => [
'self' => '<string>'
],
'relationships' => [
'method' => [
'data' => [
'type' => '<string>',
'id' => '<string>'
],
'links' => [
'self' => '<string>'
]
]
],
'meta' => [
'label' => '<string>',
'next_action' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b.anny.co/api/v1/payment-setups/{payment_setup_id}"
payload := strings.NewReader("{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"paymentsetups\",\n \"attributes\": {\n \"owner_name\": \"<string>\",\n \"status\": \"<string>\",\n \"allow_off_session\": true,\n \"allow_recurring\": true,\n \"provider_data\": {},\n \"last_error\": \"<string>\",\n \"activity\": \"<string>\",\n \"last_charged_at\": \"<string>\",\n \"created_at\": \"<string>\",\n \"deleted_at\": \"<string>\"\n },\n \"links\": {\n \"self\": \"<string>\"\n },\n \"relationships\": {\n \"method\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"links\": {\n \"self\": \"<string>\"\n }\n }\n },\n \"meta\": {\n \"label\": \"<string>\",\n \"next_action\": {}\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://b.anny.co/api/v1/payment-setups/{payment_setup_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"paymentsetups\",\n \"attributes\": {\n \"owner_name\": \"<string>\",\n \"status\": \"<string>\",\n \"allow_off_session\": true,\n \"allow_recurring\": true,\n \"provider_data\": {},\n \"last_error\": \"<string>\",\n \"activity\": \"<string>\",\n \"last_charged_at\": \"<string>\",\n \"created_at\": \"<string>\",\n \"deleted_at\": \"<string>\"\n },\n \"links\": {\n \"self\": \"<string>\"\n },\n \"relationships\": {\n \"method\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"links\": {\n \"self\": \"<string>\"\n }\n }\n },\n \"meta\": {\n \"label\": \"<string>\",\n \"next_action\": {}\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/payment-setups/{payment_setup_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"paymentsetups\",\n \"attributes\": {\n \"owner_name\": \"<string>\",\n \"status\": \"<string>\",\n \"allow_off_session\": true,\n \"allow_recurring\": true,\n \"provider_data\": {},\n \"last_error\": \"<string>\",\n \"activity\": \"<string>\",\n \"last_charged_at\": \"<string>\",\n \"created_at\": \"<string>\",\n \"deleted_at\": \"<string>\"\n },\n \"links\": {\n \"self\": \"<string>\"\n },\n \"relationships\": {\n \"method\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"links\": {\n \"self\": \"<string>\"\n }\n }\n },\n \"meta\": {\n \"label\": \"<string>\",\n \"next_action\": {}\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "paymentsetups",
"attributes": {
"owner_name": "<string>",
"status": "<string>",
"allow_off_session": true,
"allow_recurring": true,
"provider_data": {},
"last_error": "<string>",
"activity": "<string>",
"last_charged_at": "<string>",
"created_at": "<string>",
"deleted_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"method": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
},
"meta": {
"label": "<string>",
"next_action": {}
}
}
}Orders & Billing
Update a payment setup
PATCH
/
api
/
v1
/
payment-setups
/
{payment_setup_id}
Update a payment setup
curl --request PATCH \
--url https://b.anny.co/api/v1/payment-setups/{payment_setup_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"id": "<string>",
"type": "paymentsetups",
"attributes": {
"owner_name": "<string>",
"status": "<string>",
"allow_off_session": true,
"allow_recurring": true,
"provider_data": {},
"last_error": "<string>",
"activity": "<string>",
"last_charged_at": "<string>",
"created_at": "<string>",
"deleted_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"method": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
},
"meta": {
"label": "<string>",
"next_action": {}
}
}
}
'import requests
url = "https://b.anny.co/api/v1/payment-setups/{payment_setup_id}"
payload = { "data": {
"id": "<string>",
"type": "paymentsetups",
"attributes": {
"owner_name": "<string>",
"status": "<string>",
"allow_off_session": True,
"allow_recurring": True,
"provider_data": {},
"last_error": "<string>",
"activity": "<string>",
"last_charged_at": "<string>",
"created_at": "<string>",
"deleted_at": "<string>"
},
"links": { "self": "<string>" },
"relationships": { "method": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": { "self": "<string>" }
} },
"meta": {
"label": "<string>",
"next_action": {}
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
id: '<string>',
type: 'paymentsetups',
attributes: {
owner_name: '<string>',
status: '<string>',
allow_off_session: true,
allow_recurring: true,
provider_data: {},
last_error: '<string>',
activity: '<string>',
last_charged_at: '<string>',
created_at: '<string>',
deleted_at: '<string>'
},
links: {self: '<string>'},
relationships: {method: {data: {type: '<string>', id: '<string>'}, links: {self: '<string>'}}},
meta: {label: '<string>', next_action: {}}
}
})
};
fetch('https://b.anny.co/api/v1/payment-setups/{payment_setup_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://b.anny.co/api/v1/payment-setups/{payment_setup_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'id' => '<string>',
'type' => 'paymentsetups',
'attributes' => [
'owner_name' => '<string>',
'status' => '<string>',
'allow_off_session' => true,
'allow_recurring' => true,
'provider_data' => [
],
'last_error' => '<string>',
'activity' => '<string>',
'last_charged_at' => '<string>',
'created_at' => '<string>',
'deleted_at' => '<string>'
],
'links' => [
'self' => '<string>'
],
'relationships' => [
'method' => [
'data' => [
'type' => '<string>',
'id' => '<string>'
],
'links' => [
'self' => '<string>'
]
]
],
'meta' => [
'label' => '<string>',
'next_action' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b.anny.co/api/v1/payment-setups/{payment_setup_id}"
payload := strings.NewReader("{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"paymentsetups\",\n \"attributes\": {\n \"owner_name\": \"<string>\",\n \"status\": \"<string>\",\n \"allow_off_session\": true,\n \"allow_recurring\": true,\n \"provider_data\": {},\n \"last_error\": \"<string>\",\n \"activity\": \"<string>\",\n \"last_charged_at\": \"<string>\",\n \"created_at\": \"<string>\",\n \"deleted_at\": \"<string>\"\n },\n \"links\": {\n \"self\": \"<string>\"\n },\n \"relationships\": {\n \"method\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"links\": {\n \"self\": \"<string>\"\n }\n }\n },\n \"meta\": {\n \"label\": \"<string>\",\n \"next_action\": {}\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://b.anny.co/api/v1/payment-setups/{payment_setup_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"paymentsetups\",\n \"attributes\": {\n \"owner_name\": \"<string>\",\n \"status\": \"<string>\",\n \"allow_off_session\": true,\n \"allow_recurring\": true,\n \"provider_data\": {},\n \"last_error\": \"<string>\",\n \"activity\": \"<string>\",\n \"last_charged_at\": \"<string>\",\n \"created_at\": \"<string>\",\n \"deleted_at\": \"<string>\"\n },\n \"links\": {\n \"self\": \"<string>\"\n },\n \"relationships\": {\n \"method\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"links\": {\n \"self\": \"<string>\"\n }\n }\n },\n \"meta\": {\n \"label\": \"<string>\",\n \"next_action\": {}\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/payment-setups/{payment_setup_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"id\": \"<string>\",\n \"type\": \"paymentsetups\",\n \"attributes\": {\n \"owner_name\": \"<string>\",\n \"status\": \"<string>\",\n \"allow_off_session\": true,\n \"allow_recurring\": true,\n \"provider_data\": {},\n \"last_error\": \"<string>\",\n \"activity\": \"<string>\",\n \"last_charged_at\": \"<string>\",\n \"created_at\": \"<string>\",\n \"deleted_at\": \"<string>\"\n },\n \"links\": {\n \"self\": \"<string>\"\n },\n \"relationships\": {\n \"method\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"links\": {\n \"self\": \"<string>\"\n }\n }\n },\n \"meta\": {\n \"label\": \"<string>\",\n \"next_action\": {}\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "paymentsetups",
"attributes": {
"owner_name": "<string>",
"status": "<string>",
"allow_off_session": true,
"allow_recurring": true,
"provider_data": {},
"last_error": "<string>",
"activity": "<string>",
"last_charged_at": "<string>",
"created_at": "<string>",
"deleted_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"method": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
},
"meta": {
"label": "<string>",
"next_action": {}
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Pfadparameter
The payment setup identifier.
Abfrageparameter
Organization ID
Body
application/vnd.api+json
A saved payment method configuration for a customer.
Show child attributes
Show child attributes
Antwort
200 - application/vnd.api+json
OK
A saved payment method configuration for a customer.
Show child attributes
Show child attributes
⌘I