Skip to main content
POST
/
api
/
v1
/
paymentrequests
Create a payment request
curl --request POST \
  --url https://www.{baseurl}.com/api/v1/paymentrequests \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "requestId": "<string>"
}
Use the /PaymentRequests endpoint as the final step to ensure you can have a user complete the payments flow. To successfully call this endpoint, you must first call the /Authorize endpoint to obtain a valid access token. You must also have already called the /Sessions/Initiate API and received a valid sessionId.

Creating a payment request

Now that you have successfully authorized and initiated a session, it’s time to create a payment request and link your sessionId to a requestId. This request activates the previously created session and provides the user with the ability to complete the FlinksPay app flow by being redirected to their institution. It is imperative that you call this endpoint before launching the application for your user. When creating a payment request using this endpoint, you are linking a sessionId to a requestId. This validates the session and creates the payment activity. It also enables you to use the given requestId to retrieve details on payment statuses.

Using a sessionId in App without a valid request

If you do not create a payment request prior to launching the application with a generated sessionId, the user will not be able to complete the flow. Please ensure that you create a payment request prior to launching the application for the user.
To create a payment request, simply use the access_token as authorization, and supply the previously generated (from /Sessions/Initiate) sessionId within the body of the request. In return, you will receive a HTTP 200 OK and a requestId that can be used to track the user’s activity and the corresponding payment. Once you receive a 200 OK and the associated requestId, you are now able to initiate the application for your end user and they will be able to complete the flow. Please use the previously acquired sessionId to append to your base FlinksPay URL (provided at onboarding - for example https://{BaseURL}/app/?sessionId={{sessionId}}) in order to generate the app session and have the user complete the flow.

Headers

BaseURI
string

The unique environment that you are making the API call from. Provided during onboarding.

BearerToken
string

Bearer (plus the access_token received previously in a completed authorize call).

Body

application/json
sessionId
string

GUID representing the unique ID of the generated session within the Flinks system.

Response

Result

requestId
string

The unique ID of the payment request.