e-Próspera
Reference

Create a partner hosted-checkout session

View as Markdown
POST
/api/v1/partner/residency_applications/{id}/checkout_session

Creates a hosted checkout for the application invoice. Send exactly one of paymentProvider or paymentMethod. redirectUrl must use an approved redirect origin; Stripe returns the payer to redirectUrl?success=true on success and to redirectUrl on cancel. The response is { data: { url }, invoiceId }. Payment is confirmed asynchronously: poll the application until nextSteps.paymentRequired is false. Requires Idempotency-Key.

Authorization

partnerKey
AuthorizationBearer <token>

Partner Key for one approved Partner Integration. Keys are lifecycle- and scope-checked, and cross-integration resources are hidden.

In: header

Path Parameters

id*string
Formatuuid

Header Parameters

Idempotency-Key*string

8-128 URL-safe characters. Retained for 24 hours per integration and route. An identical retry replays the stored response with Idempotency-Replayed: true; a different body under the same key returns 409.

Match^[A-Za-z0-9_.~-]+$
Length8 <= length <= 128

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/partner/residency_applications/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkout_session" \  -H "Idempotency-Key: stringst" \  -H "Content-Type: application/json" \  -d '{    "redirectUrl": "http://example.com"  }'
{  "data": {    "property1": null,    "property2": null  },  "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec"}