Verify a checkout payment
POST
/checkout/verify-payment
const url = 'https://apisandbox.puurk.com/checkout/verify-payment';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"payment_intent_id":"example","payment_id":"example","oid":"example","client_id":"example","contract_id":"example","offer_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://apisandbox.puurk.com/checkout/verify-payment \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "payment_intent_id": "example", "payment_id": "example", "oid": "example", "client_id": "example", "contract_id": "example", "offer_id": "example" }'Verifies a confirmed PaymentIntent and records the Payment. Idempotent: a retry returns the existing record.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Payment to verify and record
Media typeapplication/json
object
payment_intent_id
required
PaymentIntent that was confirmed
string
payment_id
required
Payment ID returned by /checkout/prepare
string
oid
required
Organization ID the payment belongs to
string
client_id
Lead/client ID to record on the payment
string
contract_id
Contract ID to record on the payment
string
offer_id
Offer ID to record on the payment
string
Examplegenerated
{ "payment_intent_id": "example", "payment_id": "example", "oid": "example", "client_id": "example", "contract_id": "example", "offer_id": "example"}Responses
Section titled “Responses”Successful operation
Media typeapplication/json
object
payment_id
Puurk payment ID
string
status
Payment status
string
payment_method_id
Stripe PaymentMethod ID used, for associating the saved card with future scheduled charges
string
Examplegenerated
{ "payment_id": "example", "status": "example", "payment_method_id": "example"}Invalid parameter
Unauthorized
PaymentIntent or payment record belongs to another organization
PaymentIntent not found
Payment not confirmed