UNPKG

@coinbase/cdp-sdk

Version:

SDK for interacting with the Coinbase Developer Platform Wallet API

30 lines (28 loc) 1.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getOnrampOrderById = exports.createOnrampOrder = void 0; const cdpApiClient_js_1 = require("../../cdpApiClient.js"); /** * Create a new Onramp order or get a quote for an Onramp order. Either `paymentAmount` or `purchaseAmount` must be provided. This API currently only supports the payment method `GUEST_CHECKOUT_APPLE_PAY`, and the `paymentLink` returned will only work in iOS apps. We do not support web integration via iframes at this time. For detailed integration instructions and to get access to this API, refer to the [Apple Pay Onramp API docs](https://docs.cdp.coinbase.com/onramp-&-offramp/onramp-apis/apple-pay-onramp-api). * @summary Create an onramp order */ const createOnrampOrder = (createOnrampOrderBody, options) => { return (0, cdpApiClient_js_1.cdpApiClient)({ url: `/v2/onramp/orders`, method: "POST", headers: { "Content-Type": "application/json" }, data: createOnrampOrderBody, }, options); }; exports.createOnrampOrder = createOnrampOrder; /** * Get an onramp order by ID. * @summary Get an onramp order by ID */ const getOnrampOrderById = (orderId, options) => { return (0, cdpApiClient_js_1.cdpApiClient)({ url: `/v2/onramp/orders/${orderId}`, method: "GET" }, options); }; exports.getOnrampOrderById = getOnrampOrderById; //# sourceMappingURL=onramp.js.map