# Neuro-Pay Checkout API # Authentification In order to use the checkout API the company in question needs to generate an API key through the Neuro-Admin platform. Said API key should be sent as a bearer token in each request. [![image.png](https://wiki.paiwise.tech/uploads/images/gallery/2022-07/scaled-1680-/jgfimage.png)](https://wiki.paiwise.tech/uploads/images/gallery/2022-07/jgfimage.png) # Data format The API currently accepts and returns JSON data in the body # Requests Collection of possible requests # Create [POST] **https://api.paiwise.com/checkout/create** \[POST\]
identifier (optional)StringIdentifier of the checkout, if not passed the cid will get as reference
amountintSmallest nominee for the currency. Example: 30SEK is 3000 öre so value of this param should be 3000
currencyStringEUR, SEK, USD… etc
messageStringMessage to be shown to customer in the checkout
capture (optional) Boolean (default: true)If capture is set to false, a manual capture has to be done later. In order to release the funds back to the client the Refund endpoint can be used.
allowSaveCard (optional)Boolean (default: true)If allowSaveCard is set to false, the user can't save the card in his card list for future usage.
returnUrlStringURL where the customer should be returned to after checkout process is done.
returnUrlCancelStringURL where the customer should be returned to if cancelling the checkout process
customer\_id (optional)StringIf present activate the possibility to save the card during the payment
card\_id (optional)StringIf present (customer\_id required) do an automatic payment
template (optional) String For now only can be "iframe" which removes background image
metaDataArrayKey value pair array to store additional data together with the payment.
[![image.png](https://wiki.paiwise.tech/uploads/images/gallery/2023-04/scaled-1680-/image.png)](https://wiki.paiwise.tech/uploads/images/gallery/2023-04/image.png) # Retrieve [POST] **https://api.paiwise.com/checkout/retrieve** \[POST\] Values
checkout\_idStringThe checkout\_id received when creating a checkout object
[![image.png](https://wiki.paiwise.tech/uploads/images/gallery/2022-08/scaled-1680-/YTJimage.png)](https://wiki.paiwise.tech/uploads/images/gallery/2022-08/YTJimage.png) # Capture [POST] **https://api.paiwise.com/checkout/capture** \[POST\] Capture is used if capture was set to false when creating a checkout object. And if status of the object is “reserved” Values
checkout\_idStringThe checkout\_id received when creating a checkout object
[![image.png](https://wiki.paiwise.tech/uploads/images/gallery/2022-07/scaled-1680-/1gFimage.png)](https://wiki.paiwise.tech/uploads/images/gallery/2022-07/1gFimage.png) # Refund [POST] **https://api.paiwise.com/checkout/refund** \[POST\] The refund can be used on objects that has status “paid” or “reserved” and will result in changing the status to either “refunded” or “reserve released” Values
checkout\_idStringThe checkout\_id received when creating a checkout object
amount (optional)IntIf an amount to be refunded is not set the whole amount will be refunded
reason (optional)StringReason of the refund. Value admitted: "duplicate", "requested\_by\_customer" or "fraudolent"
refundDetails (optional)StringComments about the refund. Free text
[![image.png](https://wiki.paiwise.tech/uploads/images/gallery/2022-10/scaled-1680-/wzKimage.png)](https://wiki.paiwise.tech/uploads/images/gallery/2022-10/wzKimage.png) # Update [POST] **https://api.paiwise.com/checkout/update**\[POST\] The update can be used on objects that has every status Values
checkout\_idStringThe checkout\_id received when creating a checkout object
metaDataStringAn object key-value (if value is empty, the relative key will be deleted from the object)
[![image.png](https://wiki.paiwise.tech/uploads/images/gallery/2023-09/scaled-1680-/p31image.png)](https://wiki.paiwise.tech/uploads/images/gallery/2023-09/p31image.png) # Response # The response object For each endpoint the checkout object will be returned in its “new state” Example: [![image.png](https://wiki.paiwise.tech/uploads/images/gallery/2023-04/scaled-1680-/kSJimage.png)](https://wiki.paiwise.tech/uploads/images/gallery/2023-04/kSJimage.png) Possible statuses are - created - reserved - reserve released - paid - refunded - partialRefund - revoked - failed - canceled Every date and time returned are in UTC. # Customer's Request # Create customer [POST] **https://api.paiwise.com/checkout/create-customer** \[POST\]
first\_nameStringCustomer's last name
last\_nameStringCustomer's last name
emailStringCustomer's email
metaDataArrayKey value pair array to store additional data together with the customer.
[![image.png](https://wiki.paiwise.tech/uploads/images/gallery/2022-08/scaled-1680-/Id5image.png)](https://wiki.paiwise.tech/uploads/images/gallery/2022-08/Id5image.png) # Retrieve customer [POST]
**https://api.paiwise.com/checkout/retrieve-customer** \[POST\]
customer\_idStringCustomer's id
[![image.png](https://wiki.paiwise.tech/uploads/images/gallery/2022-08/scaled-1680-/uxJimage.png)](https://wiki.paiwise.tech/uploads/images/gallery/2022-08/uxJimage.png) # Delete customer [POST]
**https://api.paiwise.com/checkout/delete-customer** \[POST\]
customer\_idStringCustomer's id
[![image.png](https://wiki.paiwise.tech/uploads/images/gallery/2023-09/scaled-1680-/oThimage.png)](https://wiki.paiwise.tech/uploads/images/gallery/2023-09/oThimage.png) # Customer's Response # The response object For each endpoint the customer object will be returned Example: [![image.png](https://wiki.paiwise.tech/uploads/images/gallery/2022-10/scaled-1680-/1U0image.png)](https://wiki.paiwise.tech/uploads/images/gallery/2022-10/1U0image.png) The customer object also returns a "Client\_page", following this link the customer can change the card configuration by adding/deleting and set the default a card for a future payment. [![image.png](https://wiki.paiwise.tech/uploads/images/gallery/2022-10/scaled-1680-/Mv6image.png)](https://wiki.paiwise.tech/uploads/images/gallery/2022-10/Mv6image.png) # Postman collection attached to this page is a postman collection for testing All requests inherits the authentication from the collection. as the bearer token you add your API key test or live, You can find file attachments in top left corner of this page