Checkout API
Povito Checkout API v1.0.0-draft.5
Hosted, embeddable checkout for Povito merchants
Download contract checkout-v1.yaml Try requests in the Sandbox explorer
30 operations, generated at build time from the contract. Keys and base URLs for each environment: Keys and environments.
Base URLs#
| Environment | Base URL |
|---|---|
| Live | https://api.checkout.povito.com/v1 |
| Sandbox Staging | https://api.checkout.staging.povito.com/v1 |
| Local | http://localhost:9100/v1 |
Overview#
Take payments through Povito Checkout: your server creates a checkout session, the shopper pays on Povito's hosted page, and you are told the result by a signed webhook — then confirm it by reading the session.
Money is integer minor units of the currency. IQD has no minor unit
(45000 is forty-five thousand dinars); USD is cents.
A webhook is a prompt to GET /checkout/sessions/{id}. The session is
the only authoritative state — never act on a webhook body alone.
Test mode is a key mode. A povito_ck_test_… key drives the simulated
test gateway and never moves real money; see the Testing guide.
Authentication#
secretKey#
HTTP bearer — Authorization: Bearer …
povito_ck_live_… or povito_ck_test_… — server-side only
publishableKey#
HTTP bearer — Authorization: Bearer …
povito_pk_live_… or povito_pk_test_… — safe in a browser or app; unlocks /public/* only
customerToken#
API key in header X-Povito-Customer-Token
Session-scoped token issued by OTP verification
Endpoints#
Sessions
GET /checkout/sessions#
List sessions, typically by reference_id
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
reference_id | query | string | max length 128 |
status | query | SessionStatus | |
created_after | query | string (date-time) | |
limit | query | integer | default 20 · min 1 · max 100 |
cursor | query | string |
Responses
| Status | Meaning | Body | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
200 | OK | inline schema
| |||||||||
401 | Missing or invalid key | ErrorEnvelope · Unauthorized |
Examples
curl "https://api.checkout.staging.povito.com/v1/checkout/sessions" \
-H "Authorization: Bearer povito_ck_test_..."{
"data": [
{
"id": "cs_live_01J8Z3K9Q4M2XA7B",
"object": "checkout.session",
"code": "code",
"url": "https://example.com",
"livemode": true,
"status": "open",
"payment_status": "unpaid",
"reference_id": "reference_id",
"amount": 0,
"currency": "Currency",
"line_items": [
{
"label": null,
"amount": null,
"quantity": null,
"type": null
}
],
"payment_method_types": [
"cashondelivery"
],
"customer": {
"id": "id",
"phone": "phone",
"name": "name",
"address": null
},
"collect": {
"phone": "required",
"name": "required",
"shipping_address": "none"
},
"presentment": {
"currency": null,
"fx_rate": null
},
"payment": {
"attempt_id": null,
"method": null,
"gateway": null,
"gateway_reference": null,
"captured_amount": null,
"captured_currency": null,
"presented_amount": null,
"presented_currency": null,
"fx_rate": null,
"captured_at": null,
"instrument": null
},
"refunded_amount": 0,
"locale": "ar",
"success_url": "https://example.com",
"cancel_url": "https://example.com",
"expires_at": "2026-09-12T10:30:00Z",
"completed_at": "2026-09-12T10:30:00Z",
"metadata": {
"key": "string"
},
"created_at": "2026-09-12T10:30:00Z",
"updated_at": "2026-09-12T10:30:00Z"
}
],
"next_cursor": "next_cursor"
}POST /checkout/sessions#
Create a checkout session and get the URL to send the shopper to
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
Idempotency-Keyrequired | header | string | Same key + same body replays the first response; same key + different body is 409. A UUID is the usual choice pattern ^[A-Za-z0-9_-]{8,128}$ |
Request body application/json · required
Responses
| Status | Meaning | Body |
|---|---|---|
200 | An open session already exists for this reference_id in this mode; it is returned unchanged | CheckoutSession |
201 | Created header Idempotent-Replayed — IdempotentReplayed | CheckoutSession |
400 | Validation error | ErrorEnvelope · BadRequest |
401 | Missing or invalid key | ErrorEnvelope · Unauthorized |
403 | Insufficient scope, mode mismatch, or suspended merchant | ErrorEnvelope · Forbidden |
409 | Idempotency conflict, wrong state, or refund ceiling | ErrorEnvelope · Conflict |
422 | Business rule | ErrorEnvelope · Unprocessable |
429 | Too many requests header Retry-After | ErrorEnvelope · RateLimited |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/checkout/sessions" \
-H "Authorization: Bearer povito_ck_test_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"reference_id": "cart_01J8Z3K9Q4M2XA7B",
"amount": 45000,
"currency": "IQD",
"line_items": [
{
"label": "Basket",
"amount": 42000,
"type": "charge"
},
{
"label": "Delivery — Hi-Express",
"amount": 5000,
"type": "shipping"
},
{
"label": "Coupon RAMADAN",
"amount": 2000,
"type": "discount"
}
],
"payment_method_types": [
"zaincash"
],
"customer": {
"phone": "+9647800000000",
"name": "Ali M. Ismail"
},
"collect": {
"phone": "required",
"name": "required",
"shipping_address": "none"
},
"locale": "ar",
"success_url": "https://povito.com/ar/checkout/payment/return",
"cancel_url": "https://povito.com/ar/checkout",
"metadata": {
"cart_id": "cart_01J8Z3K9Q4M2XA7B"
}
}'{
"reference_id": "cart_01J8Z3K9Q4M2XA7B",
"amount": 45000,
"currency": "IQD",
"line_items": [
{
"label": "Basket",
"amount": 42000,
"type": "charge"
},
{
"label": "Delivery — Hi-Express",
"amount": 5000,
"type": "shipping"
},
{
"label": "Coupon RAMADAN",
"amount": 2000,
"type": "discount"
}
],
"payment_method_types": [
"zaincash"
],
"customer": {
"phone": "+9647800000000",
"name": "Ali M. Ismail"
},
"collect": {
"phone": "required",
"name": "required",
"shipping_address": "none"
},
"locale": "ar",
"success_url": "https://povito.com/ar/checkout/payment/return",
"cancel_url": "https://povito.com/ar/checkout",
"metadata": {
"cart_id": "cart_01J8Z3K9Q4M2XA7B"
}
}{
"id": "cs_live_01J8Z3K9Q4M2XA7B",
"object": "checkout.session",
"code": "code",
"url": "https://example.com",
"livemode": true,
"status": "open",
"payment_status": "unpaid",
"reference_id": "reference_id",
"amount": 0,
"currency": "Currency",
"line_items": [
{
"label": "label",
"amount": 0,
"quantity": 1,
"type": "charge"
}
],
"payment_method_types": [
"cashondelivery"
],
"customer": {
"id": "id",
"phone": "phone",
"name": "name",
"address": {
"governorate": "governorate",
"city": "city",
"line": "line",
"landmark": "landmark",
"country": "IQ",
"geo": {
"lat": null,
"lng": null
}
}
},
"collect": {
"phone": "required",
"name": "required",
"shipping_address": "none"
},
"presentment": {
"currency": "Currency",
"fx_rate": 1
},
"payment": {
"attempt_id": "attempt_id",
"method": "cashondelivery",
"gateway": "gateway",
"gateway_reference": "gateway_reference",
"captured_amount": 0,
"captured_currency": "captured_currency",
"presented_amount": 0,
"presented_currency": "Currency",
"fx_rate": 1,
"captured_at": "2026-09-12T10:30:00Z",
"instrument": {
"brand": "brand",
"last_four": "last_four"
}
},
"refunded_amount": 0,
"locale": "ar",
"success_url": "https://example.com",
"cancel_url": "https://example.com",
"expires_at": "2026-09-12T10:30:00Z",
"completed_at": "2026-09-12T10:30:00Z",
"metadata": {
"key": "string"
},
"created_at": "2026-09-12T10:30:00Z",
"updated_at": "2026-09-12T10:30:00Z"
}{
"id": "cs_live_01J8Z3K9Q4M2XA7B",
"object": "checkout.session",
"code": "code",
"url": "https://example.com",
"livemode": true,
"status": "open",
"payment_status": "unpaid",
"reference_id": "reference_id",
"amount": 0,
"currency": "Currency",
"line_items": [
{
"label": "label",
"amount": 0,
"quantity": 1,
"type": "charge"
}
],
"payment_method_types": [
"cashondelivery"
],
"customer": {
"id": "id",
"phone": "phone",
"name": "name",
"address": {
"governorate": "governorate",
"city": "city",
"line": "line",
"landmark": "landmark",
"country": "IQ",
"geo": {
"lat": null,
"lng": null
}
}
},
"collect": {
"phone": "required",
"name": "required",
"shipping_address": "none"
},
"presentment": {
"currency": "Currency",
"fx_rate": 1
},
"payment": {
"attempt_id": "attempt_id",
"method": "cashondelivery",
"gateway": "gateway",
"gateway_reference": "gateway_reference",
"captured_amount": 0,
"captured_currency": "captured_currency",
"presented_amount": 0,
"presented_currency": "Currency",
"fx_rate": 1,
"captured_at": "2026-09-12T10:30:00Z",
"instrument": {
"brand": "brand",
"last_four": "last_four"
}
},
"refunded_amount": 0,
"locale": "ar",
"success_url": "https://example.com",
"cancel_url": "https://example.com",
"expires_at": "2026-09-12T10:30:00Z",
"completed_at": "2026-09-12T10:30:00Z",
"metadata": {
"key": "string"
},
"created_at": "2026-09-12T10:30:00Z",
"updated_at": "2026-09-12T10:30:00Z"
}GET /checkout/sessions/{id}#
Authoritative session state — the verify call
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | pattern ^cs_(live|test)_[A-Za-z0-9]+$ |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | CheckoutSession |
401 | Missing or invalid key | ErrorEnvelope · Unauthorized |
403 | Insufficient scope, mode mismatch, or suspended merchant | ErrorEnvelope · Forbidden |
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
Examples
curl "https://api.checkout.staging.povito.com/v1/checkout/sessions/{id}" \
-H "Authorization: Bearer povito_ck_test_..."{
"id": "cs_live_01J8Z3K9Q4M2XA7B",
"object": "checkout.session",
"code": "code",
"url": "https://example.com",
"livemode": true,
"status": "open",
"payment_status": "unpaid",
"reference_id": "reference_id",
"amount": 0,
"currency": "Currency",
"line_items": [
{
"label": "label",
"amount": 0,
"quantity": 1,
"type": "charge"
}
],
"payment_method_types": [
"cashondelivery"
],
"customer": {
"id": "id",
"phone": "phone",
"name": "name",
"address": {
"governorate": "governorate",
"city": "city",
"line": "line",
"landmark": "landmark",
"country": "IQ",
"geo": {
"lat": null,
"lng": null
}
}
},
"collect": {
"phone": "required",
"name": "required",
"shipping_address": "none"
},
"presentment": {
"currency": "Currency",
"fx_rate": 1
},
"payment": {
"attempt_id": "attempt_id",
"method": "cashondelivery",
"gateway": "gateway",
"gateway_reference": "gateway_reference",
"captured_amount": 0,
"captured_currency": "captured_currency",
"presented_amount": 0,
"presented_currency": "Currency",
"fx_rate": 1,
"captured_at": "2026-09-12T10:30:00Z",
"instrument": {
"brand": "brand",
"last_four": "last_four"
}
},
"refunded_amount": 0,
"locale": "ar",
"success_url": "https://example.com",
"cancel_url": "https://example.com",
"expires_at": "2026-09-12T10:30:00Z",
"completed_at": "2026-09-12T10:30:00Z",
"metadata": {
"key": "string"
},
"created_at": "2026-09-12T10:30:00Z",
"updated_at": "2026-09-12T10:30:00Z"
}POST /checkout/sessions/{id}/expire#
Close an open session
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | pattern ^cs_(live|test)_[A-Za-z0-9]+$ |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | Expired | CheckoutSession |
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
409 | Idempotency conflict, wrong state, or refund ceiling | ErrorEnvelope · Conflict |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/checkout/sessions/{id}/expire" \
-H "Authorization: Bearer povito_ck_test_..."{
"id": "cs_live_01J8Z3K9Q4M2XA7B",
"object": "checkout.session",
"code": "code",
"url": "https://example.com",
"livemode": true,
"status": "open",
"payment_status": "unpaid",
"reference_id": "reference_id",
"amount": 0,
"currency": "Currency",
"line_items": [
{
"label": "label",
"amount": 0,
"quantity": 1,
"type": "charge"
}
],
"payment_method_types": [
"cashondelivery"
],
"customer": {
"id": "id",
"phone": "phone",
"name": "name",
"address": {
"governorate": "governorate",
"city": "city",
"line": "line",
"landmark": "landmark",
"country": "IQ",
"geo": {
"lat": null,
"lng": null
}
}
},
"collect": {
"phone": "required",
"name": "required",
"shipping_address": "none"
},
"presentment": {
"currency": "Currency",
"fx_rate": 1
},
"payment": {
"attempt_id": "attempt_id",
"method": "cashondelivery",
"gateway": "gateway",
"gateway_reference": "gateway_reference",
"captured_amount": 0,
"captured_currency": "captured_currency",
"presented_amount": 0,
"presented_currency": "Currency",
"fx_rate": 1,
"captured_at": "2026-09-12T10:30:00Z",
"instrument": {
"brand": "brand",
"last_four": "last_four"
}
},
"refunded_amount": 0,
"locale": "ar",
"success_url": "https://example.com",
"cancel_url": "https://example.com",
"expires_at": "2026-09-12T10:30:00Z",
"completed_at": "2026-09-12T10:30:00Z",
"metadata": {
"key": "string"
},
"created_at": "2026-09-12T10:30:00Z",
"updated_at": "2026-09-12T10:30:00Z"
}Payment methods
GET /payment_methods#
Methods this merchant may pass in payment_method_types, in display order
Responses
| Status | Meaning | Body | ||||||
|---|---|---|---|---|---|---|---|---|
200 | OK | inline schema
| ||||||
401 | Missing or invalid key | ErrorEnvelope · Unauthorized |
Examples
curl "https://api.checkout.staging.povito.com/v1/payment_methods" \
-H "Authorization: Bearer povito_ck_test_..."{
"data": [
{
"code": "cashondelivery",
"display_name": {
"ar": "ar",
"ku": "ku",
"en": "en"
},
"flow": "redirect",
"currencies": [
"Currency"
],
"limits": {
"key": {
"min": null,
"max": null
}
},
"capabilities": {
"refunds": "none",
"saved_instruments": true,
"wallets": [
"apple_pay"
]
},
"enabled": true
}
]
}Refunds
GET /refunds#
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
session_id | query | string | |
limit | query | integer | default 20 · min 1 · max 100 |
cursor | query | string |
Responses
| Status | Meaning | Body | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
200 | OK | inline schema
|
Examples
curl "https://api.checkout.staging.povito.com/v1/refunds" \
-H "Authorization: Bearer povito_ck_test_..."{
"data": [
{
"id": "id",
"object": "refund",
"livemode": true,
"session_id": "session_id",
"attempt_id": "attempt_id",
"amount": 0,
"currency": "Currency",
"reason": "reason",
"initiated_by": "merchant",
"status": "requested",
"gateway_reference": "gateway_reference",
"failure_reason": "failure_reason",
"metadata": {
"key": "string"
},
"created_at": "2026-09-12T10:30:00Z",
"updated_at": "2026-09-12T10:30:00Z"
}
],
"next_cursor": "next_cursor"
}POST /refunds#
Refund part or all of a paid session
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
Idempotency-Keyrequired | header | string | Same key + same body replays the first response; same key + different body is 409. A UUID is the usual choice pattern ^[A-Za-z0-9_-]{8,128}$ |
Request body application/json · required
Responses
| Status | Meaning | Body |
|---|---|---|
201 | Created header Idempotent-Replayed — IdempotentReplayed | Refund |
400 | Validation error | ErrorEnvelope · BadRequest |
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
409 | Idempotency conflict, wrong state, or refund ceiling | ErrorEnvelope · Conflict |
422 | Business rule | ErrorEnvelope · Unprocessable |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/refunds" \
-H "Authorization: Bearer povito_ck_test_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"session_id": "session_id",
"amount": 0,
"reason": "reason",
"metadata": {
"key": "string"
}
}'{
"session_id": "session_id",
"amount": 0,
"reason": "reason",
"metadata": {
"key": "string"
}
}{
"id": "id",
"object": "refund",
"livemode": true,
"session_id": "session_id",
"attempt_id": "attempt_id",
"amount": 0,
"currency": "Currency",
"reason": "reason",
"initiated_by": "merchant",
"status": "requested",
"gateway_reference": "gateway_reference",
"failure_reason": "failure_reason",
"metadata": {
"key": "string"
},
"created_at": "2026-09-12T10:30:00Z",
"updated_at": "2026-09-12T10:30:00Z"
}GET /refunds/{id}#
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | Refund |
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
Examples
curl "https://api.checkout.staging.povito.com/v1/refunds/{id}" \
-H "Authorization: Bearer povito_ck_test_..."{
"id": "id",
"object": "refund",
"livemode": true,
"session_id": "session_id",
"attempt_id": "attempt_id",
"amount": 0,
"currency": "Currency",
"reason": "reason",
"initiated_by": "merchant",
"status": "requested",
"gateway_reference": "gateway_reference",
"failure_reason": "failure_reason",
"metadata": {
"key": "string"
},
"created_at": "2026-09-12T10:30:00Z",
"updated_at": "2026-09-12T10:30:00Z"
}Webhook endpoints
Endpoints belong to one mode. A key lists and manages only endpoints of
its own mode; every /webhook_endpoints/{id} operation on an endpoint
of the other mode returns 404 endpoint_not_found.
GET /webhook_endpoints#
Responses
| Status | Meaning | Body | ||||||
|---|---|---|---|---|---|---|---|---|
200 | OK | inline schema
|
Examples
curl "https://api.checkout.staging.povito.com/v1/webhook_endpoints" \
-H "Authorization: Bearer povito_ck_test_..."{
"data": [
{
"id": "id",
"object": "webhook_endpoint",
"url": "https://example.com",
"events": [
"*"
],
"mode": "live",
"status": "enabled",
"disabled_reason": "delivery_failures",
"description": "description",
"created_at": "2026-09-12T10:30:00Z"
}
]
}POST /webhook_endpoints#
Register an endpoint; the signing secret is returned once
Request body application/json · required
Responses
| Status | Meaning | Body |
|---|---|---|
201 | Created — secret is present only in this response | WebhookEndpointWithSecret |
400 | Validation error | ErrorEnvelope · BadRequest |
422 | Business rule | ErrorEnvelope · Unprocessable |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/webhook_endpoints" \
-H "Authorization: Bearer povito_ck_test_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"events": [
"*"
],
"mode": "live",
"description": "description"
}'{
"url": "https://example.com",
"events": [
"*"
],
"mode": "live",
"description": "description"
}{
"id": "id",
"object": "webhook_endpoint",
"url": "https://example.com",
"events": [
"*"
],
"mode": "live",
"status": "enabled",
"disabled_reason": "delivery_failures",
"description": "description",
"created_at": "2026-09-12T10:30:00Z",
"secret": "secret"
}GET /webhook_endpoints/{id}#
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | WebhookEndpoint |
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
Examples
curl "https://api.checkout.staging.povito.com/v1/webhook_endpoints/{id}" \
-H "Authorization: Bearer povito_ck_test_..."{
"id": "id",
"object": "webhook_endpoint",
"url": "https://example.com",
"events": [
"*"
],
"mode": "live",
"status": "enabled",
"disabled_reason": "delivery_failures",
"description": "description",
"created_at": "2026-09-12T10:30:00Z"
}PATCH /webhook_endpoints/{id}#
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string |
Request body application/json · required
| Field | Type | Notes |
|---|---|---|
url | string (uri) | |
events | array of | |
status | string | one of "enabled", "disabled" |
description | string | max length 200 |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | WebhookEndpoint |
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
Examples
curl -X PATCH "https://api.checkout.staging.povito.com/v1/webhook_endpoints/{id}" \
-H "Authorization: Bearer povito_ck_test_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"events": [
"*"
],
"status": "enabled",
"description": "description"
}'{
"url": "https://example.com",
"events": [
"*"
],
"status": "enabled",
"description": "description"
}{
"id": "id",
"object": "webhook_endpoint",
"url": "https://example.com",
"events": [
"*"
],
"mode": "live",
"status": "enabled",
"disabled_reason": "delivery_failures",
"description": "description",
"created_at": "2026-09-12T10:30:00Z"
}DELETE /webhook_endpoints/{id}#
Delete an endpoint; its delivery history stays on the events
Deliveries to the endpoint stop at once. It is no longer listed or
readable — 404 endpoint_not_found afterwards, including for a second
DELETE — and receives no new events or redeliveries. Retries already
scheduled for it are cancelled: they appear in GET /events/{id}
deliveries with error: "endpoint_deleted" and no next_retry_at.
Its signing secrets are destroyed. Past delivery attempts stay on the
events they belong to. To pause deliveries instead, PATCH it with
status: disabled.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Meaning | Body |
|---|---|---|
204 | Deleted | |
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
Examples
curl -X DELETE "https://api.checkout.staging.povito.com/v1/webhook_endpoints/{id}" \
-H "Authorization: Bearer povito_ck_test_..."POST /webhook_endpoints/{id}/rotate_secret#
Issue a new secret; the old one is accepted for 24 hours
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | WebhookEndpointWithSecret |
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/webhook_endpoints/{id}/rotate_secret" \
-H "Authorization: Bearer povito_ck_test_..."{
"id": "id",
"object": "webhook_endpoint",
"url": "https://example.com",
"events": [
"*"
],
"mode": "live",
"status": "enabled",
"disabled_reason": "delivery_failures",
"description": "description",
"created_at": "2026-09-12T10:30:00Z",
"secret": "secret"
}POST /webhook_endpoints/{id}/test#
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string |
Request body application/json · required
| Field | Type | Notes |
|---|---|---|
typerequired | EventType |
Responses
| Status | Meaning | Body | ||||||
|---|---|---|---|---|---|---|---|---|
202 | Queued | inline schema
| ||||||
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/webhook_endpoints/{id}/test" \
-H "Authorization: Bearer povito_ck_test_..." \
-H "Content-Type: application/json" \
-d '{
"type": "*"
}'{
"type": "*"
}{
"event_id": "event_id"
}Events
GET /events#
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
type | query | EventType | |
since | query | string (date-time) | |
limit | query | integer | default 20 · min 1 · max 100 |
cursor | query | string |
Responses
| Status | Meaning | Body | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
200 | OK | inline schema
|
Examples
curl "https://api.checkout.staging.povito.com/v1/events" \
-H "Authorization: Bearer povito_ck_test_..."{
"data": [
{
"id": "id",
"object": "event",
"type": "*",
"livemode": true,
"created_at": "2026-09-12T10:30:00Z",
"data": {
"object": null
}
}
],
"next_cursor": "next_cursor"
}GET /events/{id}#
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | EventWithDeliveries |
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
Examples
curl "https://api.checkout.staging.povito.com/v1/events/{id}" \
-H "Authorization: Bearer povito_ck_test_..."{
"id": "id",
"object": "event",
"type": "*",
"livemode": true,
"created_at": "2026-09-12T10:30:00Z",
"data": {
"object": null
},
"deliveries": [
{
"endpoint_id": "endpoint_id",
"attempt_no": 1,
"status_code": 1,
"error": "error",
"delivered_at": "2026-09-12T10:30:00Z",
"next_retry_at": "2026-09-12T10:30:00Z"
}
]
}POST /events/{id}/redeliver#
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Meaning | Body | ||||||
|---|---|---|---|---|---|---|---|---|
202 | Queued to every matching endpoint | inline schema
| ||||||
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/events/{id}/redeliver" \
-H "Authorization: Bearer povito_ck_test_..."{
"endpoints": 1
}Public
GET /public/sessions/{code}#
Page data for the hosted checkout and the drop-in
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
coderequired | path | string | pattern ^[A-Z0-9]{8,32}$ |
X-Povito-Customer-Token | header | string | When valid for this session, the response carries the saved profile |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | PublicSession |
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
410 | session_expired or session_canceled | ErrorEnvelope |
Examples
curl "https://api.checkout.staging.povito.com/v1/public/sessions/{code}" \
-H "Authorization: Bearer povito_pk_test_..."{
"code": "code",
"status": "open",
"payment_status": "unpaid",
"reference_id": "reference_id",
"amount": 0,
"currency": "Currency",
"line_items": [
{
"label": "label",
"amount": 0,
"quantity": 1,
"type": "charge"
}
],
"merchant": {
"display_name": "display_name",
"logo_url": "https://example.com",
"accent": "accent"
},
"methods": [
{
"code": null,
"display_name": {
"ar": null,
"ku": null,
"en": null
},
"flow": "redirect",
"currencies": [
null
],
"limits": {
"key": null
},
"capabilities": {
"refunds": null,
"saved_instruments": null,
"wallets": null
},
"enabled": true,
"available": true,
"unavailable_reason": "unavailable_reason",
"presented_amount": 0,
"presented_currency": "Currency"
}
],
"customer": {
"phone": "phone",
"phone_verified": true,
"name": "name",
"address": {
"governorate": "governorate",
"city": "city",
"line": "line",
"landmark": "landmark",
"country": "IQ",
"geo": {
"lat": null,
"lng": null
}
}
},
"collect": {
"phone": "required",
"name": "required",
"shipping_address": "none"
},
"locale": "ar",
"expires_at": "2026-09-12T10:30:00Z",
"cancel_url": "https://example.com",
"livemode": true,
"profile": {
"name": "name",
"addresses": [
null
],
"instruments": [
null
]
}
}POST /public/sessions/{code}/otp#
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
coderequired | path | string | pattern ^[A-Z0-9]{8,32}$ |
Request body application/json · required
| Field | Type | Notes |
|---|---|---|
phonerequired | PhoneE164 |
Responses
| Status | Meaning | Body | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
202 | Sent | inline schema
| |||||||||
429 | Too many requests header Retry-After | ErrorEnvelope · RateLimited |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/public/sessions/{code}/otp" \
-H "Authorization: Bearer povito_pk_test_..." \
-H "Content-Type: application/json" \
-d '{
"phone": "+9647800000000"
}'{
"phone": "+9647800000000"
}{
"sent": true,
"retry_after": 1
}POST /public/sessions/{code}/otp/verify#
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
coderequired | path | string | pattern ^[A-Z0-9]{8,32}$ |
Request body application/json · required
| Field | Type | Notes |
|---|---|---|
phonerequired | PhoneE164 | |
coderequired | string | pattern ^[0-9]{6}$ |
Responses
| Status | Meaning | Body | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | Verified — a session-scoped customer token | inline schema
| ||||||||||||
400 | Validation error | ErrorEnvelope · BadRequest | ||||||||||||
429 | Too many requests header Retry-After | ErrorEnvelope · RateLimited |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/public/sessions/{code}/otp/verify" \
-H "Authorization: Bearer povito_pk_test_..." \
-H "Content-Type: application/json" \
-d '{
"phone": "+9647800000000",
"code": "code"
}'{
"phone": "+9647800000000",
"code": "code"
}{
"customer_token": "customer_token",
"expires_at": "2026-09-12T10:30:00Z",
"profile": {
"name": "name",
"addresses": [
{
"governorate": "governorate",
"city": "city",
"line": "line",
"landmark": "landmark",
"country": "IQ",
"geo": {
"lat": null,
"lng": null
}
}
],
"instruments": [
{
"id": "id",
"object": "instrument",
"gateway": "gateway",
"brand": "brand",
"last_four": "last_four",
"expiry": "expiry",
"status": "active"
}
]
}
}PUT /public/sessions/{code}/customer#
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
coderequired | path | string | pattern ^[A-Z0-9]{8,32}$ |
Request body application/json · required
| Field | Type | Notes |
|---|---|---|
name | string | max length 120 |
address | Address |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | PublicSession |
400 | Validation error | ErrorEnvelope · BadRequest |
Examples
curl -X PUT "https://api.checkout.staging.povito.com/v1/public/sessions/{code}/customer" \
-H "Authorization: Bearer povito_pk_test_..." \
-H "X-Povito-Customer-Token: <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "name",
"address": {
"governorate": "governorate",
"city": "city",
"line": "line",
"landmark": "landmark",
"country": "IQ",
"geo": {
"lat": 1.5,
"lng": 1.5
}
}
}'{
"name": "name",
"address": {
"governorate": "governorate",
"city": "city",
"line": "line",
"landmark": "landmark",
"country": "IQ",
"geo": {
"lat": 1.5,
"lng": 1.5
}
}
}{
"code": "code",
"status": "open",
"payment_status": "unpaid",
"reference_id": "reference_id",
"amount": 0,
"currency": "Currency",
"line_items": [
{
"label": "label",
"amount": 0,
"quantity": 1,
"type": "charge"
}
],
"merchant": {
"display_name": "display_name",
"logo_url": "https://example.com",
"accent": "accent"
},
"methods": [
{
"code": null,
"display_name": {
"ar": null,
"ku": null,
"en": null
},
"flow": "redirect",
"currencies": [
null
],
"limits": {
"key": null
},
"capabilities": {
"refunds": null,
"saved_instruments": null,
"wallets": null
},
"enabled": true,
"available": true,
"unavailable_reason": "unavailable_reason",
"presented_amount": 0,
"presented_currency": "Currency"
}
],
"customer": {
"phone": "phone",
"phone_verified": true,
"name": "name",
"address": {
"governorate": "governorate",
"city": "city",
"line": "line",
"landmark": "landmark",
"country": "IQ",
"geo": {
"lat": null,
"lng": null
}
}
},
"collect": {
"phone": "required",
"name": "required",
"shipping_address": "none"
},
"locale": "ar",
"expires_at": "2026-09-12T10:30:00Z",
"cancel_url": "https://example.com",
"livemode": true,
"profile": {
"name": "name",
"addresses": [
null
],
"instruments": [
null
]
}
}POST /public/sessions/{code}/attempts#
Choose a method and start a payment attempt
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
coderequired | path | string | pattern ^[A-Z0-9]{8,32}$ |
Request body application/json · required
| Field | Type | Notes |
|---|---|---|
methodrequired | MethodCode | |
instrument_id | string | |
save_instrument | boolean | default false |
Responses
| Status | Meaning | Body |
|---|---|---|
201 | Attempt started | AttemptStart |
409 | Idempotency conflict, wrong state, or refund ceiling | ErrorEnvelope · Conflict |
422 | Business rule | ErrorEnvelope · Unprocessable |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/public/sessions/{code}/attempts" \
-H "Authorization: Bearer povito_pk_test_..." \
-H "X-Povito-Customer-Token: <token>" \
-H "Content-Type: application/json" \
-d '{
"method": "cashondelivery",
"instrument_id": "instrument_id",
"save_instrument": false
}'{
"method": "cashondelivery",
"instrument_id": "instrument_id",
"save_instrument": false
}{
"attempt_id": "attempt_id",
"kind": "redirect",
"redirect_url": "https://example.com",
"form_post": {
"key": "string"
},
"present": {
"qr_code": "qr_code",
"readable_code": "readable_code",
"personal_app_link": "https://example.com",
"business_app_link": "https://example.com",
"valid_until": "2026-09-12T10:30:00Z"
}
}GET /public/sessions/{code}/attempts/{attempt_id}#
Poll an attempt; also triggers active reconciliation with the vendor
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
coderequired | path | string | pattern ^[A-Z0-9]{8,32}$ |
attempt_idrequired | path | string |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | AttemptPoll |
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
Examples
curl "https://api.checkout.staging.povito.com/v1/public/sessions/{code}/attempts/{attempt_id}" \
-H "Authorization: Bearer povito_pk_test_..."{
"attempt_id": "attempt_id",
"code": "code",
"method": "cashondelivery",
"status": "created",
"session_status": "open",
"payment_status": "unpaid",
"redirect_to": "https://example.com",
"failure_reason": "failure_reason",
"present": {
"qr_code": "qr_code",
"readable_code": "readable_code",
"personal_app_link": "https://example.com",
"business_app_link": "https://example.com",
"valid_until": "2026-09-12T10:30:00Z"
},
"cancel_url": "https://example.com"
}GET /public/attempts/{attempt_id}#
Attempt lookup without the session code — for the return page on any browser
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
attempt_idrequired | path | string |
Responses
| Status | Meaning | Body | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | OK | inline schemaAll fields of
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
404 | Not found (also returned for another merchant's objects) | ErrorEnvelope · NotFound |
Examples
curl "https://api.checkout.staging.povito.com/v1/public/attempts/{attempt_id}" \
-H "Authorization: Bearer povito_pk_test_..."{
"attempt_id": "attempt_id",
"code": "code",
"method": "cashondelivery",
"status": "created",
"session_status": "open",
"payment_status": "unpaid",
"redirect_to": "https://example.com",
"failure_reason": "failure_reason",
"present": {
"qr_code": "qr_code",
"readable_code": "readable_code",
"personal_app_link": "https://example.com",
"business_app_link": "https://example.com",
"valid_until": "2026-09-12T10:30:00Z"
},
"cancel_url": "https://example.com",
"merchant": {
"display_name": "display_name",
"logo_url": "https://example.com"
},
"locale": "ar",
"livemode": true
}POST /public/sessions/{code}/cancel#
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
coderequired | path | string | pattern ^[A-Z0-9]{8,32}$ |
Responses
| Status | Meaning | Body | ||||||
|---|---|---|---|---|---|---|---|---|
200 | Canceled | inline schema
| ||||||
409 | Idempotency conflict, wrong state, or refund ceiling | ErrorEnvelope · Conflict |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/public/sessions/{code}/cancel" \
-H "Authorization: Bearer povito_pk_test_..."{
"redirect_to": "https://example.com"
}GET /public/test-gateway/{attempt_id}#
Test mode only — what the simulated vendor page shows
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
attempt_idrequired | path | string |
Responses
| Status | Meaning | Body | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | OK | inline schema
| |||||||||||||||||||||
403 | Insufficient scope, mode mismatch, or suspended merchant | ErrorEnvelope · Forbidden |
Examples
curl "https://api.checkout.staging.povito.com/v1/public/test-gateway/{attempt_id}" \
-H "Authorization: Bearer povito_pk_test_..."{
"attempt_id": "attempt_id",
"status": "created",
"amount": 0,
"currency": "Currency",
"method": "cashondelivery",
"return_url": "https://example.com"
}POST /public/test-gateway/{attempt_id}/decide#
Test mode only — the simulated vendor page's Succeed / Fail / Cancel / Slow buttons
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
attempt_idrequired | path | string |
Request body application/json · required
| Field | Type | Notes |
|---|---|---|
decisionrequired | string | one of "succeeded", "failed", "canceled", "slow" |
Responses
| Status | Meaning | Body | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | Decision applied and the attempt verified | inline schema
| ||||||||||||
403 | Insufficient scope, mode mismatch, or suspended merchant | ErrorEnvelope · Forbidden |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/public/test-gateway/{attempt_id}/decide" \
-H "Authorization: Bearer povito_pk_test_..." \
-H "Content-Type: application/json" \
-d '{
"decision": "succeeded"
}'{
"decision": "succeeded"
}{
"attempt_id": "attempt_id",
"status": "created",
"return_url": "https://example.com"
}POST /callbacks/{mode}/{gateway}#
Vendor callback target. A hint only — the attempt is verified against the vendor's status API before anything changes.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
moderequired | path | string | one of "live", "test" |
gatewayrequired | path | string |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | Received | |
401 | Signature rejected |
Examples
curl -X POST "https://api.checkout.staging.povito.com/v1/callbacks/{mode}/{gateway}"Health
GET /health#
Liveness and the list of registered gateways (names only)
Responses
| Status | Meaning | Body | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | OK | inline schema
|
Examples
curl "https://api.checkout.staging.povito.com/v1/health"{
"status": "ok",
"version": "version",
"gateways": [
"gateways"
]
}Shared parameters#
IdempotencyKey#
| Name | In | Type | Notes |
|---|---|---|---|
Idempotency-Keyrequired | header | string | Same key + same body replays the first response; same key + different body is 409. A UUID is the usual choice pattern ^[A-Za-z0-9_-]{8,128}$ |
SessionId#
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | pattern ^cs_(live|test)_[A-Za-z0-9]+$ |
SessionCode#
| Name | In | Type | Notes |
|---|---|---|---|
coderequired | path | string | pattern ^[A-Z0-9]{8,32}$ |
Limit#
| Name | In | Type | Notes |
|---|---|---|---|
limit | query | integer | default 20 · min 1 · max 100 |
Cursor#
| Name | In | Type | Notes |
|---|---|---|---|
cursor | query | string |
Response headers#
IdempotentReplayed#
boolean — Present and true when this response was replayed from the idempotency store
Error responses#
| Name | Meaning | Body |
|---|---|---|
BadRequest | Validation error | ErrorEnvelope |
Unauthorized | Missing or invalid key | ErrorEnvelope |
Forbidden | Insufficient scope, mode mismatch, or suspended merchant | ErrorEnvelope |
NotFound | Not found (also returned for another merchant's objects) | ErrorEnvelope |
Conflict | Idempotency conflict, wrong state, or refund ceiling | ErrorEnvelope |
Unprocessable | Business rule | ErrorEnvelope |
RateLimited | Too many requests header Retry-After | ErrorEnvelope |
Schemas#
ErrorEnvelope#
| Field | Type | Notes | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | fields
|
Currency#
ISO 4217. Amounts are minor units per TRANSACTED_EXPONENT (IQD = whole dinars, USD = cents)
string — ISO 4217. Amounts are minor units per TRANSACTED_EXPONENT (IQD = whole dinars, USD = cents)
pattern ^[A-Z]{3}$
MinorUnits#
Integer minor units of the stated currency
integer — Integer minor units of the stated currency
min 0
PhoneE164#
string
pattern ^\+[1-9][0-9]{6,14}$ · e.g. "+9647800000000"
Locale#
string
one of "ar", "ku", "en"
MethodCode#
PAYMENT_METHOD_CODES from povito-contracts plus card, apple_pay, google_pay, test
string — PAYMENT_METHOD_CODES from povito-contracts plus card, apple_pay, google_pay, test
one of "cashondelivery", "fib", "fib_card", "zaincash", "qicard", "fastpay", "nasspay", "asiapay", "stripe", "card", "apple_pay", "google_pay", "test"
SessionStatus#
string
one of "open", "processing", "completed", "expired", "canceled"
PaymentStatus#
string
one of "unpaid", "paid", "requires_offline_collection", "failed", "partially_refunded", "refunded"
AttemptStatus#
string
one of "created", "initiated", "redirected", "presented", "charging", "verifying", "succeeded", "failed", "canceled", "expired"
LineItem#
| Field | Type | Notes |
|---|---|---|
labelrequired | string | max length 200 |
amountrequired | MinorUnits | |
quantity | integer | default 1 · min 1 |
typerequired | string | charge, shipping and fee add; discount subtracts; the net must equal the session amount one of "charge", "shipping", "fee", "discount" |
Address#
| Field | Type | Notes | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
governorate | string | Iraqi governorate code (GovernorateCode in povito-contracts) | |||||||||
city | string | max length 120 | |||||||||
line | string | max length 240 | |||||||||
landmark | string | max length 240 | |||||||||
country | string | default "IQ" · pattern ^[A-Z]{2}$ | |||||||||
geo | object | fields
|
CustomerInput#
Collect#
| Field | Type | Notes |
|---|---|---|
phone | string | one of "required", "optional", "none" · default "required" |
name | string | one of "required", "optional", "none" · default "required" |
shipping_address | string | one of "required", "optional", "none" · default "none" |
Presentment#
Only for methods that cannot present the session currency (Stripe presents USD). The rate is snapshotted and reported, never recomputed.
| Field | Type | Notes |
|---|---|---|
currencyrequired | Currency | |
fx_raterequired | integer | Micro-units — 1_000_000 = 1.0; session currency per presentment currency min 1 |
CheckoutSessionCreate#
| Field | Type | Notes |
|---|---|---|
reference_idrequired | string | min length 1 · max length 128 |
amountrequired | MinorUnits | |
currencyrequired | Currency | |
line_itemsrequired | array of | at least 1 item |
payment_method_types | array of | Default is every enabled method for this merchant that supports the currency |
customer | CustomerInput | |
collect | Collect | |
presentment | Presentment | |
locale | Locale | |
success_urlrequired | string (uri) | Host must be on the merchant's allowed list; no status is appended |
cancel_url | string (uri) | |
expires_at | string (date-time) | Default +60 min; min +5 min; max +24 h |
metadata | map of | at most 20 keys |
PaymentDetails#
For cash on delivery (payment_status requires_offline_collection) captured_amount and captured_currency are null — no money moved
| Field | Type | Notes | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
attempt_idrequired | string | ||||||||||
methodrequired | MethodCode | ||||||||||
gatewayrequired | string | ||||||||||
gateway_referencerequired | string | ||||||||||
captured_amountrequired | integer | null | min 0 | |||||||||
captured_currencyrequired | string | null | pattern ^[A-Z]{3}$ | |||||||||
presented_amountrequired | MinorUnits | ||||||||||
presented_currencyrequired | Currency | ||||||||||
fx_rate | integer | null | Micro-units | |||||||||
captured_atrequired | string (date-time) | ||||||||||
instrument | object | null | fields
|
CheckoutSession#
| Field | Type | Notes | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
idrequired | string | e.g. "cs_live_01J8Z3K9Q4M2XA7B" | |||||||||||||||
objectrequired | string | one of "checkout.session" | |||||||||||||||
coderequired | string | ||||||||||||||||
urlrequired | string (uri) | ||||||||||||||||
livemoderequired | boolean | ||||||||||||||||
statusrequired | SessionStatus | ||||||||||||||||
payment_statusrequired | PaymentStatus | ||||||||||||||||
reference_idrequired | string | ||||||||||||||||
amountrequired | MinorUnits | ||||||||||||||||
currencyrequired | Currency | ||||||||||||||||
line_itemsrequired | array of | ||||||||||||||||
payment_method_typesrequired | array of | ||||||||||||||||
customerrequired | object | fields
| |||||||||||||||
collect | Collect | ||||||||||||||||
presentment | Presentment or null | ||||||||||||||||
paymentrequired | PaymentDetails or null | ||||||||||||||||
refunded_amount | MinorUnits | ||||||||||||||||
locale | Locale | ||||||||||||||||
success_urlrequired | string (uri) | ||||||||||||||||
cancel_url | string | null (uri) | ||||||||||||||||
expires_atrequired | string (date-time) | ||||||||||||||||
completed_at | string | null (date-time) | ||||||||||||||||
metadata | map of | ||||||||||||||||
created_atrequired | string (date-time) | ||||||||||||||||
updated_atrequired | string (date-time) |
PaymentMethod#
| Field | Type | Notes | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
coderequired | MethodCode | |||||||||||||
display_namerequired | object | fields
| ||||||||||||
flowrequired | string | one of "redirect", "present", "charge", "offline" | ||||||||||||
currenciesrequired | array of | |||||||||||||
limits | map of | |||||||||||||
capabilitiesrequired | object | fields
| ||||||||||||
enabledrequired | boolean |
RefundCreate#
| Field | Type | Notes |
|---|---|---|
session_idrequired | string | |
amountrequired | MinorUnits | |
reasonrequired | string | min length 10 · max length 1500 |
metadata | map of |
Refund#
| Field | Type | Notes |
|---|---|---|
idrequired | string | |
objectrequired | string | one of "refund" |
livemoderequired | boolean | |
session_idrequired | string | |
attempt_idrequired | string | |
amountrequired | MinorUnits | |
currencyrequired | Currency | |
reasonrequired | string | |
initiated_byrequired | string | one of "merchant", "povito_admin" |
statusrequired | string | one of "requested", "processing", "succeeded", "failed", "rejected" |
gateway_reference | string | null | |
failure_reason | string | null | |
metadata | map of | |
created_atrequired | string (date-time) | |
updated_at | string (date-time) |
EventType#
string
one of "*", "checkout.session.completed", "checkout.session.expired", "checkout.session.canceled", "payment.attempt.failed", "refund.succeeded", "refund.failed", "customer.instrument.saved", "customer.instrument.revoked"
WebhookEndpointCreate#
| Field | Type | Notes |
|---|---|---|
urlrequired | string (uri) | HTTPS only; private-network targets are refused |
eventsrequired | array of | at least 1 item |
moderequired | string | one of "live", "test" |
description | string | max length 200 |
WebhookEndpoint#
| Field | Type | Notes |
|---|---|---|
idrequired | string | |
objectrequired | string | one of "webhook_endpoint" |
urlrequired | string (uri) | |
eventsrequired | array of | |
moderequired | string | one of "live", "test" |
statusrequired | string | one of "enabled", "disabled" |
disabled_reason | string | null | one of "delivery_failures", "merchant", null |
description | string | null | |
created_atrequired | string (date-time) |
WebhookEndpointWithSecret#
All fields of WebhookEndpoint, plus:
| Field | Type | Notes |
|---|---|---|
idrequired | string | |
objectrequired | string | one of "webhook_endpoint" |
urlrequired | string (uri) | |
eventsrequired | array of | |
moderequired | string | one of "live", "test" |
statusrequired | string | one of "enabled", "disabled" |
disabled_reason | string | null | one of "delivery_failures", "merchant", null |
description | string | null | |
created_atrequired | string (date-time) | |
secretrequired | string | Shown once. Verify Povito-Signature with it |
Event#
| Field | Type | Notes | ||||||
|---|---|---|---|---|---|---|---|---|
idrequired | string | |||||||
objectrequired | string | one of "event" | ||||||
typerequired | EventType | |||||||
livemoderequired | boolean | |||||||
created_atrequired | string (date-time) | |||||||
datarequired | object | fields
|
EventWithDeliveries#
All fields of Event, plus:
| Field | Type | Notes | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
idrequired | string | ||||||||||||||||||||||
objectrequired | string | one of "event" | |||||||||||||||||||||
typerequired | EventType | ||||||||||||||||||||||
livemoderequired | boolean | ||||||||||||||||||||||
created_atrequired | string (date-time) | ||||||||||||||||||||||
datarequired | object | fields
| |||||||||||||||||||||
deliveries | array of | fields
|
Instrument#
| Field | Type | Notes |
|---|---|---|
idrequired | string | |
objectrequired | string | one of "instrument" |
gatewayrequired | string | |
brand | string | null | |
last_four | string | null | |
expiry | string | null | pattern ^[0-9]{2}/[0-9]{2}$ |
statusrequired | string | one of "active", "canceled" |
PublicCustomerProfile#
| Field | Type | Notes |
|---|---|---|
name | string | null | |
addresses | array of | |
instruments | array of |
PublicSession#
What the page may see — never metadata, never other sessions
| Field | Type | Notes | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
coderequired | string | ||||||||||||||||
statusrequired | SessionStatus | ||||||||||||||||
payment_statusrequired | PaymentStatus | ||||||||||||||||
reference_id | string | ||||||||||||||||
amountrequired | MinorUnits | ||||||||||||||||
currencyrequired | Currency | ||||||||||||||||
line_itemsrequired | array of | ||||||||||||||||
merchantrequired | object | fields
| |||||||||||||||
methodsrequired | array of | ||||||||||||||||
customer | object | fields
| |||||||||||||||
collectrequired | Collect | ||||||||||||||||
localerequired | Locale | ||||||||||||||||
expires_atrequired | string (date-time) | ||||||||||||||||
cancel_url | string | null (uri) | ||||||||||||||||
livemoderequired | boolean | ||||||||||||||||
profilerequired | PublicCustomerProfile or null | The saved profile when a still-valid X-Povito-Customer-Token accompanies the read; null otherwise |
AttemptPoll#
| Field | Type | Notes | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attempt_idrequired | string | |||||||||||||||||||
coderequired | string | |||||||||||||||||||
methodrequired | MethodCode | |||||||||||||||||||
statusrequired | AttemptStatus | |||||||||||||||||||
session_statusrequired | SessionStatus | |||||||||||||||||||
payment_statusrequired | PaymentStatus | |||||||||||||||||||
redirect_torequired | string | null (uri) | success_url with session_id and reference_id appended once the session completed; never a status | ||||||||||||||||||
failure_reasonrequired | string | null | |||||||||||||||||||
presentrequired | object | null | Re-shown on reload for present flows (FIB QR). qr_code is a data URI image.fields
| ||||||||||||||||||
cancel_urlrequired | string | null (uri) |
AttemptStart#
| Field | Type | Notes | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attempt_idrequired | string | |||||||||||||||||||
kindrequired | string | one of "redirect", "present", "processing", "offline" | ||||||||||||||||||
redirect_url | string | null (uri) | |||||||||||||||||||
form_post | map of | null | When present the page must auto-submit an HTML form POST of exactly these fields to redirect_url instead of navigating (NassPay) | ||||||||||||||||||
present | object | null | fields
|
Examples#
CreateMarketplaceSession#
Marketplace order, method pre-selected in the storefront (Phase 1)
{
"reference_id": "cart_01J8Z3K9Q4M2XA7B",
"amount": 45000,
"currency": "IQD",
"line_items": [
{
"label": "Basket",
"amount": 42000,
"type": "charge"
},
{
"label": "Delivery — Hi-Express",
"amount": 5000,
"type": "shipping"
},
{
"label": "Coupon RAMADAN",
"amount": 2000,
"type": "discount"
}
],
"payment_method_types": [
"zaincash"
],
"customer": {
"phone": "+9647800000000",
"name": "Ali M. Ismail"
},
"collect": {
"phone": "required",
"name": "required",
"shipping_address": "none"
},
"locale": "ar",
"success_url": "https://povito.com/ar/checkout/payment/return",
"cancel_url": "https://povito.com/ar/checkout",
"metadata": {
"cart_id": "cart_01J8Z3K9Q4M2XA7B"
}
}Povito extensions#
Values from x-povito in the contract — the webhook signing shape and retry schedule the webhooks guide documents.
{
"decisions": [
"D-44",
"D-45",
"D-46",
"D-47",
"D-48",
"D-49",
"D-50",
"D-51"
],
"webhook_signature": {
"header": "Povito-Signature",
"format": "t=<unix>,v1=<hex>",
"algorithm": "HMAC-SHA256(secret, `${t}.${rawBody}`)",
"tolerance_seconds": 300,
"retry_schedule": [
60,
300,
1800,
7200,
21600,
86400,
86400
]
}
}