post

/v2/links

Creates a new pay_link which allows customers to directly interact with Stronghold-hosted onboarding and payment services.

Authorization

apiKey - SH-SECRET-KEY

Request Body

Schema
object
$schema: http://json-schema.org/draft-04/schema#
type
string
1 validation + required
customer_id
string

The customer id the pay link is for.

1 validation + required
charge_id
string or null

The charge associated with the pay link.

1 validation
charge
object
tip
object
order
object

Order information related to a checkout process.

callbacks
object

The callbacks configuration for a PayLink.

Returned query parameters

When a PayLink flow has been completed successfully or is exited. The callback URL will be called with a few query parameters. Those parameters give information on the PayLink and on the customer actions as well.

Stronghold parameters

There are the query parameters which can be passed to the callback URL.

Parameter Description success_url callback exit_url callback
pay_link_id ID of the PayLink All All
pay_link_type Type of the PayLink All All
pay_link_callback Result of the flow, success or exit. All All
payment_source_id Payment source ID used or created. bank_link, checkout, tipping None
charge_id Charge ID created. checkout None
tip_id Tip ID created. tipping None

Custom parameters

It is possible to pass custom parameters to a callback URL. The parameter will be prefixed by custom_ before redirection.

If the callback URL contains the query parameter order_id=12345. Then the callback will be called with all the Stronghold parameters plus the parameter custom_order_id with the value 12345.

Responses

The newly created pay link.

Schema
object
$schema: http://json-schema.org/draft-04/schema#
response_id
string

The response ID.

1 validation + required
time
string

The response time.

1 validation + required
status_code
integer

The HTTP status code.

4 validations + required
result
object

A PayLink are used to take the customer through a payment related flow.

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
$$.env
1 variable not set
SH-SECRET-KEY