Payments
6 routes. Paths are relative to https://api.intersink.com/v1.
- GET/payments/{id}Get one
- POST/payments/createCreate
- GET/payments/myGet my
- POST/payments/verifyVerify
- POST/payments/webhook/razorpayRazorpay webhook
- POST/payments/webhook/stripeStripe webhook
Get one
GET/payments/{id}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Create
POST/payments/create
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 |
|---|---|---|
| provider | string | Defaults to "stripe" (served by "demo" while the demo gate is open). One of: "razorpay", "stripe", "demo". |
| amountrequired | number | Amount in MAJOR units (e.g. rupees / dollars). The service converts this to minor units (paise / cents) before storing and sending to the gateway. Max 2 decimal places for fiat. Minimum 1, maximum 999999.99. |
| currency | string | ISO 4217 code of a currency the platform settles (GBP, USD, EUR, INR). Ignored for an order payment: the order's own currency is charged. One of: "GBP", "USD", "EUR", "INR". At least 3 characters, at most 3 characters. |
| customer_name | string | At most 255 characters. |
| customer_email | string | At most 255 characters. |
| customer_phone | string | At most 255 characters. |
| receipt | string | At most 255 characters. |
| metadata | object | |
| return_url | string | Where the hosted (demo) checkout sends the browser afterwards, with
payment_id, status and provider appended. Must be on an allowed
frontend origin. Ignored by the Stripe / Razorpay client-side flows. At most 2048 characters. |
Response
201. The payload in data is of type object.
Get my
GET/payments/my
Needs a signed-in user (Bearer token or access_token cookie).
Response
200. The payload in data is not described in the spec yet.
Verify
POST/payments/verify
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 |
|---|---|---|
| razorpay_order_idrequired | string | |
| razorpay_payment_idrequired | string | |
| razorpay_signaturerequired | string |
Response
200. The payload in data is not described in the spec yet.
Razorpay webhook
POST/payments/webhook/razorpay
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| x-razorpay-signature | string, header |
Response
200. The payload in data is not described in the spec yet.
Stripe webhook
POST/payments/webhook/stripe
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| stripe-signature | string, header |
Response
200. The payload in data is not described in the spec yet.