API Reference
Submit one approved purchase payment
Submit one approved purchase payment
curl --request POST \
--url https://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"approval_id": "<string>",
"shared_payment_granted_token": "<string>"
}
'import requests
url = "https://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt"
payload = {
"approval_id": "<string>",
"shared_payment_granted_token": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({approval_id: '<string>', shared_payment_granted_token: '<string>'})
};
fetch('https://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt', 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://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'approval_id' => '<string>',
'shared_payment_granted_token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt"
payload := strings.NewReader("{\n \"approval_id\": \"<string>\",\n \"shared_payment_granted_token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"approval_id\": \"<string>\",\n \"shared_payment_granted_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"approval_id\": \"<string>\",\n \"shared_payment_granted_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"intent_id": "<string>",
"workspace_id": "<string>",
"application_id": "<string>",
"pack_id": "<string>",
"pack_version": "<string>",
"kind": "<string>",
"credit_microunits": 123,
"currency": "<string>",
"net_cents": 123,
"tax_cents": 123,
"gross_cents": 123,
"livemode": true,
"status": "<string>",
"terms_digest": "<string>",
"approval_expires_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}{
"type": "urn:seekout:developer-api:problem:malformed_json",
"title": "Malformed JSON",
"status": 400,
"detail": "The request body is not valid JSON.",
"code": "malformed_json"
}{
"type": "urn:seekout:developer-api:problem:validation_failed",
"title": "Request validation failed",
"status": 422,
"detail": "The request does not match the operation contract.",
"code": "validation_failed"
}Headers
Body
application/json
Response
Successful Response
Sanitized frozen quote and payment state, without provider secrets.
Was this page helpful?
⌘I
Submit one approved purchase payment
curl --request POST \
--url https://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"approval_id": "<string>",
"shared_payment_granted_token": "<string>"
}
'import requests
url = "https://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt"
payload = {
"approval_id": "<string>",
"shared_payment_granted_token": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({approval_id: '<string>', shared_payment_granted_token: '<string>'})
};
fetch('https://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt', 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://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'approval_id' => '<string>',
'shared_payment_granted_token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt"
payload := strings.NewReader("{\n \"approval_id\": \"<string>\",\n \"shared_payment_granted_token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"approval_id\": \"<string>\",\n \"shared_payment_granted_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer-api.seekout.io/v1/billing/purchase-intents/{intent_id}/payment-attempt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"approval_id\": \"<string>\",\n \"shared_payment_granted_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"intent_id": "<string>",
"workspace_id": "<string>",
"application_id": "<string>",
"pack_id": "<string>",
"pack_version": "<string>",
"kind": "<string>",
"credit_microunits": 123,
"currency": "<string>",
"net_cents": 123,
"tax_cents": 123,
"gross_cents": 123,
"livemode": true,
"status": "<string>",
"terms_digest": "<string>",
"approval_expires_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}{
"type": "urn:seekout:developer-api:problem:malformed_json",
"title": "Malformed JSON",
"status": 400,
"detail": "The request body is not valid JSON.",
"code": "malformed_json"
}{
"type": "urn:seekout:developer-api:problem:validation_failed",
"title": "Request validation failed",
"status": 422,
"detail": "The request does not match the operation contract.",
"code": "validation_failed"
}