Skip to content

Conversation

@mkurapov
Copy link
Contributor

@mkurapov mkurapov commented Sep 18, 2025

Changes proposed in this pull request

After discussions in #kernel-implementation, we have finalized the POS Service /payment request that the POS will call.

  • Updated POS Service POST /payment request body to be:
{
  "signature": "", // hex string (GEN AC result)
  "payload": "", // hex string (GEN AC payload)
  "amount": { "value:": "100", "assetScale": 2, "assetCode": "EUR"},
  "senderWalletAddress": "https://example.com/alice",
  "receiverWalletAddress": "https://example.com/bob",
  "timestamp": 1758105181325
}
  • as a result, the Card Service POST /payment request body was updated to:
{   
  "requestId": "",
  "signature": "",
  "payload": "",
  "amount": { "value:": "100", "assetScale": 2, "assetCode": "EUR"},
  "timestamp": 1758105181325 
  "senderWalletAddress": "https://example.com/alice",
  "incomingPaymentUrl": "https://example.com/incoming-payment/39393"
}

Context

Checklist

Fixes #3650 | RAF-1166

  • Related issues linked using fixes #number
  • Tests added/updated
  • Make sure that all checks pass
  • Bruno collection updated (if necessary)
  • Documentation issue created with user-docs label (if necessary)
  • OpenAPI specs updated (if necessary)

@github-actions github-actions bot added the type: tests Testing related label Sep 18, 2025
Comment on lines +67 to +68
WEBHOOK_SIGNATURE_SECRET: iyIgCprjb9uL8wFckR+pLEkJWMB7FJhgkvqhTQR/964=
WEBHOOK_SIGNATURE_VERSION: 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating the docker compose file so that the webhooks between backend <> POS service are signed and correctly validated

Comment on lines +28 to +30
/* eslint-disable no-var */
declare global {
interface BigInt {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So BigInt is properly coerced before we pass it into the GraphQL requests

@github-actions
Copy link

🚀 Performance Test Results

Test Configuration:

  • VUs: 4
  • Duration: 1m0s

Test Metrics:

  • Requests/s: 40.10
  • Iterations/s: 13.40
  • Failed Requests: 0.00% (0 of 2413)
📜 Logs

> [email protected] run-tests:testenv /home/runner/work/rafiki/rafiki/test/performance
> ./scripts/run-tests.sh -e test "-k" "-q" "--vus" "4" "--duration" "1m"

Cloud Nine GraphQL API is up: http://localhost:3101/graphql
Cloud Nine Wallet Address is up: http://localhost:3100/
Happy Life Bank Address is up: http://localhost:4100/
cloud-nine-wallet-test-backend already set
cloud-nine-wallet-test-auth already set
happy-life-bank-test-backend already set
happy-life-bank-test-auth already set
     data_received..................: 871 kB 15 kB/s
     data_sent......................: 1.9 MB 31 kB/s
     http_req_blocked...............: avg=6.98µs   min=2.36µs   med=5.48µs   max=827.25µs p(90)=6.56µs   p(95)=7.14µs  
     http_req_connecting............: avg=691ns    min=0s       med=0s       max=742.58µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=99.1ms   min=13.55ms  med=79.31ms  max=915.64ms p(90)=173.06ms p(95)=190.77ms
       { expected_response:true }...: avg=99.1ms   min=13.55ms  med=79.31ms  max=915.64ms p(90)=173.06ms p(95)=190.77ms
     http_req_failed................: 0.00%  ✓ 0         ✗ 2413
     http_req_receiving.............: avg=91.54µs  min=23.15µs  med=79.97µs  max=2.61ms   p(90)=115.02µs p(95)=146.95µs
     http_req_sending...............: avg=37.82µs  min=11.3µs   med=28.99µs  max=3.07ms   p(90)=42.08µs  p(95)=58.94µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=98.97ms  min=13.31ms  med=79.18ms  max=915.56ms p(90)=172.94ms p(95)=190.67ms
     http_reqs......................: 2413   40.103399/s
     iteration_duration.............: avg=298.33ms min=201.41ms med=284.74ms max=1.06s    p(90)=353.09ms p(95)=381.84ms
     iterations.....................: 806    13.395499/s
     vus............................: 4      min=4       max=4 
     vus_max........................: 4      min=4       max=4 

Copy link
Contributor

@oana-lolea oana-lolea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mkurapov mkurapov merged commit 3be9ecf into pos-card-services Sep 19, 2025
28 of 40 checks passed
@mkurapov mkurapov deleted the max/raf-1166 branch September 19, 2025 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: tests Testing related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants