post https://authservices.satispay.com/g_business/v1/payments
API to create a payment
Flows
When creating a payment you can use one of this flows:
- MATCH_CODE: to create a payment that has to be paid scanning a Dynamic Code
- MATCH_USER: to create a payment request for a specific consumer
- REFUND: to partially/completely refund a Payment that is ACCEPTED
- PRE_AUTHORIZED: to create a payment with a pre-authorized token
- FUND_LOCK: to create a payment that locks funds on consumer's wallet
- PRE_AUTHORIZED_FUND_LOCK: to create a pre-authorized payment that locks funds on consumer's wallet
Responses
200 OK
- id [string]: Unique ID of the payment. It can then be used to retrieve the Get payment details or Update the payment.
- code_identifier [string]: Generated code identifier which contains payment details
- type [string]: Type of payment (
TO_BUSINESS
orREFUND_TO_BUSINESS
) - amount_unit [number]: Amount of the payment in cents
- currency [string]: Currency of the payment
- status [string]: Status of the payment (
PENDING
,ACCEPTED
orAUTHORIZED
) - expired [boolean]: If true, the payment is expired
- metadata [object]: Metadata inserted within the payment request
- sender [object]: The sender actor of the payment
- id [string]: Unique ID of the sender
- type [string]: Type of the actor (
CONSUMER
orSHOP
) - name [string]: Short name of the actor
- receiver [object]: The receiver actor of the payment
- id [string]: Unique ID of the receiver
- type [string]: Type of the actor (
SHOP
orCONSUMER
)
- insert_date [datetime]: Timestamp of payment insertion
- expire_date [datetime]: Timestamp of payment expiration
- external_code [string]: Order ID or payment external identifier
- redirect_url [string]: Redirect url to the payment page
400 Bad Request
- code [integer]: Error code
21
→ insufficient availability
36
→ malformed flow, payment or metadata
131
→ payment too old to be refunded (it is possible to refund payments that were made within the past 365 days)
27
→ payment not allowed: consumer or shop are currently not able to pay/be payed (this condition could be temporary)
172
→ pre authorized payments token is not valid - message [string]: Error message
401 Unauthorized
- code [integer]: Error code
34
→ shop not found or unauthorized - message [string]: Error message
403 Forbidden or invalid authorization header
- code [integer]: Error code
45
→ unable to fulfil request
70
→ anti-hammering violation - message [string]: Error message