Skip to content

[Docs Update] SWML pay examples use wrong data type #309

@Slamhaus

Description

@Slamhaus

The SWML pay examples listed below show the parameter charge_amount as a number, but this needs to be a string. Using the examples as they are now will result in call failures with the message Parameter \"charge_amount\" in method \"pay\" has invalid value

Examples:
https://signalwire.com/docs/swml/reference/pay#charges
https://signalwire.com/docs/swml/reference/pay#tokenization

Working examples:

version: 1.0.0
sections:
  main:
    - pay:
        charge_amount: "25.00"
        payment_connector_url: "https://example.com/process"

version: 1.0.0
sections:
  main:
    - pay:
        charge_amount: "0"
        payment_connector_url: "https://example.com/process"

The examples at the bottom of the doc page are correct, but the two I linked above are not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions