openapi: 3.2.0
info:
title: Satispay - GBusiness Payments API
version: 1.0.0
contact:
name: Satispay Tech
email: tech@satispay.com
url: https://developers.satispay.com
servers:
- url: https://authservices.satispay.com/g_business/v1
description: Production
- url: https://staging.authservices.satispay.com/g_business/v1
description: Sandbox
tags:
- name: Payments
paths:
/payments:
post:
summary: Create payment
operationId: create-a-payment
parameters:
- in: header
name: Content-Type
description: Always send this header as `application/json`.
required: true
schema:
type: string
- in: header
name: Host
description: The host declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Date
description: The date declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Digest
description: The digest declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Authorization
description: The request [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Idempotency-Key
description: The idempotent request key.
You can read more [here](ref:idempotency).
required: false
schema:
type: string
- in: header
name: x-satispay-deviceinfo
description: The device information (e.g., hostname).
required: false
schema:
type: string
- in: header
name: x-satispay-devicetype
description: The device type.
required: false
schema:
type: string
enum:
- SMARTPHONE
- TABLET
- CASH REGISTER
- POS
- PC
- ECOMMERCE_PLUGIN
- in: header
name: x-satispay-os
description: The Operating System name (e.g., Windows).
required: false
schema:
type: string
- in: header
name: x-satispay-osv
description: The Operating System version (e.g., 10).
required: false
schema:
type: string
- in: header
name: x-satispay-apph
description: The software house name (e.g., Satispay).
required: false
schema:
type: string
- in: header
name: x-satispay-appn
description: The software name (e.g., My awesome app).
required: false
schema:
type: string
- in: header
name: x-satispay-appv
description: The software version (e.g., v2.0.0).
required: false
schema:
type: string
- in: header
name: x-satispay-tracking-code
description: The tracking code used by Satispay commercial partners.
Use this code only if explicitly required by Satispay.
required: false
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
flow:
type: string
description: The payment flow that you want to use.
`MATCH_CODE` [DOC](doc:one-off)
This flow can be used generically for one-off payments.
`HOTP_AUTH` [DOC](doc:one-off-hotp)
This flow can be used to perform one-off payments via HOTP tokens.
To use this flow you must also include the `token` parameter.
`MATCH_USER` [DOC](doc:payment-mobile-number)
This flow can be used for one-off payments on a specific user.
To use this flow you must also include the `consumer_uid` parameter.
`FUND_LOCK` [DOC](doc:funds-lock-late-capture)
This flow can be used for funds lock payments.
`PRE_AUTHORIZED` [DOC](doc:automatic-payments)
This flow can be used for automatic payments.
To use this flow you must also include the `token` parameter.
`PRE_AUTHORIZED_FUND_LOCK` [DOC](doc:automatic-funds-lock)
This flow can be used for automatic funds lock payments.
To use this flow you must also include the `token` parameter.
`REFUND`
This flow can be used for refunds on a specific payment.
To use this flow you must also include the `parent_payment_uid` and the `amount_unit`.
enum:
- MATCH_CODE
- MATCH_USER
- REFUND
- PRE_AUTHORIZED
- FUND_LOCK
- PRE_AUTHORIZED_FUND_LOCK
- HOTP_AUTH
amount_unit:
type: integer
description: The payment amount in cents.
For example, to represent the amount `€12.40`, you should multiply it by `100`, resulting in `1240` cents.
currency:
type: string
description: The payment currency.
Currently `EUR` is the only currency supported.
default: EUR
pre_authorized_payments_token:
type: string
description: The payment automatic payment token id.
This has been replaced with the new `token` parameter.
deprecated: true
token:
type: string
description: The token required to charge the consumer wallet.
It can be an automatic payment or HOTP token.
Required with `HOTP_AUTH`, `PRE_AUTHORIZED` and `PRE_AUTHORIZED_FUND_LOCK` flows only.
consumer_uid:
type: string
description: The unique id of the consumer required for payment acceptance.
To obtain the customer id, please use the [Get Consumer API](ref:retrive-consumer).
Required with `MATCH_USER` flow only.
This parameter is deprecated; we suggest avoiding the `MATCH_USER` UX unless absolutely necessary.
deprecated: true
parent_payment_uid:
type: string
description: The id of the payment that you want to refund.
Required with `REFUND` flow only.
external_code:
type: string
description: The external order id or payment identifier.
We highly recommend to use this field by populating it with your internal order id.
This string will be included in your reports for reconciliation and shown to the Satispay consumer in-app.
This field has a maximum length of 50 characters, including spaces.
callback_url:
type: string
description: The URL to be triggered via an HTTP GET request when there is a change in payment status.
When the given `callback_url` is invoked, a GET request for payment details can be made to retrieve the updated payment status.
Please note that `{uuid}` will be replaced with the generated payment id.
e.g. `https://example.com/satispay-callback?payment_id={uuid}`
You can read more [here](ref:callback-s2s).
redirect_url:
type: string
description: This field specifies the URL where the user will be redirected after the payment flow from the Satispay app is completed.
For instance, you can set this URL to ensure users are redirected to that specific page upon successful payment completion.
e.g. `https://example.com/payment-redirect?order_id=your_order_id`
Please note that this field doesn't support any placeholder.
metadata:
type: object
description: The additional metadata for the payment.
This field supports up to 20 key-value pairs, with keys limited to 45 characters and values limited to 500 characters each.
additionalProperties: true
properties:
phone_number:
type: string
description: This special metadata can be used to pre-fill the phone number field available if you're using a web-redirect flow.
The phone number must contain the prefix an shouldn't have any additional space.
e.g. `+393891122333`
expiration_date:
type: string
description: 'The UTC payment expiration datetime.
The format should be `ISO 8601` like this `yyyy-MM-dd''T''HH:mm:ss.SSSZ`.
By default:
`MATCH_CODE` and `MATCH_USER` payments are valid for 2 hours.
`FUND_LOCK` payments are valid for 10 days.
`PRE_AUTHORIZED_FUND_LOCK` payments are valid for 5 days.
This timeframe is calculated from the moment of creation.
This parameter cannot be used with `PRE_AUTHORIZED`, `HOTP_AUTH` and `REFUND` flows.'
required:
- flow
- amount_unit
- currency
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique payment id.
This can be used for every eventual subsequent operations on the payment, including refunds.
code_identifier:
type: string
description: The Satispay code identifier.
This string can be encoded in a QR code that can be scanned by the user.
This property is only available in `MATCH_CODE` flow payments.
type:
type: string
description: The current payment type.
`TO_BUSINESS`
This type is used for payments from a consumer to a merchant.
`REFUND_TO_BUSINESS`
This type is used for payments from a merchant to a consumer (e.g. refunds).
amount_unit:
type: integer
description: The payment amount in cents.
For example, the amount `€12.40` is being represented as `1240` cents.
currency:
type: string
description: The payment currency.
enum:
- EUR
status:
type: string
description: The current payment status.
`PENDING`
The payment is created and awaits user interaction, such as scanning the QR code.
`AUTHORIZED` - for `FUND_LOCK` and `PRE_AUTHORIZED_FUND_LOCK` flows only.
The payment has been authorized by the user and is ready to be confirmed by the merchant with the [Update payment API](doc:update-a-payment).
`ACCEPTED`
The payment has been accepted and succesfully executed.
expired:
type: boolean
description: The current payment expiration status.
It becomes `true` once it reaches the `expiration_date` without being accepted or canceled.
metadata:
type: object
description: The additional metadata for the payment.
additionalProperties: true
sender:
type: object
description: The sender payment actor.
properties:
id:
type: string
description: The unique sender id.
This will only be available once the payment will be matched with a consumer.
type:
type: string
description: The sender type.
`CONSUMER`
This sender type is used when the payment goes from a consumer to a merchant.
`SHOP`
This sender type is used when the payment goes from a merchant to a consumer (e.g. refunds payments).
name:
type: string
description: The sender name.
This will only be available once the payment will be matched with a consumer.
receiver:
type: object
description: The receiver payment actor.
properties:
id:
type: string
description: The unique receiver id.
type:
type: string
description: The receiver type.
`CONSUMER`
This receiver type is used when the payment goes from a merchant to a consumer.
`SHOP`
This receiver type is used when the payment goes from a consumer to a merchant (e.g. refunds payments).
insert_date:
type: string
description: The UTC payment creation datetime.
expire_date:
type: string
description: The UTC payment expiration datetime.
This property can be ignored when using `PRE_AUTHORIZED` or `HOTP_AUTH` flows.
description:
type: string
deprecated: true
description: The external_code set during the payment creation request.
Please use the `external_code` field instead.
flow:
type: string
deprecated: true
external_code:
type: string
description: The `external_code` set during the creation request.
redirect_url:
type: string
description: The URL where the user will be redirected after the payment flow from the Satispay app is completed.
This property is available only when the payment uses the `MATCH_CODE`, `MATCH_USER` or `FUND_LOCK` flow.
examples:
OK - MATCH_CODE:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"type\": \"CONSUMER\"\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
OK - HOTP_AUTH:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-08-01T09:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"external_code\": \"my_order_id\"\n}"
OK - MATCH_USER:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": []\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\"\n}"
OK - FUND_LOCK:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"type\": \"CONSUMER\"\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-11T09:18:17.163Z\",\n \"flow\": \"CHARGE\",\n \"description\": \"my_order_id\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
OK - PRE_AUTHORIZED:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-08-01T09:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"external_code\": \"my_order_id\"\n}"
OK - PRE_AUTHORIZED_FUND_LOCK:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"AUTHORIZED\",\n \"expired\": false,\n \"metadata\": {\n \"payment_id\": \"my_payment\",\n \"session_id\": \"my_session\",\n \"user\": \"my_user_id\",\n \"order_id\": \"my_order_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-06T09:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"external_code\": \"my_order_id\"\n}"
OK - REFUND:
value: "{\n \"id\": \"3ccea4c1-0d5e-430f-9975-0becd9440d41\",\n \"type\": \"REFUND_TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"receiver\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\"\n },\n \"insert_date\": \"2020-07-01T09:20:17.166Z\",\n \"expire_date\": \"2020-07-01T11:20:17.163Z\",\n \"flow\": \"CHARGE\"\n}"
'400':
description: 400 Bad Request
content:
application/json:
schema:
type: object
properties:
code:
type: string
description: The specific system error code.
`21`
Insufficient availability.
`36`
Malformed flow, payment or metadata.
`131`
Payment too old to be refunded.
It is possible to refund payments within the past 365 days from creation.
`27`
Payment not allowed.
Consumer or shop are currently not able to pay/receive payments.
Please note that this condition could be temporary.
`172`
Pre authorized payments token is not valid.
`246`
The HOTP token is not valid.
message:
type: string
description: The error message.
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
examples:
response:
value: "{\n \"code\": 21,\n \"wlt\": \"FnT15Fhr\"\n}"
'401':
description: 401 Unauthorized
content:
application/json:
schema:
type: object
properties:
code:
type: string
description: The specific system error code.
`34`
Merchant not found or unauthorized.
message:
type: string
description: The error message.
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
examples:
response:
value: "{\n \"code\": 34,\n \"message\": \"...\",\n \"wlt\": \"PyL36Ehs\"\n}"
'403':
description: 403 Forbidden or invalid authorization header
content:
application/json:
schema:
type: object
properties:
code:
type: string
description: The specific system error code.
`45`
Unable to fulfill the request.
`70`
Anti-hammering violation.
message:
type: string
description: The error message.
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
examples:
response:
value: "{\n \"code\": 45,\n \"message\": \"...\",\n \"wlt\": \"GsM82Btk\"\n}"
x-readme:
headers:
- key: Content-Type
value: application/json
- key: Host
value: authservices.satispay.com
- key: Date
value: Fri, 01 Jul 2020 09:18:17 +0200
- key: Digest
value: SHA-256=…the request digest
- key: Authorization
value: Signature keyId="4ekqhmf…", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="C5yynRx…"
explorer-enabled: true
samples-languages:
- shell
- php
code-samples:
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"MATCH_CODE\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"external_code\": \"my_order_id\",\n \"callback_url\": \"https://example.com/satispay-callback?payment_id={uuid}\",\n \"redirect_url\": \"https://example.com/satispay-redirect?order_id=my_order_id\", \n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n }\n }'\n"
name: MATCH_CODE
correspondingExample: OK - MATCH_CODE
- language: php
code: " 'MATCH_CODE',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'external_code' => 'my_order_id',\n 'callback_url' => 'https://example.com/satispay-callback?payment_id={uuid}',\n 'redirect_url' => 'https://example.com/satispay-redirect?order_id=my_order_id', \n 'metadata' => [\n 'order_id' => 'my_order_id',\n 'user_id' => 'my_user_id',\n 'payment_id' => 'my_payment_id',\n 'session_id' => 'my_session_id',\n 'key' => 'value'\n ]\n]);\n"
name: MATCH_CODE
correspondingExample: OK - MATCH_CODE
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"HOTP_AUTH\",\n \"token\": \"88978279029358-266346\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"external_code\": \"my_order_id\",\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n } \n }'\n"
name: HOTP_AUTH
correspondingExample: OK - HOTP_AUTH
- language: php
code: " 'HOTP_AUTH',\n 'token' => '88978279029358-266346',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'external_code' => 'my_order_id',\n 'metadata' => [\n 'order_id' => 'my_order_id',\n 'user_id' => 'my_user_id',\n 'payment_id' => 'my_payment_id',\n 'session_id' => 'my_session_id',\n 'key' => 'value'\n ]\n]);\n"
name: HOTP_AUTH
correspondingExample: OK - HOTP_AUTH
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"MATCH_USER\",\n \"consumer_uid\": \"1ed62785-4c8d-46c3-8673-5f5d16ca9f67\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"external_code\": \"my_order_id\",\n \"callback_url\": \"https://example.com/satispay-callback?payment_id={uuid}\",\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n }\n }'\n"
name: MATCH_USER
correspondingExample: OK - MATCH_USER
- language: php
code: " 'MATCH_USER',\n 'consumer_uid' => '1ed62785-4c8d-46c3-8673-5f5d16ca9f67',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'external_code' => 'my_order_id',\n 'callback_url' => 'https://example.com/satispay-callback?payment_id={uuid}',\n 'metadata' => [\n 'order_id' => 'my_order_id',\n 'user_id' => 'my_user_id',\n 'payment_id' => 'my_payment_id',\n 'session_id' => 'my_session_id',\n 'key' => 'value'\n ]\n]);\n"
name: MATCH_USER
correspondingExample: OK - MATCH_USER
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"FUND_LOCK\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"external_code\": \"my_order_id\",\n \"callback_url\": \"https://example.com/satispay-callback?payment_id={uuid}\",\n \"redirect_url\": \"https://example.com/satispay-redirect?order_id=my_order_id\",\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n }\n }'\n"
name: FUND_LOCK
correspondingExample: OK - FUND_LOCK
- language: php
code: " 'FUND_LOCK',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'external_code' => 'my_order_id',\n 'callback_url' => 'https://example.com/satispay-callback?payment_id={uuid}',\n 'redirect_url' => 'https://example.com/satispay-redirect?order_id=my_order_id',\n 'metadata' => [\n 'order_id' => 'my_order_id',\n 'user_id' => 'my_user_id',\n 'payment_id' => 'my_payment_id',\n 'session_id' => 'my_session_id',\n 'key' => 'value'\n ]\n]);\n"
name: FUND_LOCK
correspondingExample: OK - FUND_LOCK
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"PRE_AUTHORIZED\",\n \"token\": \"1b336659-5463-46e6-b89d-50625c1de05e\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"external_code\": \"my_order_id\",\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n }\n }'\n"
name: PRE_AUTHORIZED
correspondingExample: OK - PRE_AUTHORIZED
- language: php
code: " 'PRE_AUTHORIZED',\n 'token' => '6d508316-24d0-4f5c-83f0-49c94bb99847',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'external_code' => 'my_order_id',\n 'metadata' => [\n 'order_id' => 'my_order_id',\n 'user_id' => 'my_user_id',\n 'payment_id' => 'my_payment_id',\n 'session_id' => 'my_session_id',\n 'key' => 'value'\n ]\n]);\n"
name: PRE_AUTHORIZED
correspondingExample: OK - PRE_AUTHORIZED
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"PRE_AUTHORIZED_FUND_LOCK\",\n \"token\": \"1b336659-5463-46e6-b89d-50625c1de05e\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"external_code\": \"my_order_id\",\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n }\n }'\n"
name: PRE_AUTHORIZED_FUND_LOCK
correspondingExample: OK - PRE_AUTHORIZED_FUND_LOCK
- language: php
code: " 'PRE_AUTHORIZED_FUND_LOCK',\n 'token' => '6d508316-24d0-4f5c-83f0-49c94bb99847',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'external_code' => 'my_order_id',\n 'callback_url' => 'https://example.com/satispay-callback?payment_id={uuid}',\n 'metadata' => [\n 'order_id' => 'my_order_id',\n 'user_id' => 'my_user_id',\n 'payment_id' => 'my_payment_id',\n 'session_id' => 'my_session_id',\n 'key' => 'value'\n ]\n]);\n"
name: PRE_AUTHORIZED_FUND_LOCK
correspondingExample: OK - PRE_AUTHORIZED_FUND_LOCK
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"REFUND\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"parent_payment_uid\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"external_code\": \"my_order_id\"\n }'\n"
name: REFUND
correspondingExample: OK - REFUND
- language: php
code: " 'REFUND',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'parent_payment_uid' => '2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb',\n 'external_code' => 'my_order_id'\n]);\n"
name: REFUND
correspondingExample: OK - REFUND
tags:
- Payments
get:
summary: Get shop payments
operationId: get-list-of-payments
parameters:
- in: header
name: Host
description: The host declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Date
description: The date declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Digest
description: The digest declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Authorization
description: The request [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: x-satispay-deviceinfo
description: The device information (e.g., hostname).
required: false
schema:
type: string
- in: header
name: x-satispay-devicetype
description: The device type.
required: false
schema:
type: string
enum:
- SMARTPHONE
- TABLET
- CASH REGISTER
- POS
- PC
- ECOMMERCE_PLUGIN
- in: header
name: x-satispay-os
description: The Operating System name (e.g., Windows).
required: false
schema:
type: string
- in: header
name: x-satispay-osv
description: The Operating System version (e.g., 10).
required: false
schema:
type: string
- in: header
name: x-satispay-apph
description: The software house name (e.g., Satispay).
required: false
schema:
type: string
- in: header
name: x-satispay-appn
description: The software name (e.g., My awesome app).
required: false
schema:
type: string
- in: header
name: x-satispay-appv
description: The software version (e.g., v2.0.0).
required: false
schema:
type: string
- in: header
name: x-satispay-tracking-code
description: The tracking code used by Satispay commercial partners.
Use this code only if explicitly required by Satispay.
required: false
schema:
type: string
- in: query
name: status
description: Filter by the payment status.
`ACCEPTED`
Shows all the payments in `ACCEPTED` status.
`PENDING`
Shows all the payments in `PENDING` status.
`CANCELED`
Shows all the payments in `CANCELED` status.
Defaults to `ACCEPTED` if not specified.
required: false
schema:
type: string
enum:
- ACCEPTED
- PENDING
- CANCELED
default: ACCEPTED
- in: query
name: limit
description: Set a limit on the number of returned payments in the response.
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 20
- in: query
name: starting_after
description: The ID of the last payment from the previous page.
Used to retrieve the next set of payments in the list.
required: false
schema:
type: string
- in: query
name: starting_after_timestamp
description: The timestamp in milliseconds from which to start listing payments.
Used to retrieve payments created after the specified timestamp.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
has_more:
type: boolean
description: Indicates whether there are additional items available beyond the current list.
data:
type: array
items:
type: object
properties:
id:
type: string
description: The unique payment id.
This can be used for every eventual subsequent operations on the payment, including refunds.
code_identifier:
type: string
description: The Satispay code identifier.
This string can be encoded in a QR code that can be scanned by the user.
This property is only available in `MATCH_CODE` flow payments.
type:
type: string
description: The current payment type.
`TO_BUSINESS`
This type is used for payments from a consumer to a merchant.
`REFUND_TO_BUSINESS`
This type is used for payments from a merchant to a consumer (e.g. refunds).
amount_unit:
type: integer
description: The payment amount in cents.
For example, the amount `€12.40` is being represented as `1240` cents.
currency:
type: string
description: The payment currency.
enum:
- EUR
status:
type: string
description: 'The current payment status.
This will depend on the request query param `status`.
`PENDING`
The payment is created and awaits user interaction, such as scanning the QR code.
`ACCEPTED`
The payment has been accepted and succesfully executed.
`CANCELED`
The payment has been canceled, this could happen if:
- the consumer''s explicitely declines it in the Satispay app.
- the merchant cancels it via the [Update payment API](ref:-payment) with a `CANCEL` action.
- the payment reaches the `expiration_date` while in a `PENDING` or `AUTHORIZED` status.'
expired:
type: boolean
description: The current payment expiration status.
It becomes `true` once it reaches the `expiration_date` without being accepted or canceled.
metadata:
type: object
description: The additional metadata for the payment.
additionalProperties: true
sender:
type: object
description: The sender payment actor.
properties:
id:
type: string
description: The unique sender id.
This will only be available once the payment will be matched with a consumer.
type:
type: string
description: The sender type.
`CONSUMER`
This sender type is used when the payment goes from a consumer to a merchant.
`SHOP`
This sender type is used when the payment goes from a merchant to a consumer (e.g. refunds payments).
name:
type: string
description: The sender name.
This will only be available once the payment will be matched with a consumer.
receiver:
type: object
description: The receiver payment actor.
properties:
id:
type: string
description: The unique receiver id.
type:
type: string
description: The receiver type.
`CONSUMER`
This receiver type is used when the payment goes from a merchant to a consumer.
`SHOP`
This receiver type is used when the payment goes from a consumer to a merchant (e.g. refunds payments).
daily_closure:
type: object
properties:
id:
type: string
description: The [daily closure](ref:retrieve-daily-closure) id.
date:
type: string
description: The [daily closure](ref:retrieve-daily-closure) date.
description: This property is available only for `ACCEPTED` payments and with type `TO_BUSINESS`.
insert_date:
type: string
description: The UTC payment creation datetime.
expire_date:
type: string
description: The UTC payment expiration datetime.
examples:
OK - PENDING:
value: "{\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\"\n },\n {\n \"id\": \"474e916c-09fb-47e3-b08e-2a96b904ed63\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"a91234b1-cd01-4c40-a72c-344843e414f7\",\n \"type\": \"CONSUMER\",\n \"name\": \"Francesco C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"a2f4e79c-8d71-4ca0-af9a-1d30990e8519\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"8dab5311-719f-4dd2-bde3-570586dd4e60\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"bb1f97d4-56f0-48e6-8e30-4599647490fb\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:36.180Z\",\n \"expire_date\": \"2020-07-01T11:18:36.173Z\"\n }\n ]\n}"
OK - ACCEPTED:
value: "{\n \"has_more\": true,\n \"data\": [\n {\n \"id\": \"f71e3828-991e-4395-af11-bd1e1b1b00a7\",\n \"type\": \"REFUND_TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"receiver\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"insert_date\": \"2020-07-01T09:24:10.140Z\",\n \"expire_date\": \"2020-07-01T11:24:10.136Z\"\n },\n {\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"status_ownership\": false,\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"daily_closure\": {\n \"id\": \"20200701\",\n \"date\": \"2020-07-01T00:00:00.000Z\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\"\n }\n ]\n}"
OK - CANCELED:
value: "{\n \"has_more\": true,\n \"data\": [\n {\n \"id\": \"474e916c-09fb-47e3-b08e-2a96b904ed63\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"CANCELED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"a91234b1-cd01-4c40-a72c-344843e414f7\",\n \"type\": \"CONSUMER\",\n \"name\": \"Francesco C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"a2f4e79c-8d71-4ca0-af9a-1d30990e8519\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"8dab5311-719f-4dd2-bde3-570586dd4e60\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"bb1f97d4-56f0-48e6-8e30-4599647490fb\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:36.180Z\",\n \"expire_date\": \"2020-07-01T11:18:36.173Z\"\n }\n ]\n}"
'400':
description: 400 Bad Request
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`36`
Invalid query parament status.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 34,\n \"message\": \"...\",\n \"wlt\": \"JwL56Vpr\"\n}"
'401':
description: 401 Unauthorized
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`34`
Merchant not found or unauthorized.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 34,\n \"message\": \"...\",\n \"wlt\": \"JwL56Vpr\"\n}"
'403':
description: 403 Forbidden or invalid authorization header
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`45`
Unable to fulfill the request.
`70`
Anti-hammering violation.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 45,\n \"message\": \"...\",\n \"wlt\": \"TpD93Mvx\"\n}"
x-readme:
headers:
- key: Content-Type
value: application/json
- key: Host
value: authservices.satispay.com
- key: Date
value: Fri, 01 Jul 2020 09:18:17 +0200
- key: Digest
value: SHA-256=…the request digest
- key: Authorization
value: Signature keyId="4ekqhmf…", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="C5yynRx…"
explorer-enabled: true
samples-languages:
- shell
- php
code-samples:
- language: curl
code: "curl --request GET \\\n --url\"https://authservices.satispay.com/g_business/v1/payments?status=PENDING\" \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"'\n"
name: PENDING
correspondingExample: OK - PENDING
- language: php
code: " 'PENDING'\n]);\n"
name: PENDING
correspondingExample: OK - PENDING
- language: curl
code: "curl --request GET \\\n --url \"https://authservices.satispay.com/g_business/v1/payments?status=ACCEPTED\" \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"'\n"
name: ACCEPTED
correspondingExample: OK - ACCEPTED
- language: php
code: " 'ACCEPTED'\n]);\n"
name: ACCEPTED
correspondingExample: OK - ACCEPTED
- language: curl
code: "curl --request GET \\\n --url \"https://authservices.satispay.com/g_business/v1/payments?status=CANCELED\" \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"'\n"
name: CANCELED
correspondingExample: OK - CANCELED
- language: php
code: " 'CANCELED'\n]);\n"
name: CANCELED
correspondingExample: OK - CANCELED
tags:
- Payments
/payments/{id}:
get:
summary: Get payment
operationId: get-the-details-of-a-payment
parameters:
- in: header
name: Host
description: The host declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Date
description: The date declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Digest
description: The digest declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Authorization
description: The request [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: x-satispay-response-wait-time
description: Specifies the duration, in seconds, for which the `HTTP` call will be hanging, waiting for a payment status change.
The maximum allowed value is `60` seconds.
required: false
schema:
type: integer
minimum: 0
maximum: 60
- in: header
name: x-satispay-deviceinfo
description: The device information (e.g., hostname).
required: false
schema:
type: string
- in: header
name: x-satispay-devicetype
description: The device type.
required: false
schema:
type: string
enum:
- SMARTPHONE
- TABLET
- CASH REGISTER
- POS
- PC
- ECOMMERCE_PLUGIN
- in: header
name: x-satispay-os
description: The Operating System name (e.g., Windows).
required: false
schema:
type: string
- in: header
name: x-satispay-osv
description: The Operating System version (e.g., 10).
required: false
schema:
type: string
- in: header
name: x-satispay-apph
description: The software house name (e.g., Satispay).
required: false
schema:
type: string
- in: header
name: x-satispay-appn
description: The software name (e.g., My awesome app).
required: false
schema:
type: string
- in: header
name: x-satispay-appv
description: The software version (e.g., v2.0.0).
required: false
schema:
type: string
- in: header
name: x-satispay-tracking-code
description: The tracking code used by Satispay commercial partners.
Use this code only if explicitly required by Satispay.
required: false
schema:
type: string
- in: path
name: id
description: The payment id to retrieve.
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique payment id.
This can be used for every eventual subsequent operations on the payment, including refunds.
code_identifier:
type: string
description: The Satispay code identifier.
This string can be encoded in a QR code that can be scanned by the user.
This property is only available in `MATCH_CODE` flow payments.
type:
type: string
description: The current payment type.
`TO_BUSINESS`
This type is used for payments from a consumer to a merchant.
`REFUND_TO_BUSINESS`
This type is used for payments from a merchant to a consumer (e.g. refunds).
amount_unit:
type: integer
description: The payment amount in cents.
For example, the amount `€12.40` is being represented as `1240` cents.
currency:
type: string
description: The payment currency.
enum:
- EUR
status:
type: string
description: 'The current payment status.
`PENDING`
The payment is created and awaits user interaction, such as scanning the QR code.
`AUTHORIZED` - for `FUND_LOCK` and `PRE_AUTHORIZED_FUND_LOCK` flows only.
The payment has been authorized by the user and is ready to be confirmed by the merchant with the [Update payment API](doc:update-a-payment).
`ACCEPTED`
The payment has been accepted and succesfully executed.
`CANCELED`
The payment has been canceled, this could happen if:
- the consumer''s explicitely declines it in the Satispay app.
- the merchant cancels it via the [Update payment API](ref:-payment) with a `CANCEL` action.
- the payment reaches the `expiration_date` while in a `PENDING` or `AUTHORIZED` status.'
status_ownership:
type: boolean
deprecated: true
expired:
type: boolean
description: The current payment expiration status.
It becomes `true` once it reaches the `expiration_date` without being accepted or canceled.
metadata:
type: object
description: The additional metadata for the payment.
additionalProperties: true
sender:
type: object
description: The sender payment actor.
properties:
id:
type: string
description: The unique sender id.
This will only be available once the payment will be matched with a consumer.
type:
type: string
description: The sender type.
`CONSUMER`
This sender type is used when the payment goes from a consumer to a merchant.
`SHOP`
This sender type is used when the payment goes from a merchant to a consumer (e.g. refunds payments).
name:
type: string
description: The sender name.
This will only be available once the payment will be matched with a consumer.
receiver:
type: object
description: The receiver payment actor.
properties:
id:
type: string
description: The unique receiver id.
type:
type: string
description: The receiver type.
`CONSUMER`
This receiver type is used when the payment goes from a merchant to a consumer.
`SHOP`
This receiver type is used when the payment goes from a consumer to a merchant (e.g. refunds payments).
insert_date:
type: string
description: The UTC payment creation datetime.
expire_date:
type: string
description: The UTC payment expiration datetime.
description:
type: string
deprecated: true
description: The external_code set during the payment creation request.
Please use the `external_code` field instead.
flow:
type: string
deprecated: true
external_code:
type: string
description: The `external_code` set during the creation request.
redirect_url:
type: string
description: The URL where the user will be redirected after the payment flow from the Satispay app is completed.
This property is available only when the payment uses the `MATCH_CODE`, `MATCH_USER` or `FUND_LOCK` flow.
payment_options:
type: object
description: Type of payment used.
properties:
buy_now_pay_later:
type: object
description: Buy Now Pay Later payment.
properties:
is_buy_now_pay_later:
type: boolean
description: Buy Now Pay Later enabled
examples:
OK - PENDING:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"type\": \"CONSUMER\"\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
OK - ACCEPTED:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"status_ownership\": false,\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"daily_closure\": {\n \"id\": \"20200701\",\n \"date\": \"2020-07-01T00:00:00.000Z\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
OK - ACCEPTED_BUY_NOW_PAY_LATER:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"status_ownership\": false,\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"daily_closure\": {\n \"id\": \"20200701\",\n \"date\": \"2020-07-01T00:00:00.000Z\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\",\n \"payment_options\": {\n \"buy_now_pay_later\": {\n \"is_buy_now_pay_later\": true\n }\n}\n}"
OK - AUTHORIZED:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"AUTHORIZED\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-11T11:18:17.163Z\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
OK - CANCELED:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"CANCELED\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"type\": \"CONSUMER\"\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
'401':
description: 401 Unauthorized
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`34`
Merchant not found or unauthorized.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 34,\n \"message\": \"...\",\n \"wlt\": \"PyL36Ehs\"\n}"
'403':
description: 403 Forbidden or invalid authorization header
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`45`
Unable to fulfill the request.
`70`
Anti-hammering violation.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 45,\n \"message\": \"...\",\n \"wlt\": \"GsM82Btk\"\n}"
'404':
description: 404 Resource not found
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`41`
Resource not found.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 41,\n \"message\": \"Resource not found\",\n \"wlt\": \"bpy0AX3X\"\n}"
x-readme:
headers:
- key: Content-Type
value: application/json
- key: Host
value: authservices.satispay.com
- key: Date
value: Fri, 01 Jul 2020 09:18:17 +0200
- key: Digest
value: SHA-256=…the request digest
- key: Authorization
value: Signature keyId="4ekqhmf…", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="C5yynRx…"
explorer-enabled: true
samples-languages:
- shell
- php
code-samples:
- language: curl
code: "curl --request GET \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"'\n"
name: ''
correspondingExample: OK - ACCEPTED
- language: php
code: '
Use this code only if explicitly required by Satispay.
required: false
schema:
type: string
- in: path
name: id
description: The payment id to update.
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
action:
type: string
description: The action to execute on a specific payment.
`ACCEPT`
This action can be used to accept `PENDING` or `AUTHORIZED` payments.
`CANCEL`
This action can be used to cancel `PENDING` or `AUTHORIZED` payments.
`CANCEL_OR_REFUND`
This action can be used to cancel `PENDING` or `AUTHORIZED` payments.
Or to refund a payment in status `ACCEPTED`.
We suggest to execute this action only if you don't know the actual status of the payment.
For example if you received a timeout or an HTTP `500`.
Depending on the actual status of the payment, you will receive a different outcome and response.
enum:
- ACCEPT
- CANCEL
- CANCEL_OR_REFUND
amount_unit:
type: integer
description: The payment amount that you want to capture in cents.
To represent the amount `€12.40`, you should multiply it by `100`, resulting in `1240` cents.
This property is applicable only for payments in `AUTHORIZED` status.
These payments must be created using either the `FUND_LOCK` or `PRE_AUTHORIZED_FUND_LOCK` flow.
This amount must be equal or smaller than the amount set during the payment creation.
required:
- action
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique payment id.
This can be used for every eventual subsequent operations on the payment, including refunds.
type:
type: string
description: The current payment type.
`TO_BUSINESS`
This type is used for payments from a consumer to a merchant.
`REFUND_TO_BUSINESS`
This type is used for payments from a merchant to a consumer (e.g. refunds).
amount_unit:
type: integer
description: The payment amount in cents.
For example, the amount `€12.40` is being represented as `1240` cents.
currency:
type: string
description: The payment currency.
enum:
- EUR
status:
type: string
description: 'The current payment status.
`ACCEPTED`
The payment has been accepted succesfully.
Beware: if you use the `CANCEL_OR_REFUND` action and you receive back an `ACCEPTED` status, this means that the payment has been successfully refunded.
`CANCELED`
The payment has been correctly canceled.
Beware: if you use the `CANCEL_OR_REFUND` action and you receive back a `CANCELED` status, this means that the payment has been successfully canceled.'
expired:
type: boolean
description: The current payment expiration status.
It becomes `true` once it reaches the `expiration_date` without being accepted or canceled.
metadata:
type: object
description: The additional metadata for the payment.
additionalProperties: true
sender:
type: object
description: The sender payment actor.
properties:
id:
type: string
description: The unique sender id.
This will only be available once the payment will be matched with a consumer.
type:
type: string
description: The sender type.
`CONSUMER`
This sender type is used when the payment goes from a consumer to a merchant.
`SHOP`
This sender type is used when the payment goes from a merchant to a consumer (e.g. refunds payments).
name:
type: string
description: The sender name.
This will only be available once the payment will be matched with a consumer.
receiver:
type: object
description: The receiver payment actor.
properties:
id:
type: string
description: The unique receiver id.
type:
type: string
description: The receiver type.
`CONSUMER`
This receiver type is used when the payment goes from a merchant to a consumer.
`SHOP`
This receiver type is used when the payment goes from a consumer to a merchant (e.g. refunds payments).
insert_date:
type: string
description: The UTC payment creation datetime.
expire_date:
type: string
description: The UTC payment expiration datetime.
examples:
OK - ACCEPT - CHECK-IN:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:20.166Z\",\n \"expire_date\": \"2020-07-01T11:18:20.163Z\"\n}"
OK - CANCEL - CHECK-IN:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"CANCELED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:20:17.166Z\",\n \"expire_date\": \"2020-07-01T11:20:17.163Z\"\n}"
OK - ACCEPT - FUNDS LOCK:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1130,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:20:17.166Z\",\n \"expire_date\": \"2020-07-11T11:20:17.163Z\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
OK - CANCEL - FUNDS LOCK:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"CANCELED\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:20.166Z\",\n \"expire_date\": \"2020-07-11T11:18:20.163Z\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
OK - CANCEL_OR_REFUND - CANCELED:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"CANCELED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:20:17.166Z\",\n \"expire_date\": \"2020-07-01T11:20:17.163Z\"\n}"
OK - CANCEL_OR_REFUND - REFUNDED:
value: "{\n \"id\": \"3ccea4c1-0d5e-430f-9975-0becd9440d41\",\n \"type\": \"REFUND_TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"receiver\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\"\n },\n \"insert_date\": \"2020-07-01T09:20:17.166Z\",\n \"expire_date\": \"2020-07-01T11:20:17.163Z\",\n \"flow\": \"CHARGE\"\n}"
'400':
description: 400 Bad Request
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`36`
Malformed flow, payment or metadata.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"wlt\": \"RhL16Tpe\",\n \"code\": 36,\n \"message\": \"...\"\n}"
'401':
description: 401 Unauthorized
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`34`
Merchant not found or unauthorized.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"wlt\": \"YoR36Cnm\",\n \"code\": 34,\n \"message\": \"...\"\n}"
'403':
description: 403 Forbidden or invalid authorization header
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`44`
Illegal state transition.
This error typically occurs when you attempt to cancel a payment that is already in `CANCELED` status or accept a payment that is already in `ACCEPTED` status.
`45`
Unable to fulfill the request.
`70`
Anti-hammering violation.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"wlt\": \"EaV36Lte\",\n \"code\": 45,\n \"message\": \"...\"\n}"
'404':
description: 404 Resource not found
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`41`
Resource not found.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 41,\n \"message\": \"Resource not found\",\n \"wlt\": \"bpy0AX3X\"\n}"
x-readme:
headers:
- key: Content-Type
value: application/json
- key: Host
value: authservices.satispay.com
- key: Date
value: Fri, 01 Jul 2020 09:18:17 +0200
- key: Digest
value: SHA-256=…the request digest
- key: Authorization
value: Signature keyId="4ekqhmf…", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="C5yynRx…"
explorer-enabled: true
samples-languages:
- shell
- php
code-samples:
- language: curl
code: "curl --request PUT \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"action\": \"ACCEPT\"\n }'\n"
name: ACCEPT - CHECK-IN
correspondingExample: OK - ACCEPT - CHECK-IN
- language: php
code: " 'ACCEPT'\n ]\n);\n"
name: ACCEPT - CHECK-IN
correspondingExample: OK - ACCEPT - CHECK-IN
- language: curl
code: "curl --request PUT \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"action\": \"ACCEPT\",\n \"amount_unit\": 1130\n }'\n"
name: ACCEPT - FUNDS LOCK
correspondingExample: OK - ACCEPT - FUNDS LOCK
- language: php
code: " 'ACCEPT',\n 'amount_unit' => 1130\n ]\n);\n"
name: ACCEPT - FUNDS LOCK
correspondingExample: OK - ACCEPT - FUNDS LOCK
- language: curl
code: "curl --request PUT \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"action\": \"CANCEL\"\n }'\n"
name: CANCEL
correspondingExample: OK - CANCEL - CHECK-IN
- language: php
code: " 'CANCEL'\n ]\n);\n"
name: CANCEL
correspondingExample: OK - CANCEL - CHECK-IN
- language: curl
code: "curl --request PUT \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"action\": \"CANCEL_OR_REFUND\"\n }'\n"
name: CANCEL_OR_REFUND
correspondingExample: OK - CANCEL_OR_REFUND - CANCELED
- language: php
code: " 'CANCEL_OR_REFUND'\n ]\n);\n"
name: CANCEL_OR_REFUND
correspondingExample: OK - CANCEL_OR_REFUND - CANCELED
tags:
- Payments
'/payments ':
post:
summary: Create payment
operationId: mv-create-payment
parameters:
- in: header
name: Content-Type
description: Always send this header as `application/json`.
required: true
schema:
type: string
- in: header
name: Host
description: The host declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Date
description: The date declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Digest
description: The digest declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Authorization
description: The request [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Idempotency-Key
description: The idempotent request key.
You can read more [here](ref:idempotency).
required: false
schema:
type: string
- in: header
name: x-satispay-deviceinfo
description: The device information (e.g., hostname).
required: false
schema:
type: string
- in: header
name: x-satispay-devicetype
description: The device type.
required: false
schema:
type: string
enum:
- SMARTPHONE
- TABLET
- CASH REGISTER
- POS
- PC
- ECOMMERCE_PLUGIN
- in: header
name: x-satispay-os
description: The Operating System name (e.g., Windows).
required: false
schema:
type: string
- in: header
name: x-satispay-osv
description: The Operating System version (e.g., 10).
required: false
schema:
type: string
- in: header
name: x-satispay-apph
description: The software house name (e.g., Satispay).
required: false
schema:
type: string
- in: header
name: x-satispay-appn
description: The software name (e.g., My awesome app).
required: false
schema:
type: string
- in: header
name: x-satispay-appv
description: The software version (e.g., v2.0.0).
required: false
schema:
type: string
- in: header
name: x-satispay-tracking-code
description: The tracking code used by Satispay commercial partners.
Use this code only if explicitly required by Satispay.
required: false
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
flow:
type: string
description: 'The payment flows that you can use with Meal Vouchers are:
`MATCH_CODE` [DOC](doc:one-off)
This flow can be used generically for one-off payments.
`HOTP_AUTH` [DOC](doc:one-off-hotp)
This flow can be used to perform one-off payments via HOTP tokens.
To use this flow you must also include the `token` parameter.
`MATCH_USER` [DOC](doc:payment-mobile-number)
This flow can be used for one-off payments on a specific user.
To use this flow you must also include the `consumer_uid` parameter.
`REFUND` [DOC](ref:refund)
This flow can be used for refunds on a specific payment.
To use this flow you must also include the `parent_payment_uid` and the `amount_unit`.'
enum:
- MATCH_CODE
- HOTP_AUTH
- MATCH_USER
- REFUND
amount_unit:
type: integer
description: The payment amount in cents.
For example, to represent the amount `€12.40`, you should multiply it by `100`, resulting in `1240` cents.
currency:
type: string
description: The payment currency.
Currently `EUR` is the only currency supported.
default: EUR
payment_method_options:
type: object
properties:
meal_voucher:
type: object
description: The veal vouchers settings object.
properties:
enable:
type: boolean
default: true
description: Enable or disable Meal Vouchers for this payment.
If you don't specify this parameter, and if your shop has Meal Vouchers enabled, by default it will be `true`.
max_amount_unit:
type: integer
description: The maximum amount payable with Meal Vouchers in cents.
This parameter is applicable when a customer purchases both food and non-food items. For instance, while the total grocery bill may amount to `€15.00`, the specific cost for food items might be of just `€6.50`.
To represent the amount `€6.50`, you should multiply it by `100`, resulting in `650` cents.
max_number:
type: integer
default: 8
description: The maximum number of Meal Vouchers usable for this payment.
By default this parameter is set to `8`, in compliance with Italian law.
This parameter is applicable when a customer intends to make a payment using multiple meal voucher brands. For instance, the customer might use `3` Meal Vouchers from other brands and `5` Meal Vouchers from Satispay, resulting in a total of `8` Meal Vouchers. In the example above, the `max_number` parameter should be set to `5`, since `3` Meal Vouchers are from another brand.
payment_options:
type: object
properties:
partial_payment:
type: boolean
default: false
description: Enable or disable partial payments.
When partial payment is enabled, customers have the flexibility to pay a portion of the total amount using Meal Vouchers, without the need to use e-money funds from the Satispay wallet.
Customers can decide to use alternative payment methods to cover the remaining amount.
If this property is set to `true`, the `amount_unit` response property could change when the payment transitions to `ACCEPTED` status.
For example, the payment could be created at `12,40€`, but the consumer availability could just be of `8,00€` of Meal Vouchers.
In this case, the `amount_unit` response property will be of `800` cents corresponding in `8,00€`.
When partial payment is disabled, customers are required to pay the entire amount using Satispay, using a combination of both Meal Vouchers and e-money funds from their Satispay wallet.
In this case, if the customer has insufficient funds, the transaction will not be successful.
token:
type: string
description: The token required to charge the consumer wallet.
It can be an HOTP token.
Required with `HOTP_AUTH` flow only.
consumer_uid:
type: string
description: The unique id of the consumer required for payment acceptance.
To obtain the customer id, please use the [Get Consumer API](ref:retrive-consumer).
Required with `MATCH_USER` flow only.
This parameter is deprecated; we suggest avoiding the `MATCH_USER` UX unless absolutely necessary.
deprecated: true
parent_payment_uid:
type: string
description: The id of the payment that you want to refund.
Required with `REFUND` flow only.
external_code:
type: string
description: The external order id or payment identifier.
We highly recommend to use this field by populating it with your internal order id.
This string will be included in your reports for reconciliation and shown to the Satispay consumer in-app.
This field has a maximum length of 50 characters, including spaces.
callback_url:
type: string
description: The URL to be triggered via an HTTP GET request when there is a change in payment status.
When the given `callback_url` is invoked, a GET request for payment details can be made to retrieve the updated payment status.
Please note that `{uuid}` will be replaced with the generated payment id.
e.g. `https://example.com/satispay-callback?payment_id={uuid}`
You can read more [here](ref:callback-s2s).
redirect_url:
type: string
description: This field specifies the URL where the user will be redirected after the payment flow from the Satispay app is completed.
For instance, you can set this URL to ensure users are redirected to that specific page upon successful payment completion.
e.g. `https://example.com/payment-redirect?order_id=your_order_id`
Please note that this field doesn't support any placeholder.
metadata:
type: object
description: The additional metadata for the payment.
This field supports up to 20 key-value pairs, with keys limited to 45 characters and values limited to 500 characters each.
additionalProperties: true
properties:
phone_number:
type: string
description: This special metadata can be used to pre-fill the phone number field available if you're using a web-redirect flow.
The phone number must contain the prefix an shouldn't have any additional space.
e.g. `+393891122333`
expiration_date:
type: string
description: The UTC payment expiration datetime.
The format should be `ISO 8601` like this `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
By default `MATCH_CODE` and `MATCH_USER` payments are valid for 2 hours.
This parameter cannot be used with `HOTP_AUTH` and `REFUND` flows.
required:
- flow
- amount_unit
- currency
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique payment id.
This can be used for every eventual subsequent operations on the payment, including refunds.
code_identifier:
type: string
description: The Satispay code identifier.
This string can be encoded in a QR code that can be scanned by the user.
This property is only available in `MATCH_CODE` flow payments.
type:
type: string
description: The current payment type.
`TO_BUSINESS`
This type is used for payments from a consumer to a merchant.
`REFUND_TO_BUSINESS`
This type is used for payments from a merchant to a consumer (e.g. refunds).
amount_unit:
type: integer
description: The payment amount in cents.
For example, the amount `€12.40` is being represented as `1240` cents.
When using the parameter `payment_options.partial_payment` = `true`
this final amount could change when the payment will transition to `ACCEPTED` status.
currency:
type: string
description: The payment currency.
enum:
- EUR
status:
type: string
description: The current payment status.
`PENDING`
The payment is created and awaits user interaction, such as scanning the QR code.
`ACCEPTED`
The payment has been accepted and succesfully executed.
This status, during payment creation, is only available in Meal Voucher payments with the `HOTP_AUTH` flow.
expired:
type: boolean
description: The current payment expiration status.
It becomes `true` once it reaches the `expiration_date` without being accepted or canceled.
metadata:
type: object
description: The additional metadata for the payment.
additionalProperties: true
sender:
type: object
description: The sender payment actor.
properties:
id:
type: string
description: The unique sender id.
This will only be available once the payment will be matched with a consumer.
type:
type: string
description: The sender type.
`CONSUMER`
This sender type is used when the payment goes from a consumer to a merchant.
`SHOP`
This sender type is used when the payment goes from a merchant to a consumer (e.g. refunds payments).
name:
type: string
description: The sender name.
This will only be available once the payment will be matched with a consumer.
receiver:
type: object
description: The receiver payment actor.
properties:
id:
type: string
description: The unique receiver id.
type:
type: string
description: The receiver type.
`CONSUMER`
This receiver type is used when the payment goes from a merchant to a consumer.
`SHOP`
This receiver type is used when the payment goes from a consumer to a merchant (e.g. refunds payments).
insert_date:
type: string
description: The UTC payment creation datetime.
expire_date:
type: string
description: The UTC payment expiration datetime.
This property can be ignored when using `PRE_AUTHORIZED` or `HOTP_AUTH` flows.
description:
type: string
deprecated: true
description: The external_code set during the payment creation request.
Please use the `external_code` field instead.
flow:
type: string
deprecated: true
external_code:
type: string
description: The `external_code` set during the creation request.
redirect_url:
type: string
description: The URL where to redirect the user to begin the Satispay payment flow.
This property is available only when the payment uses the `MATCH_CODE` flow.
payment_method:
type: object
properties:
meal_voucher:
type: object
description: 'The Meal Voucher payment part.
This property is available in payment creation only when:
- the payment uses the `HOTP_AUTH` flow.
- the payment contains Meal Vouchers in it.'
properties:
amount_unit:
type: integer
description: The total amount of Meal Vouchers in this payment, in cents.
For example, the amount `€8.00` is being represented as `800` cents.
number:
type: integer
description: The total number of Meal Vouchers in this payment.
As per italian law, it can't be higher than `8` Meal Vouchers per payment.
examples:
OK - MATCH_CODE:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"type\": \"CONSUMER\"\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2023-06-06T10:15:06.473Z\",\n \"expire_date\": \"2023-06-06T12:15:06.468Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
OK - HOTP_AUTH:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"0360925d-0c20-4437-9e0f-8a8edeacd2ed\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T12:18:17.166Z\",\n \"expire_date\": \"2020-08-01T12:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"external_code\": \"my_order_id\",\n \"payment_method\": {\n \"meal_voucher\": {\n \"amount_unit\": 800,\n \"number\": 1\n }\n }\n}"
OK - MATCH_USER:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"1ed62785-4c8d-46c3-8673-5f5d16ca9f67\",\n \"type\": \"CONSUMER\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": []\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}\n"
'400':
description: 400 Bad Request
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`21`
Insufficient availability.
`36`
Malformed flow, payment or metadata.
`131`
Payment too old to be refunded.
It is only possible to refund Meal Voucher payments by the end of the day of their creation.
`27`
Payment not allowed.
Consumer or shop are currently not able to pay/receive payments.
Please note that this condition could be temporary.
`246`
The HOTP token is not valid.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 21,\n \"wlt\": \"FnT15Fhr\"\n}"
'401':
description: 401 Unauthorized
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`34`
Merchant not found or unauthorized.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 34,\n \"message\": \"...\",\n \"wlt\": \"PyL36Ehs\"\n}"
'403':
description: 403 Forbidden or invalid authorization header
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`45`
Unable to fulfill the request.
`70`
Anti-hammering violation.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 45,\n \"message\": \"...\",\n \"wlt\": \"GsM82Btk\"\n}"
x-readme:
headers:
- key: Content-Type
value: application/json
- key: Host
value: authservices.satispay.com
- key: Date
value: Fri, 01 Jul 2020 09:18:17 +0200
- key: Digest
value: SHA-256=…the request digest
- key: Authorization
value: Signature keyId="4ekqhmf…", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="C5yynRx…"
explorer-enabled: true
samples-languages:
- shell
- php
code-samples:
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"MATCH_CODE\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"payment_method_options\": {\n \"meal_voucher\": {\n \"enable\": true,\n \"max_amount_unit\": 800,\n \"max_number\": 1\n }\n },\n \"payment_options\": {\n \"partial_payment\": true\n },\n \"external_code\": \"my_order_id\",\n \"callback_url\": \"https://example.com/satispay-callback?payment_id={uuid}\",\n \"redirect_url\": \"https://example.com/satispay-redirect?order_id=my_order_id\", \n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n }\n }'\n"
name: MATCH_CODE
correspondingExample: OK - MATCH_CODE
- language: php
code: " 'MATCH_CODE',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'payment_method_options' => [\n 'meal_voucher' => [\n 'enable' => true,\n 'max_amount_unit' => 800,\n 'max_number' => 1\n ]\n ],\n 'payment_options' => [\n 'partial_payment' => true\n ],\n 'external_code' => 'my_order_id',\n 'callback_url' => 'https://example.com/satispay-callback?payment_id={uuid}',\n 'redirect_url' => 'https://example.com/satispay-redirect?order_id=my_order_id', \n 'metadata' => [\n 'order_id' => 'my_order_id',\n 'user_id' => 'my_user_id',\n 'payment_id' => 'my_payment_id',\n 'session_id' => 'my_session_id',\n 'key' => 'value'\n ]\n]);\n"
name: MATCH_CODE
correspondingExample: OK - MATCH_CODE
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"MATCH_USER\",\n \"consumer_uid\": \"1ed62785-4c8d-46c3-8673-5f5d16ca9f67\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"payment_method_options\": {\n \"meal_voucher\": {\n \"enable\": true,\n \"max_amount_unit\": 800,\n \"max_number\": 1\n }\n },\n \"payment_options\": {\n \"partial_payment\": true\n },\n \"external_code\": \"my_order_id\",\n \"callback_url\": \"https://example.com/satispay-callback?payment_id={uuid}\",\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n }\n }'\n"
name: MATCH_USER
correspondingExample: OK - MATCH_USER
- language: php
code: " 'MATCH_USER',\n 'consumer_uid' => '1ed62785-4c8d-46c3-8673-5f5d16ca9f67',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'payment_method_options' => [\n 'meal_voucher' => [\n 'enable' => true,\n 'max_amount_unit' => 800,\n 'max_number' => 1\n ]\n ],\n 'payment_options' => [\n 'partial_payment' => false\n ],\n 'external_code' => 'my_order_id',\n 'callback_url' => 'https://example.com/satispay-callback?payment_id={uuid}',\n 'metadata' => [\n 'order_id' => 'my_order_id',\n 'user_id' => 'my_user_id',\n 'payment_id' => 'my_payment_id',\n 'session_id' => 'my_session_id',\n 'key' => 'value'\n ]\n]);\n"
name: MATCH_USER
correspondingExample: OK - MATCH_USER
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"HOTP_AUTH\",\n \"token\": \"88978279029358-266346\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"payment_method_options\": {\n \"meal_voucher\": {\n \"enable\": true,\n \"max_amount_unit\": 800,\n \"max_number\": 1\n }\n },\n \"payment_options\": {\n \"partial_payment\": true\n },\n \"external_code\": \"my_order_id\",\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n } \n }'\n"
name: HOTP_AUTH
correspondingExample: OK - HOTP_AUTH
- language: php
code: " 'HOTP_AUTH',\n 'token' => '88978279029358-266346',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'payment_method_options' => [\n 'meal_voucher' => [\n 'enable' => true,\n 'max_amount_unit' => 800,\n 'max_number' => 1\n ]\n ],\n 'payment_options' => [\n 'partial_payment' => true\n ],\n 'external_code' => 'my_order_id',\n 'metadata' => [\n 'order_id' => 'my_order_id',\n 'user_id' => 'my_user_id',\n 'payment_id' => 'my_payment_id',\n 'session_id' => 'my_session_id',\n 'key' => 'value'\n ]\n]);\n"
name: HOTP_AUTH
correspondingExample: OK - HOTP_AUTH
tags:
- Payments
'/payments/{id} ':
get:
summary: Get payment
operationId: mv-get-payment-details
parameters:
- in: header
name: Host
description: The host declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Date
description: The date declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Digest
description: The digest declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Authorization
description: The request [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: x-satispay-response-wait-time
description: Specifies the duration, in seconds, for which the `HTTP` call will be hanging, waiting for a payment status change.
The maximum allowed value is `60` seconds.
required: false
schema:
type: integer
minimum: 0
maximum: 60
- in: header
name: x-satispay-deviceinfo
description: The device information (e.g., hostname).
required: false
schema:
type: string
- in: header
name: x-satispay-devicetype
description: The device type.
required: false
schema:
type: string
enum:
- SMARTPHONE
- TABLET
- CASH REGISTER
- POS
- PC
- ECOMMERCE_PLUGIN
- in: header
name: x-satispay-os
description: The Operating System name (e.g., Windows).
required: false
schema:
type: string
- in: header
name: x-satispay-osv
description: The Operating System version (e.g., 10).
required: false
schema:
type: string
- in: header
name: x-satispay-apph
description: The software house name (e.g., Satispay).
required: false
schema:
type: string
- in: header
name: x-satispay-appn
description: The software name (e.g., My awesome app).
required: false
schema:
type: string
- in: header
name: x-satispay-appv
description: The software version (e.g., v2.0.0).
required: false
schema:
type: string
- in: header
name: x-satispay-tracking-code
description: The tracking code used by Satispay commercial partners.
Use this code only if explicitly required by Satispay.
required: false
schema:
type: string
- in: path
name: id
description: The payment id to retrieve.
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique payment id.
This can be used for every eventual subsequent operations on the payment, including refunds.
code_identifier:
type: string
description: The Satispay code identifier.
This string can be encoded in a QR code that can be scanned by the user.
This property is only available in `MATCH_CODE` flow payments.
type:
type: string
description: The current payment type.
`TO_BUSINESS`
This type is used for payments from a consumer to a merchant.
`REFUND_TO_BUSINESS`
This type is used for payments from a merchant to a consumer (e.g. refunds).
amount_unit:
type: integer
description: The payment amount in cents.
For example, the amount `€12.40` is being represented as `1240` cents.
When using the parameter `payment_options.partial_payment` = `true`
this final amount could change when the payment will transition to `ACCEPTED` status.
currency:
type: string
description: The payment currency.
enum:
- EUR
status:
type: string
description: 'The current payment status.
`PENDING`
The payment is created and awaits user interaction, such as scanning the QR code.
`ACCEPTED`
The payment has been accepted and succesfully executed.
`CANCELED`
The payment has been canceled, this could happen if:
- the consumer''s explicitely declines it in the Satispay app.
- the merchant cancels it via the [Update payment API](ref:mv-update-payment) with a `CANCEL` action.
- the payment reaches the `expiration_date` while in a `PENDING` status.'
status_ownership:
type: boolean
deprecated: true
expired:
type: boolean
description: The current payment expiration status.
It becomes `true` once it reaches the `expiration_date` without being accepted or canceled.
metadata:
type: object
description: The additional metadata for the payment.
additionalProperties: true
sender:
type: object
description: The sender payment actor.
properties:
id:
type: string
description: The unique sender id.
This will only be available once the payment will be matched with a consumer.
type:
type: string
description: The sender type.
`CONSUMER`
This sender type is used when the payment goes from a consumer to a merchant.
`SHOP`
This sender type is used when the payment goes from a merchant to a consumer (e.g. refunds payments).
name:
type: string
description: The sender name.
This will only be available once the payment will be matched with a consumer.
receiver:
type: object
description: The receiver payment actor.
properties:
id:
type: string
description: The unique receiver id.
type:
type: string
description: The receiver type.
`CONSUMER`
This receiver type is used when the payment goes from a merchant to a consumer.
`SHOP`
This receiver type is used when the payment goes from a consumer to a merchant (e.g. refunds payments).
insert_date:
type: string
description: The UTC payment creation datetime.
expire_date:
type: string
description: The UTC payment expiration datetime.
description:
type: string
deprecated: true
description: The external_code set during the payment creation request.
Please use the `external_code` field instead.
flow:
type: string
deprecated: true
external_code:
type: string
description: The `external_code` set during the creation request.
redirect_url:
type: string
description: The URL where to redirect the user to begin the Satispay payment flow.
This property is available only when the payment uses the `MATCH_CODE` flow.
payment_method:
type: object
properties:
meal_voucher:
type: object
description: 'The Meal Voucher payment part.
This property is available only when:
- the payment is `ACCEPTED`.
- the payment contains Meal Vouchers in it.'
properties:
amount_unit:
type: integer
description: The total amount of Meal Vouchers in this payment, in cents.
For example, the amount `€8.00` is being represented as `800` cents.
number:
type: integer
description: The total number of Meal Vouchers in this payment.
As per italian law, it can't be higher than `8` Meal Vouchers per payment.
examples:
OK - PENDING:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"type\": \"CONSUMER\"\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
OK - ACCEPTED:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"status_ownership\": false,\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"daily_closure\": {\n \"id\": \"20200701\",\n \"date\": \"2020-07-01T00:00:00.000Z\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\",\n \"payment_method\": {\n \"meal_voucher\": {\n \"amount_unit\": 800,\n \"number\": 1\n }\n }\n}"
OK - CANCELED:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"CANCELED\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"type\": \"CONSUMER\"\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2024-06-11T14:54:20.209Z\",\n \"expire_date\": \"2024-06-11T16:54:20.206Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}\n"
'401':
description: 401 Unauthorized
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`34`
Merchant not found or unauthorized.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 34,\n \"message\": \"...\",\n \"wlt\": \"ZxC73GbE\"\n}"
'403':
description: 403 Forbidden or invalid authorization header
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`45`
Unable to fulfill the request.
`70`
Anti-hammering violation.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 45,\n \"message\": \"...\",\n \"wlt\": \"YmF21QrL\"\n}"
'404':
description: 404 Resource not found
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`41`
Resource not found.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 41,\n \"message\": \"Resource not found\",\n \"wlt\": \"QzL59KjV\"\n}"
x-readme:
headers:
- key: Content-Type
value: application/json
- key: Host
value: authservices.satispay.com
- key: Date
value: Fri, 01 Jul 2020 09:18:17 +0200
- key: Digest
value: SHA-256=…the request digest
- key: Authorization
value: Signature keyId="4ekqhmf…", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="C5yynRx…"
explorer-enabled: true
samples-languages:
- shell
- php
code-samples:
- language: curl
code: "curl --request GET \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"'\n"
name: ''
correspondingExample: OK - ACCEPTED
- language: php
code: '
Use this code only if explicitly required by Satispay.
required: false
schema:
type: string
- in: path
name: id
description: The payment id to update.
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
action:
type: string
description: The action to execute on a specific payment.
`ACCEPT`
This action can be used to accept `PENDING` payments.
`CANCEL`
This action can be used to cancel `PENDING` payments.
`CANCEL_OR_REFUND`
This action can be used to cancel `PENDING` payments.
Or to refund a payment in status `ACCEPTED`.
We suggest to execute this action only if you don't know the actual status of the payment.
For example if you received a timeout or an HTTP `500`.
Depending on the actual status of the payment, you will receive a different outcome and response.
enum:
- ACCEPT
- CANCEL
- CANCEL_OR_REFUND
payment_method_options:
type: object
properties:
meal_voucher:
type: object
description: The veal vouchers settings object.
properties:
enable:
type: boolean
default: true
description: Enable or disable Meal Vouchers for this payment.
If you don't specify this parameter, and if your shop has Meal Vouchers enabled, by default it will be `true`.
max_amount_unit:
type: integer
description: The maximum amount payable with Meal Vouchers in cents.
This parameter is applicable when a customer purchases both food and non-food items. For instance, while the total grocery bill may amount to `€15.00`, the specific cost for food items might be of just `€6.50`.
To represent the amount `€6.50`, you should multiply it by `100`, resulting in `650` cents.
max_number:
type: integer
default: 8
description: The maximum number of Meal Vouchers usable for this payment.
By default this parameter is set to `8`, in compliance with Italian law.
This parameter is applicable when a customer intends to make a payment using multiple meal voucher brands. For instance, the customer might use `3` Meal Vouchers from other brands and `5` Meal Vouchers from Satispay, resulting in a total of `8` Meal Vouchers. In the example above, the `max_number` parameter should be set to `5`, since `3` Meal Vouchers are from another brand.
payment_options:
type: object
properties:
partial_payment:
type: boolean
default: false
description: Enable or disable partial payments.
When partial payment is enabled, customers have the flexibility to pay a portion of the total amount using Meal Vouchers, without the need to use e-money funds from the Satispay wallet.
Customers can decide to use alternative payment methods to cover the remaining amount.
If this property is set to `true`, the `amount_unit` response property could change when the payment transitions to `ACCEPTED` status.
For example, the payment could be created at `12,40€`, but the consumer availability could just be of `8,00€` of Meal Vouchers.
In this case, the `amount_unit` response property will be of `800` cents corresponding in `8,00€`.
When partial payment is disabled, customers are required to pay the entire amount using Satispay, using a combination of both Meal Vouchers and e-money funds from their Satispay wallet.
In this case, if the customer has insufficient funds, the transaction will not be successful.
required:
- action
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique payment id.
This can be used for every eventual subsequent operations on the payment, including refunds.
type:
type: string
description: The current payment type.
`TO_BUSINESS`
This type is used for payments from a consumer to a merchant.
`REFUND_TO_BUSINESS`
This type is used for payments from a merchant to a consumer (e.g. refunds).
amount_unit:
type: integer
description: The payment amount in cents.
For example, the amount `€12.40` is being represented as `1240` cents.
When using the parameter `payment_options.partial_payment` = `true`
this final amount could change when the payment will transition to `ACCEPTED` status.
currency:
type: string
description: The payment currency.
enum:
- EUR
status:
type: string
description: 'The current payment status.
`ACCEPTED`
The payment has been accepted succesfully.
Beware: if you use the `CANCEL_OR_REFUND` action and you receive back an `ACCEPTED` status, this means that the payment has been successfully refunded.
`CANCELED`
The payment has been correctly canceled.
Beware: if you use the `CANCEL_OR_REFUND` action and you receive back a `CANCELED` status, this means that the payment has been successfully canceled.'
expired:
type: boolean
description: The current payment expiration status.
It becomes `true` once it reaches the `expiration_date` without being accepted or canceled.
metadata:
type: object
description: The additional metadata for the payment.
additionalProperties: true
sender:
type: object
description: The sender payment actor.
properties:
id:
type: string
description: The unique sender id.
This will only be available once the payment will be matched with a consumer.
type:
type: string
description: The sender type.
`CONSUMER`
This sender type is used when the payment goes from a consumer to a merchant.
`SHOP`
This sender type is used when the payment goes from a merchant to a consumer (e.g. refunds payments).
name:
type: string
description: The sender name.
This will only be available once the payment will be matched with a consumer.
receiver:
type: object
description: The receiver payment actor.
properties:
id:
type: string
description: The unique receiver id.
type:
type: string
description: The receiver type.
`CONSUMER`
This receiver type is used when the payment goes from a merchant to a consumer.
`SHOP`
This receiver type is used when the payment goes from a consumer to a merchant (e.g. refunds payments).
insert_date:
type: string
description: The UTC payment creation datetime.
expire_date:
type: string
description: The UTC payment expiration datetime.
payment_method:
type: object
properties:
meal_voucher:
type: object
description: 'The Meal Voucher payment part.
This property is available only when:
- the payment is `ACCEPTED`.
- the payment contains Meal Vouchers in it.'
properties:
amount_unit:
type: integer
description: The total amount of Meal Vouchers in this payment, in cents.
For example, the amount `€8.00` is being represented as `800` cents.
number:
type: integer
description: The total number of Meal Vouchers in this payment.
As per italian law, it can't be higher than `8` Meal Vouchers per payment.
examples:
OK - ACCEPT:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:20.166Z\",\n \"expire_date\": \"2020-07-01T11:18:20.163Z\",\n \"payment_method\": {\n \"meal_voucher\": {\n \"amount_unit\": 800,\n \"number\": 1\n }\n }\n}"
OK - CANCEL:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"CANCELED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:20.166Z\",\n \"expire_date\": \"2020-07-01T11:18:20.163Z\"\n}"
OK - CANCEL_OR_REFUND - CANCELED:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"CANCELED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:20:17.166Z\",\n \"expire_date\": \"2020-07-01T11:20:17.163Z\"\n}"
OK - CANCEL_OR_REFUND - REFUNDED:
value: "{\n \"id\": \"3ccea4c1-0d5e-430f-9975-0becd9440d41\",\n \"type\": \"REFUND_TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"receiver\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\"\n },\n \"insert_date\": \"2020-07-01T09:20:17.166Z\",\n \"expire_date\": \"2020-07-01T11:20:17.163Z\",\n \"flow\": \"CHARGE\"\n}"
'400':
description: 400 Bad Request
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`36`
Malformed flow, payment or metadata.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"wlt\": \"RhL16Tpe\",\n \"code\": 36,\n \"message\": \"...\"\n}"
'401':
description: 401 Unauthorized
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`34`
Merchant not found or unauthorized.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"wlt\": \"YoR36Cnm\",\n \"code\": 34,\n \"message\": \"...\"\n}"
'403':
description: 403 Forbidden or invalid authorization header
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`44`
Illegal state transition.
This error typically occurs when you attempt to cancel a payment that is already in `CANCELED` status or accept a payment that is already in `ACCEPTED` status.
`45`
Unable to fulfill the request.
`70`
Anti-hammering violation.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"wlt\": \"EaV36Lte\",\n \"code\": 45,\n \"message\": \"...\"\n}"
'404':
description: 404 Resource not found
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`41`
Resource not found.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 41,\n \"message\": \"Resource not found\",\n \"wlt\": \"bpy0AX3X\"\n}"
x-readme:
headers:
- key: Content-Type
value: application/json
- key: Host
value: authservices.satispay.com
- key: Date
value: Fri, 01 Jul 2020 09:18:17 +0200
- key: Digest
value: SHA-256=…the request digest
- key: Authorization
value: Signature keyId="4ekqhmf…", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="C5yynRx…"
explorer-enabled: true
samples-languages:
- shell
- php
code-samples:
- language: curl
code: "curl --request PUT \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"action\": \"ACCEPT\",\n \"payment_method_options\": {\n \"meal_voucher\": {\n \"enable\": true,\n \"max_amount_unit\": 1240,\n \"max_number\": 8\n }\n },\n \"payment_options\": {\n \"partial_payment\": true\n }\n }'\n"
name: ACCEPT
correspondingExample: OK - ACCEPT
- language: php
code: " 'ACCEPT',\n 'payment_method_options' => [\n 'meal_voucher' => [\n 'enable' => true,\n 'max_amount_unit' => 1240,\n 'max_number' => 8\n ]\n ],\n 'payment_options' => [\n 'partial_payment' => true\n ]\n ]\n);\n"
name: ACCEPT
correspondingExample: OK - ACCEPT
- language: curl
code: "curl --request PUT \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"action\": \"CANCEL\"\n }'\n"
name: CANCEL
correspondingExample: OK - CANCEL
- language: php
code: " 'CANCEL'\n ]\n);\n"
name: CANCEL
correspondingExample: OK - CANCEL
- language: curl
code: "curl --request PUT \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"action\": \"CANCEL_OR_REFUND\"\n }'\n"
name: CANCEL_OR_REFUND
correspondingExample: OK - CANCEL_OR_REFUND - CANCELED
- language: php
code: " 'CANCEL_OR_REFUND'\n ]\n);\n"
name: CANCEL_OR_REFUND
correspondingExample: OK - CANCEL_OR_REFUND - CANCELED
tags:
- Payments
'/payments ':
post:
summary: Create payment
operationId: fringe-create-payment
parameters:
- in: header
name: Content-Type
description: Always send this header as `application/json`.
required: true
schema:
type: string
- in: header
name: Host
description: The host declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Date
description: The date declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Digest
description: The digest declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Authorization
description: The request [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Idempotency-Key
description: The idempotent request key.
You can read more [here](ref:idempotency).
required: false
schema:
type: string
- in: header
name: x-satispay-deviceinfo
description: The device information (e.g., hostname).
required: false
schema:
type: string
- in: header
name: x-satispay-devicetype
description: The device type.
required: false
schema:
type: string
enum:
- SMARTPHONE
- TABLET
- CASH REGISTER
- POS
- PC
- ECOMMERCE_PLUGIN
- in: header
name: x-satispay-os
description: The Operating System name (e.g., Windows).
required: false
schema:
type: string
- in: header
name: x-satispay-osv
description: The Operating System version (e.g., 10).
required: false
schema:
type: string
- in: header
name: x-satispay-apph
description: The software house name (e.g., Satispay).
required: false
schema:
type: string
- in: header
name: x-satispay-appn
description: The software name (e.g., My awesome app).
required: false
schema:
type: string
- in: header
name: x-satispay-appv
description: The software version (e.g., v2.0.0).
required: false
schema:
type: string
- in: header
name: x-satispay-tracking-code
description: The tracking code used by Satispay commercial partners.
Use this code only if explicitly required by Satispay.
required: false
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
flow:
type: string
description: 'The payment flows that you can use with Fringe Benefits are:
`MATCH_CODE` [DOC](doc:one-off)
This flow can be used generically for one-off payments.
`MATCH_USER` [DOC](doc:payment-mobile-number)
This flow can be used for one-off payments on a specific user.
To use this flow you must also include the `consumer_uid` parameter.
`FUND_LOCK` [DOC](doc:funds-lock-late-capture)
This flow can be used for funds lock payments.
`REFUND` [DOC](ref:refund)
This flow can be used for refunds on a specific payment.
To use this flow you must also include the `parent_payment_uid` and the `amount_unit`.'
enum:
- MATCH_CODE
- MATCH_USER
- FUND_LOCK
- REFUND
amount_unit:
type: integer
description: The payment amount in cents.
For example, to represent the amount `€12.40`, you should multiply it by `100`, resulting in `1240` cents.
currency:
type: string
description: The payment currency.
Currently `EUR` is the only currency supported.
default: EUR
token:
type: string
description: The token required to charge the consumer wallet.
It can be an HOTP token.
Required with `HOTP_AUTH` flow only.
consumer_uid:
type: string
description: The unique id of the consumer required for payment acceptance.
To obtain the customer id, please use the [Get Consumer API](ref:retrive-consumer).
Required with `MATCH_USER` flow only.
This parameter is deprecated; we suggest avoiding the `MATCH_USER` UX unless absolutely necessary.
deprecated: true
parent_payment_uid:
type: string
description: The id of the payment that you want to refund.
Required with `REFUND` flow only.
external_code:
type: string
description: The external order id or payment identifier.
We highly recommend to use this field by populating it with your internal order id.
This string will be included in your reports for reconciliation and shown to the Satispay consumer in-app.
This field has a maximum length of 50 characters, including spaces.
callback_url:
type: string
description: The URL to be triggered via an HTTP GET request when there is a change in payment status.
When the given `callback_url` is invoked, a GET request for payment details can be made to retrieve the updated payment status.
Please note that `{uuid}` will be replaced with the generated payment id.
e.g. `https://example.com/satispay-callback?payment_id={uuid}`
You can read more [here](ref:callback-s2s).
redirect_url:
type: string
description: This field specifies the URL where the user will be redirected after the payment flow from the Satispay app is completed.
For instance, you can set this URL to ensure users are redirected to that specific page upon successful payment completion.
e.g. `https://example.com/payment-redirect?order_id=your_order_id`
Please note that this field doesn't support any placeholder.
metadata:
type: object
description: The additional metadata for the payment.
This field supports up to 20 key-value pairs, with keys limited to 45 characters and values limited to 500 characters each.
additionalProperties: true
properties:
phone_number:
type: string
description: This special metadata can be used to pre-fill the phone number field available if you're using a web-redirect flow.
The phone number must contain the prefix an shouldn't have any additional space.
e.g. `+393891122333`
expiration_date:
type: string
description: The UTC payment expiration datetime.
The format should be `ISO 8601` like this `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
By default `MATCH_CODE` and `MATCH_USER` payments are valid for 2 hours.
This parameter cannot be used with the `REFUND` flow.
required:
- flow
- amount_unit
- currency
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique payment id.
This can be used for every eventual subsequent operations on the payment, including refunds.
code_identifier:
type: string
description: The Satispay code identifier.
This string can be encoded in a QR code that can be scanned by the user.
This property is only available in `MATCH_CODE` flow payments.
type:
type: string
description: The current payment type.
`TO_BUSINESS`
This type is used for payments from a consumer to a merchant.
`REFUND_TO_BUSINESS`
This type is used for payments from a merchant to a consumer (e.g. refunds).
amount_unit:
type: integer
description: 'The payment amount in cents.
For example, the amount `€12.40` is being represented as `1240` cents.
'
currency:
type: string
description: The payment currency.
enum:
- EUR
status:
type: string
description: The current payment status.
`PENDING`
The payment is created and awaits user interaction, such as scanning the QR code.
expired:
type: boolean
description: The current payment expiration status.
It becomes `true` once it reaches the `expiration_date` without being accepted or canceled.
metadata:
type: object
description: The additional metadata for the payment.
additionalProperties: true
sender:
type: object
description: The sender payment actor.
properties:
id:
type: string
description: The unique sender id.
This will only be available once the payment will be matched with a consumer.
type:
type: string
description: The sender type.
`CONSUMER`
This sender type is used when the payment goes from a consumer to a merchant.
`SHOP`
This sender type is used when the payment goes from a merchant to a consumer (e.g. refunds payments).
name:
type: string
description: The sender name.
This will only be available once the payment will be matched with a consumer.
receiver:
type: object
description: The receiver payment actor.
properties:
id:
type: string
description: The unique receiver id.
type:
type: string
description: The receiver type.
`CONSUMER`
This receiver type is used when the payment goes from a merchant to a consumer.
`SHOP`
This receiver type is used when the payment goes from a consumer to a merchant (e.g. refunds payments).
insert_date:
type: string
description: The UTC payment creation datetime.
expire_date:
type: string
description: The UTC payment expiration datetime.
This property can be ignored when using `PRE_AUTHORIZED` or `HOTP_AUTH` flows.
description:
type: string
deprecated: true
description: The external_code set during the payment creation request.
Please use the `external_code` field instead.
flow:
type: string
deprecated: true
external_code:
type: string
description: The `external_code` set during the creation request.
redirect_url:
type: string
description: The URL where to redirect the user to begin the Satispay payment flow.
examples:
OK - MATCH_CODE:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"type\": \"CONSUMER\"\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2023-06-06T10:15:06.473Z\",\n \"expire_date\": \"2023-06-06T12:15:06.468Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
OK - MATCH_USER:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"1ed62785-4c8d-46c3-8673-5f5d16ca9f67\",\n \"type\": \"CONSUMER\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": []\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}\n"
OK - FUND_LOCK:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"type\": \"CONSUMER\"\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2023-06-06T10:15:06.473Z\",\n \"expire_date\": \"2023-06-06T12:15:06.468Z\",\n \"description\": \"my_order_id\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
'400':
description: 400 Bad Request
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`21`
Insufficient availability.
`36`
Malformed flow, payment or metadata.
`131`
Payment too old to be refunded.
It is only possible to refund Fringe Benefit payments by the end of the month of their creation.
`27`
Payment not allowed.
Consumer or shop are currently not able to pay/receive payments.
Please note that this condition could be temporary.
`246`
The HOTP token is not valid.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 21,\n \"wlt\": \"FnT15Fhr\"\n}"
'401':
description: 401 Unauthorized
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`34`
Merchant not found or unauthorized.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 34,\n \"message\": \"...\",\n \"wlt\": \"PyL36Ehs\"\n}"
'403':
description: 403 Forbidden or invalid authorization header
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`45`
Unable to fulfill the request.
`70`
Anti-hammering violation.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 45,\n \"message\": \"...\",\n \"wlt\": \"GsM82Btk\"\n}"
x-readme:
headers:
- key: Content-Type
value: application/json
- key: Host
value: authservices.satispay.com
- key: Date
value: Fri, 01 Jul 2020 09:18:17 +0200
- key: Digest
value: SHA-256=…the request digest
- key: Authorization
value: Signature keyId="4ekqhmf…", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="C5yynRx…"
explorer-enabled: true
samples-languages:
- shell
- php
code-samples:
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"MATCH_CODE\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"external_code\": \"my_order_id\",\n \"callback_url\": \"https://example.com/satispay-callback?payment_id={uuid}\",\n \"redirect_url\": \"https://example.com/satispay-redirect?order_id=my_order_id\", \n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n }\n }'\n"
name: MATCH_CODE
correspondingExample: OK - MATCH_CODE
- language: php
code: " 'MATCH_CODE',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'payment_options' => [\n 'partial_payment' => true\n ],\n 'external_code' => 'my_order_id',\n 'callback_url' => 'https://example.com/satispay-callback?payment_id={uuid}',\n 'redirect_url' => 'https://example.com/satispay-redirect?order_id=my_order_id', \n 'metadata' => [\n 'order_id' => 'my_order_id',\n 'user_id' => 'my_user_id',\n 'payment_id' => 'my_payment_id',\n 'session_id' => 'my_session_id',\n 'key' => 'value'\n ]\n]);\n"
name: MATCH_CODE
correspondingExample: OK - MATCH_CODE
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"MATCH_USER\",\n \"consumer_uid\": \"1ed62785-4c8d-46c3-8673-5f5d16ca9f67\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"payment_options\": {\n \"partial_payment\": true\n },\n \"external_code\": \"my_order_id\",\n \"callback_url\": \"https://example.com/satispay-callback?payment_id={uuid}\",\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n }\n }'\n"
name: MATCH_USER
correspondingExample: OK - MATCH_USER
- language: php
code: " 'MATCH_USER',\n 'consumer_uid' => '1ed62785-4c8d-46c3-8673-5f5d16ca9f67',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'payment_options' => [\n 'partial_payment' => false\n ],\n 'external_code' => 'my_order_id',\n 'callback_url' => 'https://example.com/satispay-callback?payment_id={uuid}',\n 'metadata' => [\n 'order_id' => 'my_order_id',\n 'user_id' => 'my_user_id',\n 'payment_id' => 'my_payment_id',\n 'session_id' => 'my_session_id',\n 'key' => 'value'\n ]\n]);\n"
name: MATCH_USER
correspondingExample: OK - MATCH_USER
- language: curl
code: "curl --request POST \\\n --url https://authservices.satispay.com/g_business/v1/payments \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2020 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"flow\": \"FUND_LOCK\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"payment_options\": {\n \"partial_payment\": true\n },\n \"external_code\": \"my_order_id\",\n \"callback_url\": \"https://example.com/satispay-callback?payment_id={uuid}\",\n \"redirect_url\": \"https://example.com/satispay-redirect?order_id=my_order_id\", \n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n }\n }'\n"
name: FUND_LOCK
correspondingExample: OK - FUND_LOCK
- language: php
code: " 'FUND_LOCK',\n 'amount_unit' => 12.40 * 100,\n 'currency' => 'EUR',\n 'payment_options' => [\n 'partial_payment' => true\n ],\n 'external_code' => 'my_order_id',\n 'callback_url' => 'https://example.com/satispay-callback?payment_id={uuid}',\n 'redirect_url' => 'https://example.com/satispay-redirect?order_id=my_order_id', \n 'metadata' => [\n 'order_id' => 'my_order_id',\n 'user_id' => 'my_user_id',\n 'payment_id' => 'my_payment_id',\n 'session_id' => 'my_session_id',\n 'key' => 'value'\n ]\n]);\n"
name: FUND_LOCK
correspondingExample: OK - FUND_LOCK
tags:
- Payments
'/payments/{id} ':
get:
summary: Get payment
operationId: fringe-get-payment-details
parameters:
- in: header
name: Host
description: The host declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Date
description: The date declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Digest
description: The digest declared in the [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: Authorization
description: The request [signature](ref:sign-the-string).
required: true
schema:
type: string
- in: header
name: x-satispay-response-wait-time
description: Specifies the duration, in seconds, for which the `HTTP` call will be hanging, waiting for a payment status change.
The maximum allowed value is `60` seconds.
required: false
schema:
type: integer
minimum: 0
maximum: 60
- in: header
name: x-satispay-deviceinfo
description: The device information (e.g., hostname).
required: false
schema:
type: string
- in: header
name: x-satispay-devicetype
description: The device type.
required: false
schema:
type: string
enum:
- SMARTPHONE
- TABLET
- CASH REGISTER
- POS
- PC
- ECOMMERCE_PLUGIN
- in: header
name: x-satispay-os
description: The Operating System name (e.g., Windows).
required: false
schema:
type: string
- in: header
name: x-satispay-osv
description: The Operating System version (e.g., 10).
required: false
schema:
type: string
- in: header
name: x-satispay-apph
description: The software house name (e.g., Satispay).
required: false
schema:
type: string
- in: header
name: x-satispay-appn
description: The software name (e.g., My awesome app).
required: false
schema:
type: string
- in: header
name: x-satispay-appv
description: The software version (e.g., v2.0.0).
required: false
schema:
type: string
- in: header
name: x-satispay-tracking-code
description: The tracking code used by Satispay commercial partners.
Use this code only if explicitly required by Satispay.
required: false
schema:
type: string
- in: path
name: id
description: The payment id to retrieve.
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique payment id.
This can be used for every eventual subsequent operations on the payment, including refunds.
code_identifier:
type: string
description: The Satispay code identifier.
This string can be encoded in a QR code that can be scanned by the user.
This property is only available in `MATCH_CODE` flow payments.
type:
type: string
description: The current payment type.
`TO_BUSINESS`
This type is used for payments from a consumer to a merchant.
`REFUND_TO_BUSINESS`
This type is used for payments from a merchant to a consumer (e.g. refunds).
amount_unit:
type: integer
description: 'The payment amount in cents.
For example, the amount `€12.40` is being represented as `1240` cents.
'
currency:
type: string
description: The payment currency.
enum:
- EUR
status:
type: string
description: 'The current payment status.
`PENDING`
The payment is created and awaits user interaction, such as scanning the QR code.
`ACCEPTED`
The payment has been accepted and succesfully executed.
`CANCELED`
The payment has been canceled, this could happen if:
- the consumer''s explicitely declines it in the Satispay app.
- the merchant cancels it via the [Update payment API](ref:mv-update-payment) with a `CANCEL` action.
- the payment reaches the `expiration_date` while in a `PENDING` status.'
status_ownership:
type: boolean
deprecated: true
expired:
type: boolean
description: The current payment expiration status.
It becomes `true` once it reaches the `expiration_date` without being accepted or canceled.
metadata:
type: object
description: The additional metadata for the payment.
additionalProperties: true
sender:
type: object
description: The sender payment actor.
properties:
id:
type: string
description: The unique sender id.
This will only be available once the payment will be matched with a consumer.
type:
type: string
description: The sender type.
`CONSUMER`
This sender type is used when the payment goes from a consumer to a merchant.
`SHOP`
This sender type is used when the payment goes from a merchant to a consumer (e.g. refunds payments).
name:
type: string
description: The sender name.
This will only be available once the payment will be matched with a consumer.
receiver:
type: object
description: The receiver payment actor.
properties:
id:
type: string
description: The unique receiver id.
type:
type: string
description: The receiver type.
`CONSUMER`
This receiver type is used when the payment goes from a merchant to a consumer.
`SHOP`
This receiver type is used when the payment goes from a consumer to a merchant (e.g. refunds payments).
insert_date:
type: string
description: The UTC payment creation datetime.
expire_date:
type: string
description: The UTC payment expiration datetime.
description:
type: string
deprecated: true
description: The external_code set during the payment creation request.
Please use the `external_code` field instead.
flow:
type: string
deprecated: true
external_code:
type: string
description: The `external_code` set during the creation request.
redirect_url:
type: string
description: The URL where to redirect the user to begin the Satispay payment flow.
This property is available only when the payment uses the `MATCH_CODE` flow.
payment_method:
type: object
properties:
welfare_fringe:
type: object
description: 'The Fringe Benefits portion of the payment.
This property is available only when:
- the payment is `ACCEPTED`.
- the payment contains Fringe Benefits in it.'
properties:
amount_unit:
type: integer
description: The total amount of Fringe Benefits in this payment, in cents.
For example, the amount `€8.00` is being represented as `800` cents.
examples:
OK - PENDING:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"PENDING\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"type\": \"CONSUMER\"\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}"
OK - ACCEPTED:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"status_ownership\": false,\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"daily_closure\": {\n \"id\": \"20200701\",\n \"date\": \"2020-07-01T00:00:00.000Z\"\n },\n \"insert_date\": \"2020-07-01T09:18:17.166Z\",\n \"expire_date\": \"2020-07-01T11:18:17.163Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\",\n \"payment_method\": {\n \"welfare_fringe\": {\n \"amount_unit\": 800\n }\n }\n}"
OK - CANCELED:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"code_identifier\": \"S6Y-PAY--2EE5F6C7-F85D-45B7-8F1B-2A570A7002EB\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"CANCELED\",\n \"expired\": false,\n \"metadata\": {\n \"order_id\": \"my_order_id\",\n \"user_id\": \"my_user_id\",\n \"payment_id\": \"my_payment_id\",\n \"session_id\": \"my_session_id\",\n \"key\": \"value\"\n },\n \"sender\": {\n \"type\": \"CONSUMER\"\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2024-06-11T14:54:20.209Z\",\n \"expire_date\": \"2024-06-11T16:54:20.206Z\",\n \"description\": \"my_order_id\",\n \"flow\": \"CHARGE\",\n \"external_code\": \"my_order_id\",\n \"redirect_url\": \"https://online.satispay.com/pay/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb?redirect_url=https%3A%2F%2Fexample.com%2Fsatispay-redirect%3Forder_id%3Dmy_order_id\"\n}\n"
'401':
description: 401 Unauthorized
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`34`
Merchant not found or unauthorized.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 34,\n \"message\": \"...\",\n \"wlt\": \"WxV47QbC\"\n}"
'403':
description: 403 Forbidden or invalid authorization header
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`45`
Unable to fulfill the request.
`70`
Anti-hammering violation.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 45,\n \"message\": \"...\",\n \"wlt\": \"YmF21QrL\"\n}"
'404':
description: 404 Resource not found
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`41`
Resource not found.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 41,\n \"message\": \"Resource not found\",\n \"wlt\": \"RvM62JxY\"\n}"
x-readme:
headers:
- key: Content-Type
value: application/json
- key: Host
value: authservices.satispay.com
- key: Date
value: Fri, 01 Jul 2020 09:18:17 +0200
- key: Digest
value: SHA-256=…the request digest
- key: Authorization
value: Signature keyId="4ekqhmf…", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="C5yynRx…"
explorer-enabled: true
samples-languages:
- shell
- php
code-samples:
- language: curl
code: "curl --request GET \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"'\n"
name: ''
correspondingExample: OK - ACCEPTED
- language: php
code: '
Use this code only if explicitly required by Satispay.
required: false
schema:
type: string
- in: path
name: id
description: The payment id to update.
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
action:
type: string
description: The action to execute on a specific payment.
`ACCEPT`
This action can be used to accept `PENDING` payments.
`CANCEL`
This action can be used to cancel `PENDING` payments.
`CANCEL_OR_REFUND`
This action can be used to cancel `PENDING` payments.
Or to refund a payment in status `ACCEPTED`.
We suggest to execute this action only if you don't know the actual status of the payment.
For example if you received a timeout or an HTTP `500`.
Depending on the actual status of the payment, you will receive a different outcome and response.
enum:
- ACCEPT
- CANCEL
- CANCEL_OR_REFUND
required:
- action
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique payment id.
This can be used for every eventual subsequent operations on the payment, including refunds.
code_identifier:
type: string
description: The Satispay code identifier.
This string can be encoded in a QR code that can be scanned by the user.
This property is only available in `MATCH_CODE` flow payments.
type:
type: string
description: The current payment type.
`TO_BUSINESS`
This type is used for payments from a consumer to a merchant.
`REFUND_TO_BUSINESS`
This type is used for payments from a merchant to a consumer (e.g. refunds).
amount_unit:
type: integer
description: 'The payment amount in cents.
For example, the amount `€12.40` is being represented as `1240` cents.
'
currency:
type: string
description: The payment currency.
enum:
- EUR
status:
type: string
description: 'The current payment status.
`ACCEPTED`
The payment has been accepted succesfully.
Beware: if you use the `CANCEL_OR_REFUND` action and you receive back an `ACCEPTED` status, this means that the payment has been successfully refunded.
`CANCELED`
The payment has been correctly canceled.
Beware: if you use the `CANCEL_OR_REFUND` action and you receive back a `CANCELED` status, this means that the payment has been successfully canceled.'
expired:
type: boolean
description: The current payment expiration status.
It becomes `true` once it reaches the `expiration_date` without being accepted or canceled.
metadata:
type: object
description: The additional metadata for the payment.
additionalProperties: true
sender:
type: object
description: The sender payment actor.
properties:
id:
type: string
description: The unique sender id.
This will only be available once the payment will be matched with a consumer.
type:
type: string
description: The sender type.
`CONSUMER`
This sender type is used when the payment goes from a consumer to a merchant.
`SHOP`
This sender type is used when the payment goes from a merchant to a consumer (e.g. refunds payments).
name:
type: string
description: The sender name.
This will only be available once the payment will be matched with a consumer.
receiver:
type: object
description: The receiver payment actor.
properties:
id:
type: string
description: The unique receiver id.
type:
type: string
description: The receiver type.
`CONSUMER`
This receiver type is used when the payment goes from a merchant to a consumer.
`SHOP`
This receiver type is used when the payment goes from a consumer to a merchant (e.g. refunds payments).
insert_date:
type: string
description: The UTC payment creation datetime.
expire_date:
type: string
description: The UTC payment expiration datetime.
payment_method:
type: object
properties:
welfare_fringe:
type: object
description: 'The Fringe Benefits portion of the payment.
This property is available only when:
- the payment is `ACCEPTED`.
- the payment contains Fringe Benefits in it.'
properties:
amount_unit:
type: integer
description: The total amount of Fringe Benefits in this payment, in cents.
For example, the amount `€8.00` is being represented as `800` cents.
examples:
OK - ACCEPT:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:20.166Z\",\n \"expire_date\": \"2020-07-01T11:18:20.163Z\",\n \"payment_method\": {\n \"welfare_fringe\": {\n \"amount_unit\": 800\n }\n }\n}"
OK - CANCEL:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"CANCELED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:18:20.166Z\",\n \"expire_date\": \"2020-07-01T11:18:20.163Z\"\n}"
OK - CANCEL_OR_REFUND - CANCELED:
value: "{\n \"id\": \"2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb\",\n \"type\": \"TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"CANCELED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\",\n \"name\": \"Emanuele C.\",\n \"profile_pictures\": {\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"f60f9bd3-357a-4b46-8441-52d6a3bd630f\",\n \"url\": \"https://placehold.co/640x640.jpg\",\n \"width\": 640,\n \"height\": 640,\n \"is_original\": false\n },\n {\n \"id\": \"33f2dc8b-de76-4287-910b-560799b60b3d\",\n \"url\": \"https://placehold.co/512x512.jpg\",\n \"width\": 512,\n \"height\": 512,\n \"is_original\": true\n },\n {\n \"id\": \"f1c7d014-47dc-4c16-85d9-fc83556ab173\",\n \"url\": \"https://placehold.co/180x180.jpg\",\n \"width\": 180,\n \"height\": 180,\n \"is_original\": false\n }\n ]\n }\n },\n \"receiver\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"insert_date\": \"2020-07-01T09:20:17.166Z\",\n \"expire_date\": \"2020-07-01T11:20:17.163Z\"\n}"
OK - CANCEL_OR_REFUND - REFUNDED:
value: "{\n \"id\": \"3ccea4c1-0d5e-430f-9975-0becd9440d41\",\n \"type\": \"REFUND_TO_BUSINESS\",\n \"amount_unit\": 1240,\n \"currency\": \"EUR\",\n \"status\": \"ACCEPTED\",\n \"expired\": false,\n \"metadata\": {},\n \"sender\": {\n \"id\": \"0c4f4511-1afa-4b17-b529-ff7465d126c1\",\n \"type\": \"SHOP\"\n },\n \"receiver\": {\n \"id\": \"0f7c13fb-06d4-424d-8b98-18e82d1f27a8\",\n \"type\": \"CONSUMER\"\n },\n \"insert_date\": \"2020-07-01T09:20:17.166Z\",\n \"expire_date\": \"2020-07-01T11:20:17.163Z\",\n \"flow\": \"CHARGE\"\n}"
'400':
description: 400 Bad Request
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`36`
Malformed flow, payment or metadata.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"wlt\": \"RhL16Tpe\",\n \"code\": 36,\n \"message\": \"...\"\n}"
'401':
description: 401 Unauthorized
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`34`
Merchant not found or unauthorized.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"wlt\": \"YoR36Cnm\",\n \"code\": 34,\n \"message\": \"...\"\n}"
'403':
description: 403 Forbidden or invalid authorization header
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`44`
Illegal state transition.
This error typically occurs when you attempt to cancel a payment that is already in `CANCELED` status or accept a payment that is already in `ACCEPTED` status.
`45`
Unable to fulfill the request.
`70`
Anti-hammering violation.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"wlt\": \"EaV36Lte\",\n \"code\": 45,\n \"message\": \"...\"\n}"
'404':
description: 404 Resource not found
content:
application/json:
schema:
type: object
properties:
wlt:
type: string
description: The request CID/WLT, save this string in case of errors.
This will help our IT support to trace the request.
code:
type: string
description: The specific system error code.
`41`
Resource not found.
message:
type: string
description: The error message.
examples:
response:
value: "{\n \"code\": 41,\n \"message\": \"Resource not found\",\n \"wlt\": \"bpy0AX3X\"\n}"
x-readme:
headers:
- key: Content-Type
value: application/json
- key: Host
value: authservices.satispay.com
- key: Date
value: Fri, 01 Jul 2020 09:18:17 +0200
- key: Digest
value: SHA-256=…the request digest
- key: Authorization
value: Signature keyId="4ekqhmf…", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="C5yynRx…"
explorer-enabled: true
samples-languages:
- shell
- php
code-samples:
- language: curl
code: "curl --request PUT \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"action\": \"ACCEPT\"\n }'\n"
name: ACCEPT
correspondingExample: OK - ACCEPT
- language: php
code: " 'ACCEPT'\n ]\n);\n"
name: ACCEPT
correspondingExample: OK - ACCEPT
- language: curl
code: "curl --request PUT \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"action\": \"CANCEL\"\n }'\n"
name: CANCEL
correspondingExample: OK - CANCEL
- language: php
code: " 'CANCEL'\n ]\n);\n"
name: CANCEL
correspondingExample: OK - CANCEL
- language: curl
code: "curl --request PUT \\\n --url https://authservices.satispay.com/g_business/v1/payments/2ee5f6c7-f85d-45b7-8f1b-2a570a7002eb \\\n --header 'Content-Type: application/json' \\\n --header 'Host: authservices.satispay.com' \\\n --header 'Date: Fri, 01 Jul 2024 09:18:17 GMT' \\\n --header 'Digest: SHA-256=...' \\\n --header 'Authorization: Signature keyId=\"4ekqhm...\", algorithm=\"rsa-sha256\", headers=\"(request-target) host date digest\", signature=\"C5yynRx...\"' \\\n --data '{\n \"action\": \"CANCEL_OR_REFUND\"\n }'\n"
name: CANCEL_OR_REFUND
correspondingExample: OK - CANCEL_OR_REFUND - CANCELED
- language: php
code: " 'CANCEL_OR_REFUND'\n ]\n);\n"
name: CANCEL_OR_REFUND
correspondingExample: OK - CANCEL_OR_REFUND - CANCELED
tags:
- Payments
x-readme:
explorer-enabled: true
proxy-enabled: true