Saltar a contenido

Create account topup link


Create a payment link that adds credit to the caller's stamp-credit balance (see get_account_credit). Nothing is charged by this call: it only returns a link the user opens in their browser to pay with the payment provider. This is not a CFDI payment complement and has nothing to do with invoices. Every top-up is invoiced (a CFDI is issued to the customer once the payment is confirmed), so invoice_to says to whom: the RFC of one of the caller's issuers (list_issuers); the CFDI uses the fiscal data on that issuer's profile. It is required where top-ups are invoiced and ignored elsewhere; a user with no issuer must first register a razón social in the web app. Returns {billing: on, amount, payment_url, message} (the payment is made by opening payment_url in a browser; the credit arrives once the provider confirms the payment) or {billing: off}. Errors: invalid_argument (invoice_to missing, unknown or not the caller's), topup_unavailable (the deployment has no top-up product), topup_failed (the provider refused; the message says why).

Alcance (scope): invoices:write · Características: Interactúa con el mundo exterior

Parámetros

Parámetro Tipo Obligatorio Descripción
amount number Sí Amount to add, in the product's currency, up to two decimals.
invoice_to string Sí Who the top-up is invoiced to: the RFC of one of the caller's issuers.
uso_cfdi string No SAT CFDI use for the receiver (for example G03). Default: the one used for that RFC last time, else G03.
issuer string Sí Id of the issuer the call acts for, from list_issuers.

Esquema de entrada (JSON Schema)

{
  "type": "object",
  "properties": {
    "amount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Amount to add, in the product's currency, up to two decimals."
    },
    "invoice_to": {
      "type": "string",
      "description": "Who the top-up is invoiced to: the RFC of one of the caller's issuers."
    },
    "uso_cfdi": {
      "type": "string",
      "description": "SAT CFDI use for the receiver (for example G03). Default: the one used for that RFC last time, else G03."
    },
    "issuer": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the issuer the call acts for, from list_issuers."
    }
  },
  "required": [
    "amount",
    "invoice_to",
    "issuer"
  ]
}