Esempi di codice
Esempi da copiare e incollare per i flussi più comuni, in cURL, Node e Python.
Non ancora attivo — api.baynoy.com non risolve, quindi gli esempi qui sotto oggi non funzioneranno. Descrivono il contratto verso cui stiamo lavorando e le forme in questa pagina possono ancora cambiare.
Create a payment link
The same call in three shapes.
cURL
curl https://api.baynoy.com/v1/payment_links \
-H "Authorization: Bearer bk_test_..." \
-H "Idempotency-Key: 4f7c9a2e-..." \
-d amount=4900 -d currency=EUR -d title="Design retainer"Node
const baynoy = require("@baynoy/sdk")("bk_test_...");
const link = await baynoy.paymentLinks.create({
amount: 4900, // integer minor units — never floats
currency: "EUR",
title: "Design retainer",
});Python
import baynoy
client = baynoy.Client("bk_test_...")
link = client.payment_links.create(
amount=4900, # integer minor units
currency="EUR",
title="Design retainer",
)