Connect reader payments
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"secretKey": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: '<string>', secretKey: '<string>'})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.1-news.app/v1/projects/{projectId}/payments"
payload = {
"provider": "<string>",
"secretKey": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"connection.secretLast4": "<string>"
}Payments
Connect reader payments
POST /v1/projects//payments saves a Stripe or Paystack live secret. The response keeps the last four characters.
POST
/
v1
/
projects
/
{projectId}
/
payments
Connect reader payments
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"secretKey": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: '<string>', secretKey: '<string>'})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.1-news.app/v1/projects/{projectId}/payments"
payload = {
"provider": "<string>",
"secretKey": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"connection.secretLast4": "<string>"
}Connect Stripe or Paystack for reader payments. Send the live secret. The response never includes the secret, only the last four characters.