Get started

Sections

Theme switcher

Create a pay by bank link for a gift card purchase.

Header Parameters

Acceptstring

Media type the client can parse. Always application/json for this API.

Default value
application/json
Enum values:
application/json
Authorizationstring

Body Parameters

promo_idinteger Required

The promotion-id of the gift card promotion, from getPromotionsList.

user_idstring Required

Your identifier for the customer.

emailstring Required

The customer's email address. Required.

namestring

The customer's name. Optional.

consentstring

Optional consent flag, as for paymentLink.

currencystring Required

Required. Pay by bank is in pounds sterling only, so send GBP.

amountnumber Required

Amount of the gift card in pounds.

bankCodestring Required

The bank-code the customer chose from getBanksList.

Response

200
Object

A link to the customer's bank, or a failure message. Check for payment_link; some failures return HTTP 200 with only a message.

Response Attributes

payment_linkstring

Redirect the customer here to pay at their bank.

responseinteger
order-idstring

Spendstream's order reference. It comes back on the TRANSACTION_UPDATED webhook.

messagestring
400
Object

Request failed validation. Body shape is {"message": "REASON"}.

Response Attributes

messagestring

Human-readable failure reason. Safe to surface to integrators but not end-users.

errorstring

Alternative error message field used by a subset of endpoints (notably getToken and authentication failures). Integrators should check for both message and error when parsing failure responses.

responseinteger

Numeric status code echoing the HTTP status (e.g. 400, 401). Populated on most error paths; a few auth-layer failures omit it.

401
Object

Authentication failed (missing, malformed or expired bearer token).

Response Attributes

messagestring

Human-readable failure reason. Safe to surface to integrators but not end-users.

errorstring

Alternative error message field used by a subset of endpoints (notably getToken and authentication failures). Integrators should check for both message and error when parsing failure responses.

responseinteger

Numeric status code echoing the HTTP status (e.g. 400, 401). Populated on most error paths; a few auth-layer failures omit it.

403
Object

Your publisher account has an IP allow-list and the request came from an address that is not on it. The API checks the caller's IP address on every request once a list exists. Ask Spendstream to add the address, or to clear the list if you do not want the restriction. See IP allow-listing in the guide.

Response Attributes

statusboolean
messagestring
Was this section helpful?

POST

/

Select
1

Response

Was this section helpful?