Payments (demo)
4 routes. Paths are relative to https://api.intersink.com/v1.
- GET/payments/demoDemo payments status + test cards (404 when off)
- POST/payments/demo/chargeCharge a DEMO payment with a test card (4242… success, 4000…0002 decline, 4000002500003155 3-D Secure)
- GET/payments/demo/checkout/{paymentId}Hosted DEMO checkout page (HTML; no real money)
- POST/payments/demo/checkout/{paymentId}/completeComplete a DEMO checkout (form post). Settles via the Stripe webhook path, then redirects (303) to return_url or shows a receipt
Demo payments status + test cards (404 when off)
GET/payments/demo
Public: no sign-in needed.
Response
200. The payload in data is not described in the spec yet.
Charge a DEMO payment with a test card (4242… success, 4000…0002 decline, 4000002500003155 3-D Secure)
POST/payments/demo/charge
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| Idempotency-Key | string, header | Optional client-generated key (8-128 chars, [A-Za-z0-9_-]). A retry with the same key and body replays the first response (Idempotent-Replayed: true); 409 while the first is in flight; 422 if the body differs. |
Request body application/json
| Field | Type | Description |
|---|---|---|
| payment_idrequired | string | payments.id returned by POST /payments/create. At most 64 characters. |
| card_numberrequired | string | 4242424242424242 succeeds, 4000000000000002 declines, 4000002500003155 requires 3-D Secure. |
Response
200. The payload in data is not described in the spec yet.
Hosted DEMO checkout page (HTML; no real money)
GET/payments/demo/checkout/{paymentId}
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| paymentIdrequired | string, path | |
| trequired | string, query | |
| challengerequired | string, query |
Response
200. The payload in data is not described in the spec yet.
Complete a DEMO checkout (form post). Settles via the Stripe webhook path, then redirects (303) to return_url or shows a receipt
POST/payments/demo/checkout/{paymentId}/complete
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| paymentIdrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| trequired | string | Checkout capability token (the t from checkout_url). At most 128 characters. |
| outcomerequired | string | One of: "success", "fail", "challenge", "challenge_success", "challenge_fail". |
Response
200. The payload in data is not described in the spec yet.