create_hosted_payment | Create a hosted payment REQUEST: PayPlug returns a payment page (hosted_payment.payment_url in the response) for the customer to pay; nothing is charged by this call. Arguments: amount (integer in cents, 30–2000000, e.g. 4207 for 42.07 €); currency (“EUR”, the only currency PayPlug supports); billing (object, required: email (string, required — the customer’s address), optional first_name, last_name, title (“mr” | “mrs” | “miss”), mobile_phone_number (E.164 string, required by PayPlug when sent_by is “SMS”), landline_phone_number, address1, address2, company_name, postcode, city, state, country (2-letter ISO code), language (“fr” | “en” | “it”)); hosted_payment (object, required: return_url (string, http(s) URL the customer returns to after the page, paid or not), cancel_url (string, http(s) URL after “Cancel payment”), sent_by (“EMAIL” | “SMS” | “OTHER”: EMAIL/SMS makes PayPlug send the link to the billing email/phone and keeps it valid 7 days, OTHER means you share the link yourself; without sent_by the link expires after 15 minutes) — all optional inside); optional shipping (object, same fields as billing plus delivery_type: “BILLING” | “VERIFIED” | “NEW” | “SHIP_TO_STORE” | “DIGITAL_GOODS” | “TRAVEL_OR_EVENT” | “OTHER”; sent as {} when omitted); optional description (string, max 80 chars, shown to the customer); optional metadata (flat JSON object of your own keys); optional notification_url (string, http(s)); optional force_3ds (boolean). No deferred payment, saved card or alternative payment method. |