Skip to content

Spense Partner APIs (v1)

Download OpenAPI description
Languages
Servers
Production API
https://api.spensepay.com/partner/

Authentication

Operations

Settlements

Operations

Payment Methods

Operations

Get Payment Methods

Request

Get a list of available payment methods, which can be used to specify which payment method to use when creating a payment. The list of payment methods may change over time, so it is recommended to fetch this list dynamically when creating a payment, to allow the user select the payment method they want to use.

The list of payment methods is not guaranteed to be exhaustive, and special configuration is needed for most of the possible methods.

The default method which is a payment link, will always be available with the string ID 000000000000000000000000.

Security
OAuth2ClientCredentials
Query
test_modeboolean(Test Mode)
Default false
Headers
X-Organization-Idstring(X-Organization-Id)

Required if the account is part of multiple organizations. If the account only has access to one organization, this header is not required.

curl -i -X GET \
  'https://api.spensepay.com/partner/payment-methods?test_mode=false' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'X-Organization-Id: string'

Responses

List of available payment methods

Bodyapplication/jsonArray [
idstring(Id)^[a-fA-F0-9]{24}$required
namestring(Name)required
profile_idsArray of strings(Profile Ids)

The IDs of the profiles that the payment method belongs to.

Default []
typestring(PartnerPaymentMethodType)required
Enum"payment_link""terminal""invoice"
activeboolean(Active)

Whether the payment method is active. Recommend to display in-active payments, but as disabled. Can for example be inactive if a terminal is turned off.

Default true
]
Response
application/json
[ { "id": "000000000000000000000000", "name": "Payment link via SMS/Email", "type": "payment_link", "active": true } ]

Resend To Payment Method

Request

Attempt to re-send the payment method for a payment.This will not create a new payment, but re-send the payment to the specified payment method. This can be used many times and have different behaviour depending on the type of method used.

  • If a payment link method is used, the payment link will be sent again.
  • If a terminal method is used, the payment will be sent to the specified terminal.
  • If a invoice method is used, we will send a invoice to the specified invoice type.

Rely on webhooks to get notified about the result of the action.

Security
OAuth2ClientCredentials
Headers
X-Organization-Idstring(X-Organization-Id)

Required if the account is part of multiple organizations. If the account only has access to one organization, this header is not required.

Bodyapplication/jsonrequired
payflow_idstring(Payflow Id)^[a-fA-F0-9]{24}$required
payment_method_idstring(Payment Method Id)^[a-fA-F0-9]{24}$required
curl -i -X POST \
  https://api.spensepay.com/partner/payment-methods/resend \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-Organization-Id: string' \
  -d '{
    "payflow_id": "string",
    "payment_method_id": "string"
  }'

Responses

Successful Response

Bodyapplication/json
object(Response Resend To Payment Method)
Response
application/json
{}

Webhooks