Call an endpoint (x402-aware)
ripar_call_endpointCalls any endpoint and returns the response. If the endpoint requires payment (402), returns a payment challenge that must be resolved by providing a signed payment header.
Instructions
Call an endpoint and return its response. If it answers 402, you get the payment challenge back instead of a result — this server holds no private key and CANNOT pay. To complete a paid call, have a wallet sign the payment and pass the resulting header as paymentHeader; it is forwarded untouched as X-PAYMENT.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Full URL of the endpoint to call | |
| body | No | JSON body, for POST | |
| method | No | HTTP method | GET |
| headers | No | Extra request headers | |
| paymentHeader | No | A pre-signed x402 payment header. Sending this spends money. This server cannot create one. |