Set the active gateway
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/payments/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: '<string>'})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/payments/activate', 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/activate"
payload = { "provider": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"connection": {},
"message": "<string>"
}Payments
Set the active gateway
Choose which connected reader payment account charges new payments.
POST
/
v1
/
projects
/
{projectId}
/
payments
/
activate
Set the active gateway
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/payments/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: '<string>'})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/payments/activate', 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/activate"
payload = { "provider": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"connection": {},
"message": "<string>"
}Switch the active gateway. Both Stripe and Paystack must already be connected. You need the payments tool.
provider, status, isActive, secretLast4, webhookToken, and webhookAcknowledged. The secret key itself is never returned.